dzeligman
31-01-2010 18:43:03
I get this error consistently and I have no idea why.
When I exit my program and the OggSoundManager is doing its cleanup and shutting down it tries to delete parameters of an object that don't exist.
(I'm using the boost threads).
obj.mParams is a uninitialized local variable that gets the value of 0xcccccccc after the mActionList->pop(obj) method.
Thus when it tries to stet the stream to null on the params variable it throws an exception.
In my handling of the manager in the game I currently only do the following tasks: I create/add sounds to the manager. I pause,stop,play them (I never delete/remove them). I leave the removal to the manager.
I'm also loading the manager as a plugin. I do not "new" it anywhere.
When I exit my program and the OggSoundManager is doing its cleanup and shutting down it tries to delete parameters of an object that don't exist.
if ( mActionsList )
{
SoundAction obj;
// Clear out action list
while (mActionsList->pop(obj))
{
// If parameters specified delete structure
if (obj.mParams)
{
cSound* params = static_cast<cSound*>(obj.mParams);
params->mStream.setNull();
OGRE_FREE(params, Ogre::MEMCATEGORY_GENERAL);
}
}
delete mActionsList;
}(I'm using the boost threads).
obj.mParams is a uninitialized local variable that gets the value of 0xcccccccc after the mActionList->pop(obj) method.
Thus when it tries to stet the stream to null on the params variable it throws an exception.
In my handling of the manager in the game I currently only do the following tasks: I create/add sounds to the manager. I pause,stop,play them (I never delete/remove them). I leave the removal to the manager.
I'm also loading the manager as a plugin. I do not "new" it anywhere.