So. This bug courses when you actually delete the callback for BindToClose. I’ve got a system where I use module scripts and somewhere in that i’ve used BindToClose on a function that was previously destroyed? After about 5 seconds ish or more being in a broken studio. It spams the console with an error. You’ll see in screen shots.
The bug happens when you try and leave “Play” mode. It will freeze. Show you an error where if you try and press “Show details” it’ll show you the console with only the previous errors (From your scripts etc. Not an actual error that I could use to fix it in game.) Aside from this. All the buttons now break. Your camera is broken. You physically have to leave studio and join back. This happens on Team create and on a Single Studio.
The bug must happen in an unknown script or a studio related script. I don’t know where it is or how to find it. It just throws me an error. And breaks my studio.
It started yesterday (Thu Jun 24th 2020) . Though I patched it, I’ve experienced it again so I came to the developer community.
I have a system of modules. Somehow the callback in my datastore module gets deleted/stopped. There could be something i’m missing. But the fact that my callback in my datastore module gets deleted. It breaks the game.
Sorry for the bump, but I’ve just found the issue as well. This time, if a module calls it and encounters an error before it can completely return the module, BindToClose is still registered, but acts as though the code has been removed.
Example 1
A. We require a module, that module calls BindToClose, then errors before returning. We experience our bug.
B. We require a module, that module creates it’s own “sub module” enviornment (or attempts to do . Successfully closes.
C. We require a module, that module calls the above but within a pcall. Successfully closes.
Example 2
We require a module inside a pcall, the module will error like Example 1A before returning. We experience our bug.
Example 3
After succesfully requiring the module (all examples commented), and then call Module.ExampleA we will error, but be able to succesfully close.
To my understanding, it appears as if there is an error in the environment containing BindToClose, then it will fire without “properly” being connected. Is there any way to check for BindToClose when erroring and disconnect them with an error in the output? If I wasn’t using an external editor, this would have taken me forever to figure out.
I am in the process of checking over bug reports and following up on some bugs that haven’t received any activity in a while.
Is this issue still occurring or can you confirm that this bug has been resolved?
This bug has been fixed, I’ve tested with the code I provided when I posted the bug; It shuts down accordingly. However doesn’t print the arguments I initially passed to it.