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

Bad address index error at @implicit_new #75502

Closed
TheSecondReal0 opened this issue Mar 30, 2023 · 3 comments
Closed

Bad address index error at @implicit_new #75502

TheSecondReal0 opened this issue Mar 30, 2023 · 3 comments

Comments

@TheSecondReal0
Copy link
Contributor

TheSecondReal0 commented Mar 30, 2023

Godot version

4.0.1

System information

Windows 10, RTX 2060, Vulkan

Issue description

I'm currently working on a game with a lot of class inheritance where each child class adds more instance variables on top of its parent. It seems that once the inheritance tree gets complex enough Godot starts throwing errors on variable declarations while instancing objects. Here is a screenshot of an error that occurs when a resource is loaded from a file:
image

This seems to happen somewhat randomly, sometimes it has no issue instancing an object and other times it throws an error (seems to only happen on the most complex objects/the ones with the deepest inheritance trees). Tool scripts and whether or not a variable is exported makes no difference.

Steps to reproduce

I think this error is caused by Godot not handling large projects with deep inheritance trees very well. I can't pinpoint exactly what causes it, but it seems to have something to do with the amount of variables/identifiers a class has.

Minimal reproduction project

I wasn't able to reproduce this in a test project when I copied all of my class code and deleted all functions. It seems to require a fairly complex codebase to reproduce, and for multiple reasons I don't want to post my entire game.

@AThousandShips
Copy link
Member

It's from here:

err_text = "Bad address index."; \

Not sure what causes it though

@TheSecondReal0
Copy link
Contributor Author

TheSecondReal0 commented Mar 30, 2023

With more testing I think this error is caused by a indirect loops in class references. Seems like the error message could use some work or the parser could be improved to handle these kinds of loops. This does seem to be a duplicate of #74253 so it can probably be closed.

@Calinou
Copy link
Member

Calinou commented Apr 1, 2023

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2023
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

3 participants