-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Crash while editing GDScript in VS Code via LSP #71016
Comments
@git2013vb Could you join a minimal reproduction project that reproduces this issue reliably? |
Of course. I will do it once I found out what exactly is the trigger.. So far seems quite random. It happen when I have syntax errors in vscode. I have to pin point which kind of error is the culprit. Thanks |
With Godot 4 stable the issue became more difficult to pinpoint. From logs no infos at all I noticed it crash very often when I change code signal related and when I have more than one instance open All day I work with two or three instance at same time. So it became impossible to work It force me to reopen it 10 time a day at least :) Using its integrated editor is a no go because it lack of features that vscode give for free
Just to mention some :) |
I also get crashes when using LSP with emacs(lsp-mode). Using Arch linux with glibc 2.37-3 handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.3.rc1.official (2d74ee0e5b89e233ef5e86c0667f09a48e963f82)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x39ab0) [0x7fe419996ab0] (??:0)
[2] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x11d13cb] (??:0)
[3] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x1161018] (??:0)
[4] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x11e4baf] (??:0)
[5] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x116dfdf] (??:0)
[6] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x116f896] (??:0)
[7] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x1170adc] (??:0)
[8] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x115ce32] (??:0)
[9] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x11856ba] (??:0)
[10] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x49aaa47] (??:0)
[11] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x116ad1d] (??:0)
[12] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x1214eac] (??:0)
[13] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x245ec2a] (??:0)
[14] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x243a194] (??:0)
[15] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x246f268] (??:0)
[16] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x462c05a] (??:0)
[17] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x2491ce7] (??:0)
[18] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x24712a7] (??:0)
[19] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x1153109] (??:0)
[20] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x11134fb] (??:0)
[21] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x45bb4d8] (??:0)
[22] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x45d2a5f] (??:0)
[23] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x154fa24] (??:0)
[24] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x1550412] (??:0)
[25] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x10ebb85] (??:0)
[26] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x1114b18] (??:0)
[27] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x41d2655] (??:0)
[28] /home//.asdf/installs/godot/4.0.3-rc1/bin/godot() [0x4dfc120] (??:0)
[29] /usr/lib/libc.so.6(+0x8744b) [0x7fe4199e444b] (??:0)
[30] /usr/lib/libc.so.6(+0x10ae40) [0x7fe419a67e40] (??:0)
-- END OF BACKTRACE --
================================================================ |
I tried compiling the debug version 5222a99.
|
Usually, I do not have VSCode set as my external editor in Godot's settings: I run Godot, then independently run VSCode and connect to the LS. I can't be sure, since it's not my typical workflow, but I have noticed this bug disappears if I set VSCode as my external editor. It seems far-fetched, but IMHO worth a check. Can the rest of the concerned people in this confirm if that's their case too? To not clutter the report, please just use emojis:
(Of course if you don't encounter the bug, don't vote) |
After repeated and extensive testing, I found that meeting the following two conditions will likely trigger a crash:
When enabling an external editor, the second condition may not be met, but sometimes the corresponding script may be opened in the editor (such as when the debugger encounters an error) @Xananax If the above two conditions are not met, I cannot guarantee that it will not crash (Although I repeatedly tested and couldn't crash), but the frequency of crashes is higher when the above two conditions are met. The replication script is as follows: #actor.gd
class_name Actor #test.gd
extends Node
var a:=Actor.new()
var b:=Actor.new()
func _ready() -> void:
if true:
prints("{0},{1}".format([a.charname ,b.charname]))
return
By deleting lsp_crash.mp4Backtrace of this crash in 4.0.3.stable
Although I originally encountered another crash for lsp, the call stack is different from OP. So I will not list in detail here. Anothr crash backtrace
|
Godot v4.2.dev (6da4ad1) - macOS 13.4.1 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads) I was able to force the crash 2 times within 15 minutes. Tested like @saierXP in the video. Does anyone already know how to fix such errors? CALL STACK
Edit: that is new outside of Godot CALL STACK
|
Godot version
Engine version: Godot Engine v4.0.beta.custom_build (5726770)
System information
Debian 11
Issue description
Steps to reproduce
I was just working with vscode (fixing some comments) :)
EDIT: It happen often. Usually when I have a script error and I'm going to fix it in vscode. It happen when I have two godot instances open connected with different language-server's ports
Minimal reproduction project
na
The text was updated successfully, but these errors were encountered: