of     1   

Craftero
#183438785Friday, February 12, 2016 6:01 PM GMT

I pressed Play before realising I had created an infinite loop in my code. Now Studio is trying to Play, and failing by the looks of it (who would have guessed!). Is there any way to escape this procedure and return to standard Studio mode?
[rfa#hidefromsearch]
#183438812Friday, February 12, 2016 6:01 PM GMT

[rfa#hidefromsearch]
Craftero
#183438907Friday, February 12, 2016 6:03 PM GMT

If I simply restart, I could lose all my progress up until now. Perhaps there isn't a shortcut for this at all?
LongKillKreations
#183440812Friday, February 12, 2016 6:41 PM GMT

by not putting in infinite loops
TimeTicks
#183440880Friday, February 12, 2016 6:42 PM GMT

Usually during a crash studio will auto save. Just make sure the place is saved then end studio
Aovis
#183440997Friday, February 12, 2016 6:45 PM GMT

Use while wait() do instead of while true do, also if you open up the Studio engine, they have a autosave function and it will detect your lost progress
Craftero
#183441359Friday, February 12, 2016 6:52 PM GMT

Thanks everyone. I was really just looking for a way to escape the Play Test procedure itself, but it seems there is no such method of doing so. Of course, I didn't include the infinite loop on purpose - I just forgot to add a wait() - but most of you probably knew that. Thanks for the advise anyway.
JarodOfOrbiter
#183441583Friday, February 12, 2016 6:57 PM GMT

Why does the window stop responding? Why doesn't it reserve some resources to keep the window running?
Casualist
#183442393Friday, February 12, 2016 7:13 PM GMT

To my knowledge the client (and by extension studio) is single threaded. So once the low level language that runs the client goes into the infinite loop, it cannot do anything else (No physics updates, no rendering, etc). This allows you do do fun things like control the client frame rate (i.e. lag scripts). local desiredFPS = 8 local waitTime = 1/desiredFPS local tock = tick() game:GetService("RunService").RenderStepped:connect(function() repeat until tick() >= tock+waitTime tock = tick() end)
JarodOfOrbiter
#183443052Friday, February 12, 2016 7:23 PM GMT

Interesting. Good to know. Thanks.

    of     1