godot: Crash when deleting PhysicalBones, and crash when opening file with PhysicalBones
Crash When Opening Editor
Godot version:
3.1 master
-> f12cb82e0f7b3348ab678322cf5e729b38861f1e
OS/device including version: Windows 10 Home x64
Issue description:
When opening a file with PhysicalBone
s, the editor immediately crashes.
Steps to reproduce:
- Try to open this project in the editor: physical-bones-crash.zip
Known working version (ish): c6f09fb97b48903f8d9d8d3b030b3b03d0a87e19
Crash when deleting PhysicalBones
Godot version:
3.1 master
-> f12cb82e0f7b3348ab678322cf5e729b38861f1e
OS/device including version: Windows 10 Home x64
Issue description: When a physical bone is deleted, and using the Bullet physics engine, a memory-related crash seems to happen. Since the time between the deletion and crash appears to be random, this seems to happen during garbage collection cycles.
Steps to reproduce:
- Download physical-bones-crash.zip
- Run the project, wait 5-30 seconds
- Game window crashes, stack trace appears in editor’s console.
However, this happens to me _when I compile master
myself. I cannot reproduce this when using the Unofficial Builds. It would help a lot if someone else could reproduce it too.
Stack trace for me:
CrashHandlerException: Program crashed
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[0] btUnionFind::find (c:\dev\godot\thirdparty\bullet\bulletcollision\collisiondispatch\btunionfind.h:107)
[1] btUnionFind::find (c:\dev\godot\thirdparty\bullet\bulletcollision\collisiondispatch\btunionfind.h:107)
[2] btUnionFind::unite (c:\dev\godot\thirdparty\bullet\bulletcollision\collisiondispatch\btunionfind.h:83)
[3] btDiscreteDynamicsWorld::calculateSimulationIslands (c:\dev\godot\thirdparty\bullet\bulletdynamics\dynamics\btdiscretedynamicsworld.cpp:781)
[4] btDiscreteDynamicsWorld::internalSingleStepSimulation (c:\dev\godot\thirdparty\bullet\bulletdynamics\dynamics\btdiscretedynamicsworld.cpp:500)
[5] btSoftRigidDynamicsWorld::internalSingleStepSimulation (c:\dev\godot\thirdparty\bullet\bulletsoftbody\btsoftrigiddynamicsworld.cpp:97)
[6] btDiscreteDynamicsWorld::stepSimulation (c:\dev\godot\thirdparty\bullet\bulletdynamics\dynamics\btdiscretedynamicsworld.cpp:456)
[7] SpaceBullet::step (c:\dev\godot\modules\bullet\space_bullet.cpp:366)
[8] BulletPhysicsServer::step (c:\dev\godot\modules\bullet\bullet_physics_server.cpp:1561)
[9] Main::iteration (c:\dev\godot\main\main.cpp:1826)
[10] OS_Windows::run (c:\dev\godot\platform\windows\os_windows.cpp:2740)
[11] widechar_main (c:\dev\godot\platform\windows\godot_win.cpp:150)
[12] _main (c:\dev\godot\platform\windows\godot_win.cpp:172)
[13] main (c:\dev\godot\platform\windows\godot_win.cpp:184)
[14] __scrt_common_main_seh (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[15] BaseThreadInitThunk
-- END OF BACKTRACE --
Attaching a debugger just shows invalid memory access (trying to access a freed pointer).
Minimal reproduction project: physical-bones-crash.zip
The project has one character, with physical bones generated for the Skeleton. The character is deleted (queue_free()
) after 1 second. If the character is not deleted, the crash never happens. The crash happens eventually, but not at a reliable point in time.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 27 (25 by maintainers)
For info: I tried opening it with 0bc0baff821512ecd9391771b3abd9aa44c7c1ef and the editor crashed after the splash screen Windows 10 x64
memdelete(joint_data) <- join_data is null
backtrace: [0] memdeletePhysicalBone::JointData (c:\gd\godot\core\os\memory.h:119) [1] PhysicalBone::set_joint_type (c:\gd\godot\scene\3d\physics_body.cpp:2330) [2] MethodBind1<PhysicalBone,enum PhysicalBone::JointType>::call (c:\gd\godot\core\method_bind.gen.inc:815) [3] ClassDB::set_property (c:\gd\godot\core\class_db.cpp:1021) [4] Object::set (c:\gd\godot\core\object.cpp:422) [5] SceneState::instance (c:\gd\godot\scene\resources\packed_scene.cpp:252) [6] PackedScene::instance (c:\gd\godot\scene\resources\packed_scene.cpp:1685) [7] EditorNode::load_scene (c:\gd\godot\editor\editor_node.cpp:2885) [8] EditorNode::_sources_changed (c:\gd\godot\editor\editor_node.cpp:543) [9] MethodBind1<EditorNode,bool>::call (c:\gd\godot\core\method_bind.gen.inc:815) [10] Object::call (c:\gd\godot\core\object.cpp:968) [11] Object::emit_signal (c:\gd\godot\core\object.cpp:1254) [12] Object::emit_signal (c:\gd\godot\core\object.cpp:1311) [13] EditorFileSystem::_notification (c:\gd\godot\editor\editor_file_system.cpp:1090) [14] EditorFileSystem::_notificationv (c:\gd\godot\editor\editor_file_system.h:107) [15] Object::notification (c:\gd\godot\core\object.cpp:980) [16] SceneTree::_notify_group_pause (c:\gd\godot\scene\main\scene_tree.cpp:960) [17] SceneTree::idle (c:\gd\godot\scene\main\scene_tree.cpp:510) [18] Main::iteration (c:\gd\godot\main\main.cpp:1845) [19] OS_Windows::run (c:\gd\godot\platform\windows\os_windows.cpp:2740) [20] widechar_main (c:\gd\godot\platform\windows\godot_win.cpp:150) [21] _main (c:\gd\godot\platform\windows\godot_win.cpp:172) [22] main (c:\gd\godot\platform\windows\godot_win.cpp:184) [23] __scrt_common_main_seh (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283) [24] BaseThreadInitThunk – END OF BACKTRACE –