Opened 20 years ago

Closed 20 years ago

Last modified 6 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, 20 years ago

Owner: changed from sev- to aquadran

comment:2 by fingolfin, 20 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, 20 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, 20 years ago

Status: newclosed

comment:5 by fingolfin, 20 years ago

Owner: changed from aquadran to fingolfin
Resolution: fixed

comment:6 by digitall, 6 years ago

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