Memory leak when opening certain place (computer literally shuts down)

Issue: When opening a certain place in roblox studio, my memory usage for roblox studio increases in task manager by about 500-1000MB per second, this eventually halts at 32GB and then my computer shuts down, this is due to the fact i only have 32GB of RAM and there is physically no more ram i can allocate to roblox studio.

So the only way i can enter the place for a short period of time is by keeping task manager open and then force shutting down studio when my memory reaches 24GB
The CPU usage also is 40-50% but i dont think thats as much of an issue as the memory

Note 1: this is a place under a group, and this bug is exclusive to me and not any other devs who join the same place.
Note 2: this bug also only happens in the place im talking about exclusively, and happens just when i open the game to edit it, and also when i play the game… makes no difference
Note 3: its not as if my specs arent good enough, it worked fine prior to when another dev added a new mode into the game (which was about 1-2 days ago so the 2nd or 3rd of july). For reference i have an i5 12600K, rtx 3060 and 32gb of RAM

So obviously like any person would i asked chatgpt what to do:

  1. tried reinstalling roblox studio twice, disabling all plugins and also resetting settings
  2. researched and found some people found setting render to OpenGL to fix these sort of issues, tried this and failed
  3. Set render quality to the lowest level

After this chatgpt told me to save the file to my local PC and open it that way, something interesting happened:

  1. The issue still occured
  2. So then i tried quickly opening the game, and within 20 seconds i deleted everything in replicated storage, server storage, workspace, and all server scripts → this made the memory stop going up:

After this i pressed CTRL+Z to bring everything back, and the memory stayed the same. so it was fixed

However this only worked as a one time fix (had to do it every time i opened the place). Also only worked if i did it really fast, so if i waited 30 seconds and then deleted everything, memory would still increase even though theres nothing in the game anymore.
So then i tried saving the “fixed” version and opening that as a file, this still caused the memory leak

Im not sure if its a corrupted part, or if roblox studio is interpreting something in an incorrect way, but this only happens to me, and not 3 other devs who also edit the game on studio.

Images where each image is captured about a couple seconds after another:
image (1)
image (2)

I will include the .rbxl file in staff-only content as it is quite literally an entire game.

A private message is associated with this bug report

There is a possibility of why it’s causing memory leak. It might be file itself is corrupted or bloated script or plugins.

It’s not the Roblox Studio bug. It is likely YOUR game file is corrupted or bloated. You might need to inspect fully (which one is causing memory leak) or your RAM itself.

Based on your Task Manager. Even it has plenty of space, as soon as you reach 90%, your PC is start using paging file to protect from immediate crash. However you will face significant lag. You need to increase a RAM to allow your Windows to breathe. You need to understand that Windows need some of the RAM to allocate the critical system, software, and drivers.

Recommended RAM usage 70-80% (The Window need some 10-20% of the RAM to keep the Windows running)

When we say paging file or virtual memory. It means your PC is using your storage (SSD) to allocate some of the process. This paging file actually protects your PC from crashing instantly however accessing paging files are MUCH slower than ram.


(Source ChatGPT)

  1. Binary-search the file
  • Make a copy of the .rbxl, open it, delete half the content, save, and test.
  • Keep narrowing down which quarter or eighth of the place causes the leak.
  1. Export assets one-by-one
  • If you suspect a particular model, mesh, or plugin-generated part, export it to a new place and see if memory jumps.
  1. Check for infinite loops or huge data tables
  • Look for scripts that on load might be spawning thousands of parts or storing huge tables in memory.
  1. Use the Experimental “Performance Stats” panel
  • Go to View → Stats → MicroProfiler in Studio (if available) to see which service (e.g. Terrain, DataModel, Workspace) is eating RAM.
  1. Split the place
  • If it truly is too big, break it into multiple smaller places, then use TeleportService or PlaceLink to connect them at runtime.

–
Here’s the example

I have never experienced a memory leak before. This is my screenshot and it never lags even at extreme LOD. The issue is LIKELY YOU,


The reason why it’s not lagging, I have higher RAM and better SSD which allow my PC to optimize the game effectively

Do you have the New Luau Type Solver beta enabled? There have been some rare edge cases with scripts that have caused something similar (though not as dramatic!). I would also focus on narrowing down the element that is causing this leak. You mentioned deleting everything and it stopped - can you get that down to a single script/model/part?

Well I don’t know that feature,. I didn’t enable the New Lua Type Solver beta, I just keep my Roblox Studio on default setting.

Hi, there was some confusions about the place you sent but we can reproduce this now - this is for sure the New Luau Type Solver beta being on. Disable for now for this place, and I’ll forward to the team for a fix.

Hi, thanks for getting back.. I can confirm the New Luau Type Solver beta was the issue, turning it off fixed it!

Another fix I found prior to this which you may find interesting was starting Roblox studio, and setting the Priority of Roblox studio to “Low” in task manager inside the Details tab
after this, open the place and it shouldn’t go beyond 7gb of memory
this however would have to be done every time you want to open the place

Giving it less CPU probably meant the leak was slower (along with everything else). There’s an error with the type solver where it gets in a loop and creates more metadata infinitely on certain language patterns. Once that starts there’s no stopping it until the program shuts down (and even then sometimes you have to kill the task). Once there’s a fix available we’ll respond back here and you could reenable for your place. (There’s for sure benefits to performance and ironically sometimes mem usage having it on).