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
- Create a GDExtension node which have an internal node, for example:
class MyNode : public Node {
GDCLASS(MyNode, Node)
Node *child;
protected:
static void _bind_methods() {}
public:
MyNode() {
child = memnew(Node);
add_child(child);
}
};
- Add a
MyNode node in editor node tree. than duplicate this node.
- The editor will crash.
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