Help making sense of this crashdump?

My game occassionally, randomly crashes. It’s pretty rare, so I haven’t been able to narrow down any repro steps but it does happen both when running from the editor or a native build.

I’ve mostly ignored it so far because 1: it’s pretty infrequent and 2: the console doesn’t print out anything I can make sense of. e.g.:

INFO:CRASH: Successfully wrote Crashdump to file: /Users/greay/Library/Application Support/Defold/_crash
ERROR:CRASH: CALL STACK:

# 0 pc     0x30bd7d libxpc.dylib _sigtramp+29
# 1 pc     0x1d34b5 dmengine lj_cont_dispatch+52
# 2 pc     0x1ebd62 dmengine lua_pcall+146
# 3 pc     0x1b6ca1 dmengine _ZN8dmScriptL13PCallInternalEP9lua_Stateiii+81
# 4 pc     0x2bd85f dmengine _ZN5dmGui9RunScriptEPNS_5SceneENS_14ScriptFunctionEiPv+2511
# 5 pc      0xc9f9f dmengine _ZN12dmGameSystemL16CompGuiOnMessageERKN12dmGameObject24ComponentOnMessageParamsE+79
# 6 pc      0xa0577 dmengine _ZN12dmGameObject24DispatchMessagesFunctionEPN9dmMessage7MessageEPv+2199
# 7 pc     0x2896ad dmengine _ZN9dmMessage16InternalDispatchEyPFvPNS_7MessageEPvES2_b+669
# 8 pc      0xa1cbc dmengine _ZN12dmGameObjectL16DispatchMessagesEPNS_10CollectionEPyj+204
# 9 pc      0xa2aaf dmengine _ZN12dmGameObject6UpdateEPNS_16CollectionHandleEPKNS_13UpdateContextE+719
#10 pc      0xc3acb dmengine _ZN12dmGameSystem25CompCollectionProxyUpdateERKN12dmGameObject22ComponentsUpdateParamsERNS0_22ComponentsUpdateResultE+539
#11 pc      0xa2a5f dmengine _ZN12dmGameObject6UpdateEPNS_16CollectionHandleEPKNS_13UpdateContextE+639
#12 pc      0x4c1f3 dmengine _ZN8dmEngine4StepEPNS_6EngineE+1027
#13 pc      0x4ca0a dmengine _Z14dmEngineUpdatePN8dmEngine6EngineE+26
#14 pc      0x4d51d dmengine _ZN8dmEngine7RunLoopEPKNS_13RunLoopParamsE+109
#15 pc      0x4d482 dmengine _Z11engine_mainiPPc+98

The c++ symbols are “mangled” when the executable is built.
Demangling would make it slightly more readable, but it’s plenty readable already.
You read the frame numbers to the left, #0 is the most recent function call, #15 is the first one.
E.g.
on frame #5, you see that we make a call to dmGameSystem::CompGuiOnMessage(), which then led to an assert inside LuaJIT (the prefix “lj_” is a telltale sign of a LuaJIT function).

And for the lua_pcall to assert inside the VM, it would have to be something exceptional.
I’m wondering if the gui has been deleted before the call to the OnMessage function.

With the gui in mind, perhaps you can narrow down the steps to reproduce the crash more frequently. It would be great if we could get a small project where this issue occurs.

1 Like