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 bug: Mismatched external parser" on exported project with binary resource conversion enabled #92233

Closed
EIREXE opened this issue May 22, 2024 · 5 comments · Fixed by #93166

Comments

@EIREXE
Copy link
Contributor

EIREXE commented May 22, 2024

Tested versions

Reproducible in current master (2149682)

System information

Arch Linux, Windows

Issue description

After I export my project I get a Parser bug: Mismatched external parser error on this line https://github.com/godotengine/godot/blob/master/modules/gdscript/gdscript_analyzer.cpp#L909

Disabling "Convert Text Resources to Binary" seems to fix the issue.

After running a bisect, the offending commit appears to be 6b88c86

Indeed, grabbing current master and reverting the commit seems to fix it.

Steps to reproduce

I unfortunately haven't been able to reproduce it yet outside of my project, I am trying though, and I think it may be related to autoloads and some issue with global classes.

Breaking into the line raising the error with a debugger reveals that the error happens when parsing my project's first autoload and ends up at a chain of global classes, where the last one is HBUserSettings.

Minimal reproduction project (MRP)

I've been trying for a few days to reproduce it outside my game and unfortunately I haven't been able to, if anyone is feeling adventurous you can try compiling the game with https://github.com/EIRTeam/godot/tree/shinobu_gd4/ and https://github.com/EIRTeam/Project-Heartbeat

I'll keep trying.

@akien-mga
Copy link
Member

CC @rune-scape @godotengine/gdscript

@Glorax
Copy link

Glorax commented Jul 8, 2024

I believe this has regressed in 4.3.beta2.

I get this on startup. The parser errors run into the dozens. I get more parser errors in the debugger when I run in editor. None of these errors give me a corresponding line, and the debugger errors just show me https://github.com/godotengine/godot/blob/master/modules/gdscript/gdscript_analyzer.cpp#L909.

Screenshot 2024-07-07 at 10 16 16 PM

resolve_class_member: Parser bug: Mismatched external parser.
<C++ Error> Condition "!parser_ref->get_parser()->has_class(p_class)" is true.
<C++ Source> modules/gdscript/gdscript_analyzer.cpp:909 @ resolve_class_member()

@akien-mga
Copy link
Member

@Glorax Can you provide a minimal reproduction project?

@Glorax
Copy link

Glorax commented Jul 8, 2024

@Glorax Can you provide a minimal reproduction project?

I cannot. I am using this project as a basis: https://github.com/Phazorknight/Cogito

I did not write this code myself, and the errors provide essentially no information about what, specifically, is causing them. I don't even know which files are bugged. For all I know, every script could have an issue, or the errors could all be concentrated in a single script. I've done some minimal research into the causes of parser errors, but it's all a bit opaque to me. In short, if I knew how to create a minimal reproduction project, I would likely have already fixed the issue on my end.

The best I can recommend is to just use Cogito as a reproduction project, even if it's not minimal. I can guarantee that the errors will show up on project load when freshly unzipped. I am using the mono version of 4.3.beta2.

The errors won't show up in the COGITO_0_MainMenu scene. They show up when loading scenes 1-4 under "DemoScenes".

Cogito-main.zip

@akien-mga akien-mga reopened this Jul 8, 2024
@akien-mga
Copy link
Member

akien-mga commented Jul 8, 2024

I can reproduce it when loading that project indeed. It's a different bug though as the one which was fixed here was specific to export projects with binary resource conversion.

The new bug described later happens in the editor itself. So this should be in its own bug report.

Edit: Moved to #94098.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants