-
-
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
Editor Crash when duplicating a GDExtension node if it have an internal child node event if it is added in constructor. #91023
Comments
What happens if you construct it with See: |
I have encountered the same signal connecting issue. But in this case, add child in constructor and add child when receiving |
The flag isn't cleared until But this is a limitation that exists for GDScript as well (and C# too possibly, haven't tested), so it's a limitation to expand on, and should be handled directly IMO, a limitation to work around, and existing code works around it if they do create nodes in the constructor, I'd say the solution is to handle that correctly instead of depending on a missing feature Existing code handling this properly will likely be broken by fixes to that side, as mentioned in the PR |
I don't think we can support calling I do think
I think we need another way to mark a child node as internal. I had thought that the 3rd argument of |
Let's clearify the concept first, the "internal node" in the issue is means a node is added in parent's construcotr, and its flags
This question need more discussion. If a node is not fully initialized in constructor is the reason that we should not support So I think we should try to advance the timing of setting instance and setting instance binding in godot-cpp, this is another topic.
I agree that a new way to mark a node owned by parent should be provided, I think not all internal node can be decided in constructor. |
Just a follow-up note to say that due to the hard work of @Daylily-Zeleen, I think we will actually be able to support this. :-) These two PRs together (one of which is targeting Godot 4.4) should allow this to work: |
Tested versions
4.3dev[7529c0b]
System information
Windows 10, Vulkan, GTX1060
Issue description
Editor Crah when duplicating a GDExtension node(A) if it have an internal child node(B) event if it is added in constructor.
Because the flag
data.in_constructor
already be cleared when A adding B in A's constructor.This can be fixed by #91019 or #91018.
Steps to reproduce
MyNode
node in editor node tree. than duplicate this node.Please download the attached file for testing, the test project is in
test_project
folder.If you are not using windows, please compile GDExtension plugin by youself.
Minimal reproduction project (MRP)
bug report.zip
The text was updated successfully, but these errors were encountered: