-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
[3.x] Changing the class a GDScript file extends crashes the engine. #53238
Comments
Caused by #53094. |
CRASH_BAD_INDEX
in String
on ExtendGDScriptParser::parse_documentation
I'm unable to recreate this issue in Windows using VSCode. That's quite strange. I'll investigate the stacktrace and see if I can pull some clues out of it. |
The crash likely means that |
Correct. In the backtrace above, |
Tested with VSCode but in Linux instead, and I'm unable to reproduce this issue with it. There's something strange about how Vim ALE is interacting with the LSP server. Dumping the full client-server interaction with ALE does not seem to be straightforward. @Razoric480 is there an easy way to dump the interaction of the LSP client with the server through Godot? |
With #53094 reverted, the following messages also show up from time to time with Vim ALE.
|
I added a print statement to line 113 of godot/modules/gdscript/language_server/gdscript_language_protocol.cpp Lines 104 to 113 in 0a7c6c0
And to line 141 in godot/modules/gdscript/language_server/gdscript_language_protocol.cpp Lines 140 to 141 in 0a7c6c0
And this is the interaction -- Godot crashes sometime after the first
Edit: Here's the full backtrace for the crash above which is reproduced in a different way. In one of my projects, I just open a specific file and Godot crashes instantly and that's the interaction above. |
Not on Godot's side. The LSP is quite chatty. The VSCode client does it client-side when running through a debugger. Maybe I could add an option for debug-build-only on Godot.
This seems strange. Though that it doesn't crash all the time is also interesting, implying it's doing some translation that is keeping the server from noticing and tripping over it. |
Hmm... I'll find some time later today to properly fix my ALE configuration so it passes For completeness, here is the ALE LSP interaction using the original steps in the first post. Here is the full backtrace for the crash of that interaction. I also added these to the original post for convenience. |
Doesn't seem to be the problem. I changed the code to String root_uri = "project.godot"; //p_params["rootUri"];
String root = "project.godot"; //p_params["rootPath"]; and am encountering no crashes. Looks like the LSP detects the possibility of an invalid root/root_uri and just grabs the currently active project's root to configure the workspace. I'll look over your logs and see if I can narrow it down. |
I issued a fix that should at least prevent a crash, see #53261 if you could test it. But I'd like the PR to also fix what you say in #53238 (comment) |
Nice. Will test and comment on the PR. |
Fixed by #53261. |
Godot version
3.x branch at 0a7c6c0
System information
Arch Linux
Issue description
Changing the class a GDScript file extends crashes the engine.
Steps to reproduce
Node2D
Reference
, and save the file.CRASH_BAD_INDEX
triggered byExtendGDScriptParser::parse_documentation
Here is the backtrace:
Edit: For the steps outlined above, here is the Vim ALE LSP interaction with the LSP server. Here is the full backtrace.
Minimal reproduction project
A brand new project will do.
The text was updated successfully, but these errors were encountered: