No resource limiting to protect system from infinite loops

I accidentally started “Play Solo” before adding a wait() to a while loop, and Studio ended up freezing my system and causing it to crash. By the time I realized my mistake, my mouse was no longer moving.

This could cause damage to the disk and other hardware, so I’d urgently recommend adding resource limiting and infinite loop detection to prevent causing damage to any dev’s workstation.

System report:

Expected behavior

Studio would either detect RAM exceeding some threshold or detect that a certain thread has been taking up all the CPU for more than a certain amount of time. Then stop the process gracefully.

1 Like

How? Studio should at best Stop Responding for a few seconds and then terminate the thread with the loop stating “allowed execution time exhausted”. Nothing gets damaged even on my almost-9 year old laptop.

1 Like

I mean in the case I mentioned, my laptop started getting very hot and the OS had to kick in to stop everything. Studio didn’t stop the thread itself as you’d expect.

1 Like

Then I’d recommend looking into SetTimeout.

1 Like

I’m filing this bug report because Roblox probably expects this to be the default behavior without having to write a plugin to change SetTimeout.

1 Like


you can lower this in Studio settings to make an indefinitely spinning script stop sooner, in your case you could comfortably set it to 1 second or something

1 Like