BindToClose 100% Infinite Yield

Mine is also hanging now when the Datastore request is in PlayerRemoving.

HttpService requests are yielding functions. As this bug happens when anything yields in BindToClose, calling Http Async functions within BindToClose when this issue is persistent will result in BindToClose yielding until it times out.

1 Like

The time it took to resolve this issue both times it happened is kind of concerning, given how many user reports there were and that it requires developers to manually work around it at the expense of potential data loss related bugs. Are there any test cases set up to prevent this from happening again?

1 Like

Hey @CycloneUprising, has the fix been pushed yet? I’m still receiving this error, and have to resort to using Test Server which is really slow and cumbersome for my work flow.

 15:26:08.427 - Not running script because past shutdown deadline (x117)
2 Likes

Yeah, this issue is still happening for me too.

2 Likes

I think it’s been fixed. At least for me… I’m still waiting for the official patch info.

This should be fixed. Please let us know if you have ongoing issues.

10 Likes

It’s not fixed for coroutines:

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

There are many more coroutine bugs too:

2 Likes

The fix I mentioned in earlier post is now live.

8 Likes

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