golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.89k stars 752 forks source link

Right Clicking Crashes #3478

Open ngraham20 opened 3 months ago

ngraham20 commented 3 months ago

Type: Bug

  1. Open a .go file
  2. Right click anywhere in the file
  3. It crashes

Extension version: 0.42.0 VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z) OS version: Linux x64 6.10.2-202.fsync.fc40.x86_64 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (16 x 2392)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off| |Load (avg)|4, 3, 1| |Memory (System)|61.98GB (56.71GB free)| |Process Argv|--ozone-platform=wayland . --crash-reporter-id 6a04d054-3015-4142-b81f-9ba42bd8d2bc| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|plasma| |XDG_CURRENT_DESKTOP|KDE| |XDG_SESSION_DESKTOP|KDE| |XDG_SESSION_TYPE|wayland|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 0ee40948:31013168 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 2f103344:31071589 impr_priority:31102340 nativerepl1:31104043 refactort:31108082 ccplc:31103425 pythonrstrctxtcf:31103194 ```
hyangah commented 3 months ago

Thanks for reaching out. We need more info to triage.

ngraham20 commented 3 months ago

That was a great idea, it does not occur if only the Go extension is enabled, I have tried it in combination with other extensions, and it seems to occur when the specific combination of either of these extensions and the Go one.

Other things I've tried:

hyangah commented 3 months ago

Thanks. I use Gitlens too but cannot reproduce the issue with the default settings. Can you please share your settings (gitlens and go)? Or did you find any crash log to share?

ngraham20 commented 3 months ago

Unfortunately, I don't seem to be able to find any crash logs. It crashes immediately without output and when I turn VSCode back on, even some workspace settings have changed (the windows I closed are open again, etc)

Also, my settings for both Go and Gitlens are the defaults

ngraham20 commented 3 months ago

I will say that most likely it's some interaction too with my linux distribution packages, as I tried downgrading to previous versions of the Go extension, which used to work, and it still has this issue. So it's not that an update to the Go extension broke something, it was an update to my system that somehow caused this

ngraham20 commented 3 months ago

just fyi, I'm on vacation for the next 6 days, so I'll check back and continue providing information when I get back

ngraham20 commented 3 months ago

ok, it just crashed again, this time with only the go extension enabled. I'm not sure what's going on anymore

ngraham20 commented 3 months ago

I don't know if they're relevant, but here are the Extension Host logs

2024-08-07 11:44:56.146 [info] Extension host with pid 294056 started
2024-08-07 11:44:56.146 [info] Skipping acquiring lock for /home/nathaniel/.config/Code/User/workspaceStorage/f9b82b35b87e79d3f2ab7eb7b424f7e8.
2024-08-07 11:44:56.324 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-08-07 11:44:56.331 [info] ExtensionService#_doActivateExtension golang.go, startup: false, activationEvent: 'onLanguage:go'
2024-08-07 11:44:56.542 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2024-08-07 11:44:56.551 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2024-08-07 11:44:56.569 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2024-08-07 11:44:56.614 [info] Eager extensions activated
2024-08-07 11:44:56.631 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2024-08-07 11:44:56.632 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2024-08-07 11:44:56.728 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
ngraham20 commented 3 months ago

as a test, I did try running code without the flags --ozone-platform=wayland --enable-features=UseOzonePlatform, and the crashes stopped completely

hyangah commented 2 months ago

Thanks @ngraham20 I see several issues and crash reports related to wayland in the vscode repo (github.com/microsoft/vscode). Can you report your issue to the vscode team? (They may ask for logs like https://github.com/microsoft/vscode/wiki/Native-Crash-Issues#creating-a-crash-report or verbose logging) If there is anything the go extension can help or adjust to prevent the crash, please let us know.