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

Crash when printing array that contains itself #55256

Closed
KoBeWi opened this issue Nov 23, 2021 · 1 comment · Fixed by #79370
Closed

Crash when printing array that contains itself #55256

KoBeWi opened this issue Nov 23, 2021 · 1 comment · Fixed by #79370

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Nov 23, 2021

Godot version

3.4 / 4.0

System information

W10

Issue description

When you do do

var a = []
a.append(a)
print(a)

Godot will crash.

I checked how Python handles it and it prints [[...]].

Steps to reproduce

See above.

Minimal reproduction project

No response

@rsubtil
Copy link
Contributor

rsubtil commented Nov 25, 2021

Regression from #35816. I've tested on 3.4 and it works fine since it doesn't have these changes yet.

I have incremented the recursion_count which fixes the issue, but the output has changed to:
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
(aka 100 recursions before the trigger is called, returning [...])

@touilleMan I see that the PR was to change the ==/!= behavior specifically. Do you think, for the stringify method, the old stack behavior can be reverted, or is there a reason for it's changes too? I've been trying some ideas on how to fix this but I haven't found a clean way to do it, and I think it's gonna be hard to fix this properly under these new changes.

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

Successfully merging a pull request may close this issue.

4 participants