4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.81k stars 848 forks source link

Segfault when closing GDIDE with a platformer game opened #76

Closed victorlevasseur closed 9 years ago

victorlevasseur commented 9 years ago

When you close GD with a C++ game using the platformer automatism opened (and being previewed previously), GD crash (it might rather be when the scene is closed).

The backtrace :

Program received signal SIGSEGV, Segmentation fault.
0x650c1a96 in std::_Rb_tree_increment(std::_Rb_tree_node_base*) ()
   from C:\Program Files (x86)\GDevelop\CppPlatform\Extensions\PlatformAutomatis
m.xgdwe
(gdb) bt

#0  0x650c1a96 in std::_Rb_tree_increment(std::_Rb_tree_node_base*) ()
   from C:\Program Files (x86)\GDevelop\CppPlatform\Extensions\PlatformAutomatis
m.xgdwe

#1  0x650c02b8 in ScenePlatformObjectsManager::~ScenePlatformObjectsManager()
    ()
   from C:\Program Files (x86)\GDevelop\CppPlatform\Extensions\PlatformAutomatis
m.xgdwe

#2  0x650813c3 in std::_Rb_tree<RuntimeScene*, std::pair<RuntimeScene* const, Sc
enePlatformObjectsManager>, std::_Select1st<std::pair<RuntimeScene* const, Scene
PlatformObjectsManager> >, std::less<RuntimeScene*>, std::allocator<std::pair<Ru
ntimeScene* const, ScenePlatformObjectsManager> > >::_M_erase ()
   from C:\Program Files (x86)\GDevelop\CppPlatform\Extensions\PlatformAutomatis
m.xgdwe

#3  0x650e88fd in Extension::SceneUnloaded(RuntimeScene&) ()
   from C:\Program Files (x86)\GDevelop\CppPlatform\Extensions\PlatformAutomatis
m.xgdwe

#4  0x05d27924 in RuntimeScene::~RuntimeScene() ()
   from C:\Program Files (x86)\GDevelop\GDCpp.dll

#5  0x05e110b3 in CppLayoutPreviewer::~CppLayoutPreviewer() ()
   from C:\Program Files (x86)\GDevelop\GDCpp.dll

#6  0x05e11262 in CppLayoutPreviewer::~CppLayoutPreviewer() ()
   from C:\Program Files (x86)\GDevelop\GDCpp.dll

#7  0x66f8713f in std::_Rb_tree<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>
, std::allocator<char> > const, boost::shared_ptr<gd::LayoutEditorPreviewer> >,
std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::a
llocator<char> > const, boost::shared_ptr<gd::LayoutEditorPreviewer> > >, std::l
ess<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, st
d::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allo
cator<char> > const, boost::shared_ptr<gd::LayoutEditorPreviewer> > > >::_M_eras
e(std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, s
td::allocator<char> > const, boost::shared_ptr<gd::LayoutEditorPreviewer> > >*)
() from C:\Program Files (x86)\GDevelop\GDCore.dll

#8  0x66d41a73 in gd::LayoutEditorCanvas::~LayoutEditorCanvas() ()
   from C:\Program Files (x86)\GDevelop\GDCore.dll

#9  0x66d41e82 in gd::LayoutEditorCanvas::~LayoutEditorCanvas() ()
   from C:\Program Files (x86)\GDevelop\GDCore.dll

#10 0x05393249 in wxWindowBase::Destroy() ()
   from C:\Program Files (x86)\GDevelop\wxmsw295u_core_gcc_custom.dll
4ian commented 9 years ago

Looks like it was related to #77, so it was surely fixed by https://github.com/4ian/GD/commit/48b5c8aa4296e1b2f3c942ee68a53fa22cfba671

Could you let me know if it's ok? :)

victorlevasseur commented 9 years ago

It's working fine. ;)