scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.43k stars 3.51k forks source link

Very bad memory leak in larger projects. #9585

Open MeowieGamer opened 5 months ago

MeowieGamer commented 5 months ago

Expected Behavior

The project (in my case, Meowzie's Adventure 3) should run under 4gb of ram without any issue, as the game files itself do not exceed 400mb.

Actual Behavior

The game uses an infinite amount of memory over a period of time. It gradually increases the longer you leave the game running. This applies to any large scratch project, and this issue is not new.

Steps to Reproduce

Load up any large scratch project, usually one that's complex, has a large amount of sprites, and those sprites changing costumes frequently. (Doesn't have to be all the sprites, just a few of them can trigger this issue.) It's also more easy to occur when there's lots of code in every sprite.

From there, leave the project running for about 10 minutes, and you will see your memory usage spike.

System Details

If the problem occurs in the browser, please provide operating system and browser e.g. Mac OS 10.11.6 Safari 10.0 This will occur on any browser, on any operating system, but for my case, I have

Arch Linux, Linux Kernel 6.8.5-arch1-1, Firefox 124.0.2 or Chromium 124.0.6367.60

I was using the turbowarp editor, but I can confirm this issue happens on vanilla scratch as well. Screenshots The first screenshot is after 5 minutes of running the project The second screenshot is after 10 minutes of running the project. Screenshot_20240417_175248 Screenshot_20240417_180047

dumorando commented 3 months ago

This may be an issue with Turbowarp cause scratch and tw have major differences in runtimes