Random crashes when switching/spawning/deleting actors
CuriousMike56 opened this issue · comments
Issue ticket for the random crashes that occur when spawning/deleting/switching actors, originally brought up by @tritonas00 in #development on Discord. Related PR: #3042
I'm able to consistently reproduce this by loading Windmill Mountain and switching to the first "Wind Engine Tower" on the vehicle list, the game will crash a few seconds after. Oddly enough, attempting to load that terrain with a Debug build crashes with:
(still not sure of the correct way to share VS back traces)
Release build back trace after switching to the wind tower actor:
Screenshots of VisualStudio are excellent, thanks. There are also "dumps" and "minidumps" which are basically snapshots of the whole debugging session, including the crash - but we don't need that much.
- Debug crash looks like some OGRE/PagedGeometry caveat. UPDATE: I couldn't get the full backtrace but RoR.log shows the problem:
06:30:43: Ogre::InvalidParametersException::InvalidParametersException: Tree scale out of range in TreeLoader::addTree() at C:\Users\Petr\.conan2\p\t\ogre3d4ca0324757de\b\source\TreeLoader2D.cpp (line 82)
. UPDATE2: This is the culprit - a DEBUG-only check: https://github.com/OGRECave/ogre-pagedgeometry/blob/master/source/TreeLoader2D.cpp#L82 - I faintly recall I've had dealings with this line of code before. - Release crash is nasty - stack overflow - somehow I managed to create endless loop. It's at soundscript cleanup so I suspect #3027
I fixed the Debug crash but I couldn't reproduce the Release crash.
I do get a crash when I remove the Wind Tower actor (both Debug and Release), but that's caused by a hook holding pointer to DISPOSED actor. I also fixed that.