My game runs flawlessly on AIR target (which is my test target), but crashes randomly when I run it on windows target.
When the crash happens Windows gives me the option to debug it in Visual Studio and it’s always the same error on the very same line, here is a screenshot :
my system’s language is french, the error message means “unhandled exception at 0x… in SuperAgency.exe : 0x… access violation while reading location 0x…”
I never touched c++ so I understand that it’s something about garbage collection, but I’m lost.
When I look at the local vars, inside __inCtx.marking.stack I see a bunch of Starling images and some matrixes but I have no idea what it means : are those objects about to be garbage-collected or something ?
I have a demo mode where the game runs on its own : it loads an arena, the AI characters fights to death, then everything gets cleared / pooled, then it loads an arena again etc rinse repeat.
On AIR I can have this demo mode running for hours but on windows target it will end up crashing randomly : it can crash after 4 fights or 15+ fights, there doesn’t seem to be any “rule”. The point at which it crashes also looks random : it can happen at any point during the fight.
Lately I put a lot of efforts hunting the slightest memory leak, and most of the objects are pooled. The game uses openFL, Starling, dragonbones, msignal, Actuate, StablexUI, firetongue and crashdumper (which fails at catching the crash)
Any help with this would be very welcome : is there a way to get more info about the crash ? Any tip or advice about what I should do to solve it ?
Thanks a lot !