You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproducible in (at least): 4.3, 4.4dev2, and 4.4dev7
I get the same behavior with both C# and GDscript
System information
Linux (Fedora 41 using Gnome)
Issue description
Motivation: When the user closes my application I would like to open a dialog prompting them to save if content was modified.
Issue:
When I listen for NOTIFICATION_WM_CLOSE_REQUEST and show a dialog this works as expected. However, if I manually trigger the same notification from a button or menu (using get_tree().root.propagate_notification) instead I get the following error:
E 0:00:01:0786 popup_repro.gd:11 @ _notification(): Parent node is busy setting up children, `add_child()` failed. Consider using `add_child.call_deferred(child)` instead.
<C++ Error> Condition "data.blocked > 0" is true.
<C++ Source> scene/main/node.cpp:1572 @ add_child()
<Stack Trace> popup_repro.gd:11 @ _notification()
popup_repro.gd:5 @ <anonymous lambda>()
This is similar to #34157 except I don't see the error when the close notification is sent from the window manager.
If I replace cd.popup_exclusive_centered(self) with cd.popup_exclusive_centered.call_deferred(self) this works as expected, but it's not clear why this should be necessary.
Tested versions
Reproducible in (at least): 4.3, 4.4dev2, and 4.4dev7
I get the same behavior with both C# and GDscript
System information
Linux (Fedora 41 using Gnome)
Issue description
Motivation: When the user closes my application I would like to open a dialog prompting them to save if content was modified.
Issue:
When I listen for
NOTIFICATION_WM_CLOSE_REQUEST
and show a dialog this works as expected. However, if I manually trigger the same notification from a button or menu (usingget_tree().root.propagate_notification
) instead I get the following error:This is similar to #34157 except I don't see the error when the close notification is sent from the window manager.
If I replace
cd.popup_exclusive_centered(self)
withcd.popup_exclusive_centered.call_deferred(self)
this works as expected, but it's not clear why this should be necessary.Steps to reproduce
Minimal reproduction project (MRP)
popup-repro.zip
Attached is a tiny repro project, the only code of which is repeated here:
The text was updated successfully, but these errors were encountered: