Page MenuHome

BGE KX_Scene.addObject() crash
Closed, ResolvedPublic

Description

System Information
Windows 10

Blender Version
Broken: 2.77
Worked: ?

Short description of error
When the BGE yields control to a python script, and KX_Scene.addObject() is called, Blender/Blenderplayer crashes due to an access violation.

Exact steps for others to reproduce the error
Open the attached .blend and start the game engine. Blender will immediately crash.


This blend makes use the BGE's ability to give python control of the main loop (see scene properties), and this crash only occurs when this is the case. Calling KX_Scene.addObject from a python controller node works as expected.

Revisions and Commits

Event Timeline

I confirm this crash on blender 2.77a (Arch linux intel i915). Here is /tmp/crash.txt :

# Blender 2.77 (sub 0), Commit date: 2016-04-05 18:12, Hash abf6f08

# backtrace
blender(BLI_system_backtrace+0x30) [0x1366040]
blender() [0x9e1f39]
/usr/lib/libc.so.6(+0x33330) [0x7f290777e330]
blender(_ZN16SCA_LogicManager19GetGameObjectByNameERK10STR_String+0x41) [0x15f9111]
blender(_Z25ConvertPythonToGameObjectP7_objectPP13KX_GameObjectbPKc+0x16d) [0x158c12d]
blender(_ZN8KX_Scene11PyaddObjectEP7_objectS1_+0x68) [0x15b3f68]
/usr/lib/libpython3.5m.so.1.0(PyCFunction_Call+0xc9) [0x7f29127fb5e9]
/usr/lib/libpython3.5m.so.1.0(PyEval_EvalFrameEx+0x7e71) [0x7f29128735f1]
/usr/lib/libpython3.5m.so.1.0(+0x1289e2) [0x7f29128749e2]
/usr/lib/libpython3.5m.so.1.0(PyEval_EvalCodeEx+0x23) [0x7f2912874ac3]
/usr/lib/libpython3.5m.so.1.0(PyEval_EvalCode+0x1b) [0x7f2912874aeb]
/usr/lib/libpython3.5m.so.1.0(+0x147c64) [0x7f2912893c64]
/usr/lib/libpython3.5m.so.1.0(PyRun_StringFlags+0x74) [0x7f29128955e4]
/usr/lib/libpython3.5m.so.1.0(PyRun_SimpleStringFlags+0x3b) [0x7f291289564b]
blender(StartKetsjiShell+0xa8a) [0x15141ba]
blender() [0xad65f0]
blender() [0x9eb64f]
blender() [0x9ec90d]
blender() [0x9eccd9]
blender() [0x9ed198]
blender(wm_event_do_handlers+0x3d6) [0x9ed6a6]
blender(WM_main+0x18) [0x9e4988]
blender(main+0xf20) [0x9c1c80]
/usr/lib/libc.so.6(__libc_start_main+0xf0) [0x7f290776b710]
blender(_start+0x29) [0x9e1999]