Stopping a playtest in a game with yielding function bound to close when paused at a breakpoint causes script shutdown deadline error

If you have a game that has a yielding function bound to close, and in said game you’re paused at a breakpoint, stopping the playtest causes studio to hang for ~30 seconds then a “not running script because past shutdown deadline” error (guessing this is due to the 30 second timeout limit given to game.BindToClose functions). This is unaffected by the duration of the yield and does not happen if the function bound to close does not yield.

An example place, the script is in ServerScriptService, place a breakpoint on the print line as so:
image
shutdownIssue.rbxl (54.8 KB)

NVIDIA GeForce RTX 4080
AMD Ryzen 7 7800X3D
32.0 GB DDR5 @ 5200MHz

Beta features:
Dragger QoL improvements, face capture, live animation creator, multilayer wrap fix, new Studio camera controls, scripts are non-strict by default, video uploads.

From what I can remember, this has been happening since the beginning of timing. Really annoying. As a temporary workaround you can set ScriptTimeoutLength (or whatever the property is called in Studio Settings) to -1. It’ll prevent these slowdowns.

settings().Studio.ScriptTimeoutLength = -1

Seems to be unaffected by this

1 Like