[ scummvm-Bugs-3121841 ] SCUMMVM: Crash on exit

SourceForge.net noreply at sourceforge.net
Mon Nov 29 00:05:36 CET 2010


Bugs item #3121841, was opened at 2010-11-28 18:05
Message generated for change (Tracker Item Submitted) made by littleboy
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=3121841&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Unknown Crash/Other
Group: Unknown
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Julien (littleboy)
Assigned to: Nobody/Anonymous (nobody)
Summary: SCUMMVM: Crash on exit

Initial Comment:
Since the opengl branch merge, ScummVM crashes on exit.

The EventManager is deleted in ModularBackend before the GraphicManager (and the pointer not set to NULL), so in the SdlGraphicManager, the call to the eventManager makes it crash.

scummvm.exe!Common::EventDispatcher::unregisterObserver(Common::EventObserver * obs)  Line 119 + 0x8 bytes	C++
scummvm.exe!SdlGraphicsManager::~SdlGraphicsManager()  Line 204	C++
scummvm.exe!SdlGraphicsManager::`scalar deleting destructor'()  + 0x2b bytes	C++
scummvm.exe!ModularBackend::~ModularBackend()  Line 44 + 0x37 bytes	C++
scummvm.exe!OSystem_SDL::~OSystem_SDL()  Line 97 + 0x8 bytes	C++
scummvm.exe!OSystem_Win32::~OSystem_Win32()  + 0x2b bytes	C++
scummvm.exe!OSystem_Win32::`scalar deleting destructor'()  + 0x2b bytes	C++
scummvm.exe!SDL_main(int argc, char * * argv)  Line 61 + 0x36 bytes	C++
scummvm.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, HINSTANCE__ * __formal, HINSTANCE__ * __formal)  Line 42 + 0x12 bytes	C++
scummvm.exe!__tmainCRTStartup()  Line 275 + 0x2c bytes	C
scummvm.exe!WinMainCRTStartup()  Line 189	C
kernel32.dll!75923677() 	
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	
ntdll.dll!77c19d42() 	
ntdll.dll!77c19d15() 	

Swapping the two delete calls in ModularBackend destructor seems to fix it for me.

Erik Torbjorn seems to have the same problem and had to do one more step to get rid of the valgrind warnings:
"The shortest set of changes I can find that gets rid of the Valgrind warnings is to swap the order of "delete _eventManager;" and "delete _graphicsManager;" i ModularBackend::~ModularBackend(), and remove SDL_Quit() from OSystem_SDL::~OSystem_SDL(). But that last one doesn't feel right."


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=3121841&group_id=37116




More information about the Scummvm-tracker mailing list