TurboWarp/desktop

Memory issues

hamster6421 opened this issue · 10 comments

My game, which I've been working on for two years, has issues where after playing the game for a while, it runs out of memory and it crashes (this is in the packaged version). It seems that there's a small increase in memory usage every time a new level is loaded, but the usage builds up over time and old assets are never unloaded and it eventually crashes. I've been trying to fix this for around a month and at this point, I've basically already tried everything I can think of to fix the issue, and it helped a little, but nothing has fixed the overall issue. Do you know of any way to fix this?

Also, I do have a good computer (16 GB RAM), and the project is about 340 MB.

what are you using to load levels? an extension?

I guess you wouldn't need an extension to see that either, just loading costumes, yes once loaded they currently never get properly unloaded

So do you know a way for me to make my game crash less?

I also work on this game. My computer has 32GB of ram, and even still, the project can manage to crash it. We're unable to count the game "finished" until this memory leak is resolved (which, at the moment, might be never, which sucks because we've put our heart and soul into the game.)

I have screenshots of the issue below.
The first is after 5 minutes of gameplay. The second is after 10 minutes.
Screenshot_20240417_175248
Screenshot_20240417_180047

I also am part of Meowie Games, and just having the game open for a few minutes, my memory already went from 11.6 GB to 15.2 Will update if crashes.
Edit: 16 GB now as of 15 minutes after original message

@GarboMuffin That'd probably make a good extension idea, using a block to load/unload sprites, costumes and sounds, though it'd be really difficult to get something like that somehow working.

I also am part of Meowie Games, and just having the game open for a few minutes, my memory already went from 11.6 GB to 15.2 Will update if crashes. Edit: 16 GB now as of 15 minutes after original message

By leaving the green flag on idle? or just having turbowarp open in that project and not touching it.

I also am part of Meowie Games, and just having the game open for a few minutes, my memory already went from 11.6 GB to 15.2 Will update if crashes. Edit: 16 GB now as of 15 minutes after original message

By leaving the green flag on idle? or just having turbowarp open in that project and not touching it.

In my case, I just played the game as usual.

I think it might have to do with the project player converting the svg's into regular images, but for some reason it doesn't get correctly deleted when it has been edited or when it has to be rerendered when you go in and out of fullscreen and ends up just staying in memory and not being cleaned out, which would explain why Turbowarp slowly takes up more RAM and ends up getting laggy expecially when doing anything with the poject player.

Same issue for me. This destroys my CPU to almost 100% after some minutes spent in the Turbowarp desktop app. This happens sometimes when I am not even doing anything with the project stopped (after I have loaded my relatively large project)