BindToClose 100% Infinite Yield

Thank you so much!

Can you go over what caused it? Would love to know more!

4 Likes

This is still broken when using coroutines, the code below will error and freeze up studio

game:BindToClose(function()
	local thread = coroutine.running()
	
	delay(5, function()
		coroutine.resume(thread)	
	end)
	
	coroutine.yield()
end)

Capture

I know this post is old but I would like to point out the bug still exists!


Basicly, the bug is whenever I try to use BindToClose() in studio, errors spam the output and I am unable to stop the game. I even tried closing studio, but when I re-opened the place it kept sending error messages. The error messages say:

09:56:46.706 - Not running script because past shutdown deadline (x115049)

and it never stops.
Here is a video:


It just keeps doing that infinitly.
Also, after I hit Stop, the game doesn’t fully close, it just keeps running and eventually freezes. I stopped it from freezing by using runService:IsStudio() to check wheter it’s in studio, and not use BindToClose() if it is, but when I hit Play it still spams the output (Because the errors never stop, so the errors are from when I first tested it with BindToClose())

If your wondering, I’m running Studio on a Macbook Pro, Version 10.15.4.

1 Like

Thanks for letting us know there’s still an issue here. If you can create a minimal rbxl file that repros this issue, it’s a lot more likely be able to fix it sooner.

2 Likes

For some reason, it only does this on the game I’m working on, but here is a game that uses BindToClose in a script called Read-Me in the workspace:
Error.rbxl (17.8 KB)
You have to publish it to Roblox, otherwise it doesn’t do the datastores. It doesn’t spam the output like my other project, but it still freezes for a while.

The error has started occuring for me now also.

Whenever me or my friend plays the game and then press stop we get “Script that implemented this callback has been destroyed” and after pressing ‘OK’ on that prompt we get “Not running script because past shutdown deadline”

‘Show Details’ on “Script that implemented this callback has been destroyed” gives me my console output I would’ve gotten otherwise

Image of console output:

We’ve both tried restarting studio multiple times but nothing has worked. Its occurance rate like its happening in the video is like 80-90%.

Soo…what’s the fix? I am using ds2 and this still occurs.

I don’t know about DS2 but my problem was that I accidentally moved my saving script to StarterGui.

if you have admin in your game like adonis it causes the problem, it has bindtoclose inside the loader which causes this problem.

This post is marked as solved, please file a new bug report.

1 Like