"CoreScriptMemory" is rising to alarming numbers

After investigating a memory leak in our game for a few weeks (since around mid-late October), we’ve determined that the leak is likely coming from Roblox.

  • LuaHeap rises to 700 MB+ over some amount of time spent in the game (at least an hour).
  • A significant amount of mobile users are crashing due to low memory error.
  • Repeatedly resetting causes FPS to permanently reduce.

From testing, we found that the bulk of LuaHeap is being made up by the CoreScriptMemory.

Image of CoreScriptMemory:

Image of details within CoreScriptMemory:

Image of PlaceScriptMemory (for comparison):

Image of Signals:

Image of LuaHeap:

Game Link: Neighbors 🔊 [Voice Chat & Mic Up] - Roblox

I’ve also included a private file showing the microprofiler

A private message is associated with this bug report

11 Likes

Images from another user show that LuaHeap does seem to rise forever.

2 Likes

What location in the game?
I’m going to test it by keeping the game running on the intro screen and probably by idling in the ‘sandbox’ location.

I assume this talks about ‘Reset Character’ in the Roblox menu. Please correct me if you meant something else.

3 Likes

Any of the locations including Sandbox yes (some players have had high lua heap) but I’m only sure of it in the default location (Neighborhood).

Yes, but we’ve changed the default behavior of the ‘reset character’ button to use :LoadCharacter() in the game.

2 Likes

We have found the location of the memory leak.

Unfortunately, due to upcoming holidays, I cannot guarantee that the fix will be released in December.

6 Likes

Can we change anything in the game to prevent this in the meantime? This has been causing major performance issues, resulting in many (especially mobile) users crashing.

We recommend that you upgrade from legacy chat system to the new one by setting TextChatService.ChatVersion to TextChatService.