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

[4.0 beta10 Bug] When you try to close a running project, if the Node in the project activates the function _notification (), the project will report an error, as shown in the figure. #70828

Closed
Atem1995 opened this issue Jan 2, 2023 · 5 comments

Comments

@Atem1995
Copy link

Atem1995 commented Jan 2, 2023

Godot version

4.0 beta 10

System information

Window10

Issue description

When you try to close a running project, if the Node in the project activates the function _notification (), the project will report an error, as shown in the figure.
捕获

Steps to reproduce

When you try to close a running project, if the Node in the project activates the function _notification (), the project will report an error, as shown in the figure.

Minimal reproduction project

When you try to close a running project, if the Node in the project activates the function _notification (), the project will report an error, as shown in the figure.

@Rindbee
Copy link
Contributor

Rindbee commented Jan 2, 2023

May be caused by NOTIFICATION_PREDELETE. Excluding it should help.

@Atem1995
Copy link
Author

Atem1995 commented Jan 2, 2023 via email

@Maran23
Copy link
Contributor

Maran23 commented Jan 2, 2023

Sorry, I don't quite understand the solution.

The notification NOTIFICATION_PREDELETE is send before the node is deleted. If you receive this signal, you better just do nothing since the object is about to be deleted.

@kleonc
Copy link
Member

kleonc commented Jan 2, 2023

The issue is if state check is not reliable (it evaluates to true when state refers to an already freed object). Using if is_instance_valid(state) should make it work as expected.

Duplicate of #44861, related to #59816.

@kleonc kleonc closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2023
@Atem1995
Copy link
Author

Atem1995 commented Jan 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants