• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker game crashes sometimes while changing rooms

Didjargo

Member
I'm working on a game and on very rare occasion the game will crash with no error report when going from one room to another (as if I exited the run normally). It happens so infrequently that I cannot figure out what condition causes it. I have done tests where I move between a bunch of rooms dozens of times and everything works fine, but maybe like less than 1% of the time going to a different room causes the game to shut down. Does anyone know what might cause this? Just want to see if this is a common problem before I spend untold time and effort debugging.
 

Relic

Member
Crashing this way with no error report and that it is not all that common/reproducible makes it very hard to pinpoint the issue.

I would create a system to log just how far the code gets before it crashes. Create a script that will open a text file and add in some details during the room change events (room end, room start, cleanup). Perhaps just record what the object is, that it has started its room end event and when it finishes its room end event. Hopefully next time it crashes you can open the file and see what was the last record - hoping it will show a block of code started but never finished.
 
Top