GUI: Crash on exit
|Reported by:||lordhoto||Owned by:||SF/tanoku|
I had an (sadly not reproduce able) problem with our GUI code. When I exited (from within kyra, but I tried to check valgrind, no invalid memory writes when I played through the same part of the game again) I got an segmentation fault. Here is the backtrace:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fb0a11426f0 (LWP 9744)] 0x00007fb09f060055 in free () from /lib/libc.so.6 (gdb) bt #0 0x00007fb09f060055 in free () from /lib/libc.so.6 #1 0x0000000000ad951b in Common::String::decRefCount (this=0x2371ca8, oldRefCount=0x1fbf810) at common/str.cpp:217 #2 0x0000000000ad95db in ~String (this=0x2371ca8) at common/str.cpp:119 #3 0x00000000005553c2 in ~Node (this=0x2371ca8) at ./common/hashmap.h:72 #4 0x0000000000555745 in Common::ObjectPool<Common::HashMap<Common::String, int, Common::Hash<Common::String>, Common::EqualTo<Common::String> >::Node, 10ul>::deleteChunk (this=0x2371b30, ptr=0x2371ca8) at ./common/memorypool.h:94 #5 0x0000000000555771 in Common::HashMap<Common::String, int, Common::Hash<Common::String>, Common::EqualTo<Common::String> >::freeNode ( this=0x2371b30, node=0x2371ca8) at ./common/hashmap.h:101 #6 0x0000000000a1fe2f in Common::HashMap<Common::String, int, Common::Hash<Common::String>, Common::EqualTo<Common::String> >::clear ( this=0x2371b30, shrinkArray=false) at ./common/hashmap.h:339 #7 0x0000000000a1e890 in GUI::ThemeEval::reset (this=0x2371b30) at gui/ThemeEval.cpp:44 #8 0x0000000000a198eb in GUI::ThemeEngine::unloadTheme (this=0x20728d0) at gui/ThemeEngine.cpp:654 #9 0x0000000000a1a604 in ~ThemeEngine (this=0x20728d0) at gui/ThemeEngine.cpp:296 #10 0x00000000009f78ff in ~GuiManager (this=0x2072030) at gui/GuiManager.cpp:79 #11 0x000000000040e9c0 in Common::Singleton<GUI::GuiManager>::destroyInstance () at ./common/singleton.h:61 #12 0x000000000040e9d6 in Common::Singleton<GUI::GuiManager>::destroy () at ./common/singleton.h:81 #13 0x000000000040e7f1 in scummvm_main (argc=4, argv=0x7fffa9168038) at base/main.cpp:354 #14 0x000000000040b1f7 in main (argc=4, argv=0x7fffa9168038) at backends/platform/sdl/main.cpp:108
I sadly have the fear that it might be related to somehow corrupted memory. As a side note I was also able to crash the GUI when exiting the debugger today, but sadly I don't have any backtrace for that one.
Ticket imported from: #2609755. Ticket imported from: bugs/4173.