-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Recursive references crash the game, prevent print() output and reaching breakpoints for whole code blocks. #1289
Comments
The offending line seems to be:
I kid you not. This crashes the game and prevents the debugger from ever reaching that code block. These variations also do it:
|
Another day another insight: The actual cause is that currLine is a dictionary which contains values that can reference back to currLine, thus creating a recursive reference. This crashes the game when trying to print() it. |
Maybe we should just enforce some maximum depth when stringifying a dictionary? |
First of all thank you for your report and sorry for the delay. We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to. We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us. For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors. Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed. Thanks in advance. Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it. |
Seems to be the same issue as #8693 |
Judging by #29088, it's still an issue. We could really use a warning for such situations, just to make finding them easier (I am starting to suspect I managed to fall victim to the same sort of a thing...) |
Could someone made a minimal reproduction project that works with Godot 3.2? @ScyDev The linked project in the OP is very old, it uses an |
It seems that this issue can be broken into separate issues of which maybe one is fixed. |
The MRP from #8693 can be used in Both still crash with infinite recursion, as expected from the code: extends Node
func _ready():
var arr = []
arr.append(arr)
print(arr.hash()) |
This doesn't crash Godot for me on current
|
Indeed, we added a check to detect this type of infinite recursion and abort. |
I made a simple demo for this problem:
https://github.com/ScyDev/godot/tree/master/demos/crashes/recursive_reference_print_crash
Godot says "Process being debugged exited." before a breakpoint at the beginning of the loop is reached.
Update: It appears that the breakpoint is reached, because it influences the print() output. But I can't actually debug because of "Process being debugged exited".
godot -d says:
The text was updated successfully, but these errors were encountered: