Hello people on this forum.
I recently started a new project on gdevelop. At first everything worked, but know I cant preview the project. When I click on preview it loads normally for like 2 seconds, with the bar filling up. But after that it the bar goes away and it just freezes. If tried using different a device but that wont work either. Other projects work fine so that cant be it.
I really don’t know what to do.
please upload a screenshot
It stays like this forever
Do you have any events that may take a long time to process or do you have any While events which can sometimes create infinite loops.
I do have a while event. But I haven’t got the chance to see if it works cuz it crashes.
It looks like its the while. There’s nothing to change the animation condition to false so it’s stuck in an endless loop.
Note: waits don’t work inside loops. The time is updated in between frames.
The error is probably some form of out of memory or stack overflow.
Yeah it was the while.
I was trying to make it shoot infinet for early testing before I made it so it only shoots when it is … tiles away. But it looks like I have to do that now.
Anyway thank you for taking your time to help me.
1 Like
You’re welcome. I think we’ve all been stung by the while event. It should come with a warning label or a failsafe that would detect when it’s stuck in a loop. I’m not sure if the crash was the looping or the buildup of the waits. Since they can’t expire in the loop, it would’ve been adding a lot of waits. It would normally be 60 frames a second but when it’s inside a frame repeating the same few events it would build up at Mach 5.