Desktop game crashes when saving

RKL Design

  • *
  • Posts: 5
The game crashes on the desktop export everytime it attempts to save.  I normally have the save function right before a scene transition, or on a confirm action button but no matter where I move it the game crashes. It seems to work fine on flash but crashes in desktop.

Has anybody else run into this issue? Am I messing up somewhere?
I attached my logs.

Thanks in advance for any help.

Justin

  • *
  • Posts: 3932
If you run the game in debug mode in 3.5, you should get more information related to the crash.
For normal testing and for 3.4, here's a guide that can help.

http://community.stencyl.com/index.php?topic=49211.msg272307#msg272307

For Live Support: Join our discord channel and ping me @justin.

rob1221

  • *
  • Posts: 9121
Quote
Cannot add listener function to null region
I don't remember which event this error is for, but the region needs to be set either by default or in "when created" else the event won't work.  If it's a region created later in the game, you'll have to change your code to not use that event.

Quote
Warning: Behavior does not exist - Simple Minimap
I'm not sure if this causes any problems for your game but it's the only other notable error I see.

RKL Design

  • *
  • Posts: 5
I think I did this right. I ran the game in debug Desktop/Mac/Linux, then exported the logs.

Quote
I don't remember which event this error is for, but the region needs to be set either by default or in "when created" else the event won't work.  If it's a region created later in the game, you'll have to change your code to not use that event.
I turned off everything in that behavior but I think the null region error still pops up. Do you have any links or info I could read over to figure out what's causing it?

rob1221

  • *
  • Posts: 9121
Quote
Error in scripts.Design_365_365_Shop: Cannot add listener function to null region.

RKL Design

  • *
  • Posts: 5
Update: I've tested the game on my laptop as well and the same thing happens. When trying to save the program crashes.

I've also just tested a very old version of the game that didn't have any of the behaviors the null regions are referring to.  Still crashes when trying to save. Here are the logs from that version.

Justin

  • *
  • Posts: 3932
Please refer to my post. It's the most direct way to pinpoint exactly why your game is crashing.

For Live Support: Join our discord channel and ping me @justin.

RKL Design

  • *
  • Posts: 5
I ran the game through Visual Studio 2015, game crashes.

First I get:  Unhandled exception at 0x01CDC86B in Airlock_321.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x008C2F60).

This is the next line of code that the program would run but I've actually gotten a different result every single time I've run the program but I've gotten a line that looks like this a couple times.

HX_STACK_FRAME("haxe.Serializer","serialize",0x3cea866c,"haxe.Serializer.serialize","C:\\Program Files (x86)\\Stencyl\\plaf\\haxe\\std/haxe/Serializer.hx",227,0x9f72c445)

When I click stopped at Exception a link that says Go to source code appears under it for a split second then I get an error above that says "The Diagnostic tools failed unexpectedly. The Diagnostic Hub output in the Output window may contain additional information. "

I also copy pasted the Call Stack and Miscellaneous Files, not sure if that helps. I'm pretty clueless at deciphering this stuff.





Justin

  • *
  • Posts: 3932
Code: [Select]
Airlock_321.exe!haxe::Serializer_obj::serialize(Dynamic v) Line 1026 C++
  Airlock_321.exe!haxe::Serializer_obj::serializeFields(Dynamic v) Line 282 C++
  Airlock_321.exe!haxe::Serializer_obj::serialize(Dynamic v) Line 1026 C++
  Airlock_321.exe!haxe::Serializer_obj::serializeFields(Dynamic v) Line 282 C++
  Airlock_321.exe!haxe::Serializer_obj::serialize(Dynamic v) Line 1026 C++
  Airlock_321.exe!haxe::Serializer_obj::serialize(Dynamic v) Line 536 C++
  Airlock_321.exe!haxe::Serializer_obj::serializeFields(Dynamic v) Line 282 C++
  Airlock_321.exe!haxe::Serializer_obj::serialize(Dynamic v) Line 1116 C++
  Airlock_321.exe!haxe::Serializer_obj::run(Dynamic v) Line 1289 C++

It keeps on repeating the same lines at the top until the end, so it's highly likely that the stack overflow here is caused by a circular object reference being serialized. In other words, some object is referring back to itself somehow, and that object is being saved. For example, if you placed a map inside itself as one of the values, this could happen.

If this gives you an idea of where the problem is but you're still not sure, feel free to share some of your code. If you're still completely lost, you can send me your game and I can find the problem for you.

For Live Support: Join our discord channel and ping me @justin.