Opening a script: studio crashes

Some of my scripts now cause studio to have a memory leak and crash instantly upon opening the script, im assuming this has something to do with the new script editor…

image

TestWhy.rbxl (23.7 KB)

Repo place:
-Open Poly in Workspace
-Studio Crashes

Started happening this morning.

9 Likes

I tried opening your place, and opening the module made my PC freeze. I don’t know what is it, but maybe you could’ve used some malicius Plug-in that’s getting you this problem. Try checking your plug-in list and check the author.

2 Likes

This has nothing to do with plugins

4 Likes

I can confirm this happening, just tried out your file.

Copy and pasting the source into another script doesn’t crash you this is very weird, but indeed the Poly ModuleScript does crash you.

I have other scripts that also crash you, maybe il make more repo scripts. How did you manage to copy the source before it crashing studio? Also thats very odd that it wouldnt crash with the same source on a new script…

1 Like

I have downloaded the ModuleScript as .rbxmx and just copied the source.
Poly.rbxmx (12.7 KB)

There might be something corrupted with the XML, but im not 100% sure.
Starting to think it is a issue with new syntax highlighters update.

Ah ok… Odd, any script that requires the poly module also crashes when opening, so im thinking this is actually very limited and isn’t happening to everyone but me, now to figure out why its crashing. Opening this module/script was working fine for the previous 6+ months until today.

3 Likes

Ok so, if you copy the source into a new script, it doesn’t crash, UNTIL you save it and reopen it, then it actually does exactly what it was doing before, with the memory leak, and thus crashing, I dont think its XML related at this point.

Im going to start sectioning down the code until I can find the part that actually is causing the issue.

3 Likes

This is the code that crashes it:

local function toVertexList(vertices, x,y, ...)
if not (x and y) then return vertices end -- no more arguments

vertices[#vertices + 1] = {x = x, y = y}   -- set vertex
return toVertexList(vertices, ...)         -- recurse
end

Paste this into any script, save it, reopen studio, open the script, bang it crashed.

I assume its because of the recursive nature of the function. I removed the function and everything is seemly working fine again. If anyone runs into this issue down the road, its probably because of a recursive function.

7 Likes

Hello!

This should be fixed as long as you disable the new script analysis beta test.

A real fix is on the way.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.