Skip to content
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 crashes when deleting children of GraphNode #69082

Closed
Yagich opened this issue Nov 23, 2022 · 2 comments · Fixed by #69284
Closed

Editor crashes when deleting children of GraphNode #69082

Yagich opened this issue Nov 23, 2022 · 2 comments · Fixed by #69284

Comments

@Yagich
Copy link
Contributor

Yagich commented Nov 23, 2022

Godot version

4.0b6

System information

Linux/Manjaro

Issue description

Deleting the last child of a GraphNode crashes the editor, unless that GraphNode has been resized at least once by the user. The issue is easy to avoid, but the crash is still odd.

There is another crash in which deleting all the children of GraphNode at once will crash

Steps to reproduce

First crash:

  1. Create a new scene with a GraphNode, and do not resize it;
  2. Add any Control that draws content, like a Button;
  3. Delete the new child you just created;
  4. Observe the crash

Second crash:

  1. Create a new scene with a GraphNode;
  2. Add multiple Controls as children;
  3. Select all of them and delete them from the scene;
  4. Observe the crash.

Minimal reproduction project

graphnode-crash-repro.zip

This project has two scenes: graph_node.tscn showcases the first crash with a default size GraphNode and a single content-drawing Control. The graph_node_multiple_children.tscn scene has a GraphNode with multiple children that crash the editor when deleted.

@John-Gdi
Copy link
Contributor

I have open #69284 to solve the issue. Both two crashes are caused by invalid child pointer, so a safe checking was added to avoid this problem.

@akien-mga
Copy link
Member

Fixed by #69284.

Repository owner moved this from Todo to Done in 4.x Priority Issues Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants