OGGSOUND_THREADMODE :the crash at OgreOggSoundManager::init

woodshow

21-03-2011 03:29:35

when OgreOggSoundManager work at multi-thread mode will cause the crash;
Because the mActionsList and mDelayedActionsList created after the OgreOggSoundManager::threadUpdate,
so when the update thread running and the actions list hasn't create yet,that will cause crash.

reslove:
before the threadUpdate creating the mActionsList and mDelayedActionsList

bug info
version:1.2
file:OgreOggSoundManager
func:init
line: about 373

stickymango

21-03-2011 11:42:50

That shouldn't happen as there's a check for NULL wherever the lists are referenced, they're initialised to (0) in the constructor, its nothing I've ever come across yet either.. :?

woodshow

22-03-2011 03:59:37

That shouldn't happen as there's a check for NULL wherever the lists are referenced, they're initialised to (0) in the constructor, its nothing I've ever come across yet either.. :?

the code location:
void OgreOggSoundManager::_processQueuedSounds()
{
if ( !mActionsList ) return;
...

// Maximum 5 requests per frame
while ( ((i++)<5) && mDelayedActionsList->pop(act) )<----here mDelayedActionsList will NULL at multi-Thread mode,because mActionsList allocate after the threadUpdate, when the crash happened,my debug stack point to here, it's null

stickymango

22-03-2011 09:37:17

Hmmm,

There's a synchronisation issue between the SVN and the .zip releases here, that bug and a few others have been fixed already and were available vis SVN, I've now synchronised the .zip file so you should be able to re-download the lib and check the new code.. :twisted: