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

Parser Error: When trying to run (F5) a project #69213

Closed
produno opened this issue Nov 26, 2022 · 8 comments · Fixed by #69259
Closed

Parser Error: When trying to run (F5) a project #69213

produno opened this issue Nov 26, 2022 · 8 comments · Fixed by #69259

Comments

@produno
Copy link

produno commented Nov 26, 2022

Godot version

4.0 Beta 6

System information

Windows 11

Issue description

When trying to run my project with F5 it halts with Parse Error:
The only information shown is in the console as follows.

E 0:00:02:0469 GDScriptCompiler::_populate_class_members: Condition "!base->is_valid()" is true. Returning: ERR_BUG
<C++ Source> modules\gdscript\gdscript_compiler.cpp:2287 @ GDScriptCompiler::_populate_class_members()

My project is fairly large and runs fine in Beta 5.

in case it helps heres the log when loading up the project:

Godot Engine v4.0.beta6.official.7f8ecffa5 - https://godotengine.org
OpenGL Renderer: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2
Editing project: C:/SpaceSlog Game/SpaceSlog
Godot Engine v4.0.beta6.official.7f8ecffa5 - https://godotengine.org
Vulkan API 1.2.0 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1080 Ti
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Condition "!base->is_valid()" is true. Returning: ERR_BUG
at: _populate_class_members (modules/gdscript/gdscript_compiler.cpp:2287)
ERROR: Non-existent native base class.
at: (modules/gdscript/gdscript_analyzer.cpp:4052)
ERROR: Condition "!base->is_valid()" is true. Returning: ERR_BUG
at: _populate_class_members (modules/gdscript/gdscript_compiler.cpp:2287)
ERROR: Condition "!base->is_valid()" is true. Returning: ERR_BUG
at: _populate_class_members (modules/gdscript/gdscript_compiler.cpp:2287)
ERROR: Condition "!base->is_valid()" is true. Returning: ERR_BUG
at: _populate_class_members (modules/gdscript/gdscript_compiler.cpp:2287)
ERROR: Condition "!base->is_valid()" is true. Returning: ERR_BUG
at: _populate_class_members (modules/gdscript/gdscript_compiler.cpp:2287)
ERROR: Condition "!base->is_valid()" is true. Returning: ERR_BUG
at: _populate_class_members (modules/gdscript/gdscript_compiler.cpp:2287)
ERROR: Condition "!preset.is_valid()" is true. Continuing.
at: load_config (editor/export/editor_export.cpp:206)
ERROR: Condition "!d.has("handle_modes")" is true. Returning: false
at: _set (scene/resources/animation.cpp:319)

Steps to reproduce

Unfortunately i cannot help much as my project is fairly large. I have tried to narrow the issue down but cannot. Any help with this would be appreciated.

Minimal reproduction project

Please see above.

@TokisanGames
Copy link
Contributor

You might have a cyclic reference in your code, which used to produce CRC errors and now presents Condition "!base->is_valid()" is true for me. The error is not locatable in GDScript, so perhaps you can think about where you are introducing cyclic references and untype the variables. See #67714 (comment)

@adamscott
Copy link
Member

CC @rune-scape

@produno
Copy link
Author

produno commented Nov 26, 2022

You might have a cyclic reference in your code, which used to produce CRC errors and now presents Condition "!base->is_valid()" is true for me. The error is not locatable in GDScript, so perhaps you can think about where you are introducing cyclic references and untype the variables. See #67714 (comment)

Your issue seems very similar to mine, though i have no idea where the cyclic reference is, unless it also refers to places where i check class types with x is class.

There are currently no cyclic reference errors whilst using Beta 5.

@issork
Copy link
Contributor

issork commented Nov 27, 2022

I ran into the issue as well and managed to create a MRP.

MRPCyclicRef.zip

@adamscott
Copy link
Member

adamscott commented Nov 27, 2022

@issork Thanks for the MRP! It really helped pinning down the issue.

Everybody, if you could test my PR, it would be great. When the Github action will finish, you will be able to download the artifacts to test, if you don't feel to build from source.

@issork
Copy link
Contributor

issork commented Nov 27, 2022

The PR seems to fix the issue for me, I can run my project again. Thanks!

@rune-scape
Copy link
Contributor

rune-scape commented Nov 27, 2022

it seems like something may be going wrong in the analyzer? ERROR: Condition "!base->is_valid()" is true. Returning: ERR_BUG may be caused by the "Non-existent native base class." error

@rune-scape
Copy link
Contributor

@adamscott had it right (nice job)
the other error in the analyzer is also a side effect of allowing cyclic references

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.

6 participants