-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to disconnect a nonexistent connection from '@ConfirmationDialog@16952:<ConfirmationDialog#1125499591109>'. Signal: 'confirmed', callable: 'Delegate::Invoke'
(and similar) errors when closing editor after building C# project
#76708
Comments
|
I've had this happen as well, and at the end it crashed with a stack overflow iirc, so it might be getting into a circular dependency cleanup loop, fwiw. |
#73904 introduced the use of the signal but that did not cause the issue. What appears to happen is that when assemblies are rebuilt, they also have to be reloaded, which means that the delegate type for the lambda the connects to the signal changes. Now because the hash of a ManagedCallable is based on that it changes when assemblies are reloaded, corrupting the hashmap used to store signals and the callable can no longer be retrieved. This is only an issue since #72421 since previously signals where stored in a VMap (a sorted dictionary) and the hash was not used. (Tho looking at the less than implementation I am pretty sure that it doesn't really work correctly either and that similar situations where an equal, tho not the same c++ object, callable could not be found in the ap) |
Also I actually already fixed the hash of that particular Callable changing in #75533, but that does not fix the issue in general. |
For me in 4.1 dev 2, it raises these errors, but doesn't spam infinitely:
|
Disconnecting nonexistent signal 'confirmed', callable: Delegate::Invoke
Error spam when closing editor after building C# projectDisconnecting nonexistent signal 'confirmed', callable: Delegate::Invoke
(and similar) errors when closing editor after building C# project
Disconnecting nonexistent signal 'confirmed', callable: Delegate::Invoke
(and similar) errors when closing editor after building C# projectAttempt to disconnect a nonexistent connection from '@ConfirmationDialog@16952:<ConfirmationDialog#1125499591109>'. Signal: 'confirmed', callable: 'Delegate::Invoke'
(and similar) errors when closing editor after building C# project
Is this still an issue in 4.2? There used to be some problems with how dialogs were handled around build errors and whatnot, maybe this was related and so is now fixed? |
This issue is caused by signals (specifically the I think the issue reported originally was fixed by #75533 and #77199, but the general issue should still exist (e.g.: when using custom editor plugins). It needs a new MRP though. |
Can confirm. I have this issue easily reproducible with my own plugin. It's going to be quite easy to make an MRP from there. Edit: I spoke a bit too soon. It's proving difficult to replicate what I thought the issue was, outside my plugin. |
On my project this triggers after closing the editor only if I had connected a signal to the following C# custom RichTextEffect:
I connect the signal via script using:
then I get this after closing the editor: EDIT: I'm on 4.2.1 |
Godot version
v4.1.dev2
System information
Windows
Issue description
Closing the editor after building a C# project prints these errors:
Causes and possible fixes
Reloading the managed assemblies causes the hash of
ManagedCallable
instances to change, corrupting the hash map of signals and causing these issues on cleanup.#75533 prevents the GodotTools assembly from being reloaded and thus prevents these errors in particular, but these errors will still trigger when using custom editor plugins.
Steps to reproduce
Minimal reproduction project
It's an empty project: Test_1.zip
The text was updated successfully, but these errors were encountered: