Hello, Defolders!
Recently, I started observing engine crashes in a large Defold 1.10.4 project with the following error:
dmengine: ../src/gameobject/gameobject.cpp:3208: Result dmGameObject::SetParent(HInstance, HInstance): Assertion `parent->m_Depth == first_child->m_Depth - 1' failed.
The assertion is made here.
I’m unsure what exactly triggers the crash, but sooner or later it happened every session out of a couple dozen attempts (on Linux/Windows/HTML5, both in debug and release builds). This assertion exists in Defold since 2011 yet I couldn’t find any references to this problem which is rather weird to me.
Am I correct in assuming that this most likely is an engine bug? How could this invariant be broken from a Lua-script side? Are there some undocumented caveats when using `go.set_parent`, which could lead to this?
Any help would be much appreciated!