Opened 19 years ago

Closed 19 years ago

Last modified 5 years ago

#1884 closed defect (fixed)

Possible that smush player tries to release resource twice

Reported by: anotherguest Owned by: fingolfin
Priority: normal Component: Port: Symbian
Version: Keywords:
Cc: Game:

Description

After been adopting the smush player to suit Symbian OS thread handling I found a potential problem which is very easily fixed.

The Destructor of the smushplayer looks like this SmushPlayer::~SmushPlayer() { if (_initDone) release(); }

But if release() has been called by aborting the movie playback _initDone is still true, and thus release() is called twice.. once from play() and once from the destructor. release() should finish off by setting _initDone = false, as the resources now are dead.

Ticket imported from: #1098864. Ticket imported from: bugs/1884.

Change History (6)

comment:1 by fingolfin, 19 years ago

Owner: changed from sev- to aquadran

comment:2 by fingolfin, 19 years ago

Could do that, yeah. However, there is no problem as it is now, as release() can safely be called as many time as desired.

comment:3 by anotherguest, 19 years ago

Well it could become a problem, if you are like me,as I have to adopt functions so resources are released from the right thread. Symbian OS does n't share handles between threads, so that means that a file that have been opened in the timer thread also has to be closed there.So the easiest way for me is to reset that flag to keep track of things.

comment:4 by fingolfin, 19 years ago

Status: newclosed

comment:5 by fingolfin, 19 years ago

Owner: changed from aquadran to fingolfin
Resolution: fixed

comment:6 by digitall, 5 years ago

Component: --Unset--Port: Symbian
Note: See TracTickets for help on using tickets.