GDevelop crashes and JSON file corrupts when duplicating nested event too many times

The event I try copy and pasting dozens of times looks like this.

And when open it looks like this…

The ‘Inventory Slot = 1, 2, 3, 4’ repeats 30 times (as that is the number of inventory slots I have).

The ‘Include events from inventory_slot_counter’ looks like this…

GDevelop crashes after I’ve copied and pasted it usually between 20-50 times. Then usually the file corrupts. Sometimes I’m able to open it anyway, sometimes I have to revert to the autosave, and sometimes I have to use one of the separate versions I’ve saved as a backup. When the file corrupts, the JSON file is empty when viewed in a text editor.

It has crashed when I’ve performed a number of different actions like: saving with (cmd+s on mac) or through the menu, clicking on “xname” or “!x” to to modify the text and hitting enter, using find and replace and hitting enter, or just copying and pasting.

The current JSON file size is 20.3MB. The nested event adds about 900KB to the file, so when I copy and paste it 20+ times the file size doubles. (Not sure if that’s important, but I do notice it takes longer to save the more times I add this nested event).

NOTE: The “!x”, “_Ball”, and “xname” are just placeholders I’ve used for copying and pasting. I use find and replace to change them each time I’ve added the new nested event.

Thanks for reporting!
Please confirm which version of GDevelop you’re running (you should find that in Help/About) and your operating system.

What do you mean exactly by “crash”?
Does GDevelop hang indefinitely, does it close, do you get an error message…?

Either way, as it was explained to you on your topic, you shouldn’t proceed like that. If there’s anything you need to copy paste more than once, there’s usually a better way to do it. :slight_smile:

Sure thing! GDevelop 5.0.0-beta106, and macOS Mojave.

When it crashes, the entire screen turns white with no error message (freezes). Then I close it. When reopening GDevelop there’s a prompt that says the file is corrupted and suggests to use the autosave version. I do that and the file is loaded. When the autosave crashes, I have to refer to a backup save.

I’m going to try a few other methods today.

What’s usually a good size for a GDevelop project in MB if the target is mobile devices? A quick search says the avg. iOS game size is 18.5MB to 67.7MB. Would a GDevelop project that’s 30MB export to a 30MB Android app, or is there some kind of compression that reduces the file size?

an exported app is actually bigger then the project folder.

Thanks for the heads up. I’ll have to keep that in mind :sweat_smile:
I haven’t exported a single project yet, so I’ll anticipate having to refactor this one.

Thanks for the details.
Next time the screen turns white, wait a couple of minutes to see if it fixes itself, maybe it’s just taking time to process a large request.

Some builds are larger than others. I think the Android builds are okay, but the Windows builds have a minimum size of around 50MB I think, even if your project is 1MB.

Same seems to be true for android

Hmm, you sure? I see some 1MB APKs on my drive.

I was exporting the platformer example couple of days ago to try out closing the app, using JavaScript.
It was more then 50 mb