-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
GDScript: Fix null deref when ensuring cached parsers #94697
GDScript: Fix null deref when ensuring cached parsers #94697
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is still raising a parser bug error message, even if not crashing. |
Also move the error message to where it's relevant.
8c7d8b6
to
eeed8e0
Compare
@mihe @ydeltastar Changed the location of the error messages so they only are raised when relevant. |
I still get Give me a little while and I'll have an MRP for you guys. |
PS: Deleting |
I uploaded an MRP here. |
I managed to isolate the issue in a few minimal scripts. MRP: issue-94617.zip Open "PlayerController.gd" and it raises an error with this PR or crash when testing with #94617. extends Control
- var _actor:FPSActor
+ var _actor:Actor
@export var disable_input = false: |
please dont remove the push_error in ensure_cached_parser_for_class! it should always be able to find the parser and if it cant, the underlying issue should be solved, it will most likely just cause an error later down the line instead, when it needs a class from the result of a previous expression that would make the error much harder to track you also replaced the error messages with ones that have much less information .. |
@rune-scape Feel free to make another PR to fix the regression. It's much harder for vnen to fix the bug than it should be for you who authored that code. There's a clear design issue in that code where a null argument is passed to a method that can't handle it. I'm building 4.3 rc 1 today, so if we can't hotfix this now I'll have to revert #94617 for now as the regression is worse than the bug it fixed. |
Superseded by #94723. |
@rune-scape I was mostly trying to figure out where the error comes from. If something can be This system has become way to complicated. After 4.3 we'll need to focus on rethinking it and cleaning it up. |
ill get to this when i have my computer again in a few days. i know exactly what the problem is now,
@vnen completely agree, and understand if everything related to removing parsers from cache and refreshing on reload in editor got reverted before release i think it maybe was you who said there should be a separate dependancy tree for every script and id definitely agree with you now, im having some ideas on how to do that |
Fix regression reported in #94617 (comment)
Note: I don't have a way to reproduce the bug, but this should avoid crashing.