-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
GDScript debugger may get null object issue #74297
Comments
But the children of a node are never null? |
Are you certain this node is null? There are some cases when the debugger shows data as null when they are too large |
Do you mean it is just a debug issue? |
I'm not sure but it looks very strange that a child of a node is null, that should never happen as far as I know |
I agree with you. I store this child to a list for later use. And I got a null value. So I foud this issue. |
Is the node still valid at that time? Has it got deleted? |
#74148 might solve this |
Many child nodes in my list are null. But not 100% make it clear. |
Oh, sorry I was confused, can you confirm that the nodes are null, and how do you do so? |
Are you sure it's var node := Node.new()
print(node) # <Node#3501556037163>
print(node == null) # false
print(node != null) # true
print("+" if node else "-") # +
print("+" if not node else "-") # -
node.free()
print(node) # <Freed Object>
print(node == null) # true
print(node != null) # false
print("+" if node else "-") # +
print("+" if not node else "-") # +
node = null
print(node) # <null>
print(node == null) # true
print(node != null) # false
print("+" if node else "-") # -
print("+" if not node else "-") # + See also #59816. |
But from logs. These children are not null. And I think there has another issues. Because my dictionary container is null when I trying to got one child and I'm sure that container was initailized. |
My codes work at beta12. I upgrade engine from beta12 to stable. This issue #59816 comes from alpha version. |
Have you checked that the node is
|
It's not null. I think it is a debugger issue. I will add more comments when I have a conclusion. |
It is a debugger issue. Equations(==, !=) are right! |
Citing CONTRIBUTING.md:
Please join a MRP. This will especially help to know if your issue is resolved or not by a PR. |
OK |
Godot version
4.0 stable
System information
Windows11
Issue description
null check always false
Steps to reproduce
Minimal reproduction project
no need
The text was updated successfully, but these errors were encountered: