Editor Keeps crashing when trying to run the game

I’m using the most current version 5.1.147. When I press play, the editor will try loading for a bit and then crash before failing to display a preview. This happens at random but I’ve noticed happening a lot in this version of GDevelop. Sometimes when I open up the app again, I’ll get an error message saying the files are malformed or something along those lines. I save often, but I can’t be saving after every line that I add. Anyone else running into this?

Hi @Zuber, could you run the game with developer tools on in the editor (either ctrl+shift+i, or from the view menu along the top of the editor)? Click on the console tab of the panel that pops up, and report back with any errors that occur when you preview your game?

I tried that and the result was the same as before.

So after messing around with the editor some more I’ve nailed down what’s breaking. Pretty much any time I run the game without first saving, the editor crashes. If I save before I run it, it’ll run. I hope that helps you guys look into the bug a bit more.

Hi @MrMen, at this point I have tried everything I can think of. Also, the editor no longer runs my game. It’ll either crash or freeze with the same error message. It says that the error is reported, can someone access it and let me know what it says?
This is a big problem for me, I’ve been working on this game for over a year and half. Any and all help would be appreciated.

Unfortunately, I’m not familiar with these kinds of issues. There are only a few things I can suggest:

In your screen shot you don’t have the developer tools open. Does that close automatically when you preview the game? Open it before you preview.

Did you click on the “Report the Issue on GitHub” button?

Does it happen if you downgrade GDevelop?

When I have the debugger open, it will freeze and I have to force quit GDevelop. Yes I did click the report button. I was searching for previous versions of GDevelop but did not figure out how to downgrade.

I downgraded to 5.1.147 and the same thing happened.

Try this if you have in your game folder a file .autosave, rename your current game.json file to other name like backupgame.json then rename the game.autosave to game.json an try to run that file, note that the last changes of the main game file maybe are not present in the autosaved.

If none of that work open the game.json in Notepadd++ and try to find some event that can be failling.

I’ll give that a try. For reference, the error reported to github is:
RuntimeError: table index is out of bounds