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
[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
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.
The text was updated successfully, but these errors were encountered:
------------------ 原始邮件 ------------------
发件人: "godotengine/godot" ***@***.***>;
发送时间: 2023年1月2日(星期一) 晚上7:46
***@***.***>;
***@***.******@***.***>;
主题: Re: [godotengine/godot] [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. (Issue #70828)
May be caused by NOTIFICATION_PREDELETE. Excluding it should help.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
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.
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.
------------------ 原始邮件 ------------------
发件人: "godotengine/godot" ***@***.***>;
发送时间: 2023年1月3日(星期二) 凌晨1:12
***@***.***>;
***@***.******@***.***>;
主题: Re: [godotengine/godot] [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. (Issue #70828)
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
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.
The text was updated successfully, but these errors were encountered: