Opened 15 years ago

Closed 15 years ago

Last modified 9 months 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
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 Changed 15 years ago by fingolfin

Owner: changed from sev- to aquadran

comment:2 Changed 15 years ago by fingolfin

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 Changed 15 years ago by anotherguest

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 Changed 15 years ago by fingolfin

Status: newclosed

comment:5 Changed 15 years ago by fingolfin

Owner: changed from aquadran to fingolfin
Resolution: fixed

comment:6 Changed 9 months ago by digitall

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