-
Notifications
You must be signed in to change notification settings - Fork 31k
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
segfault on wayland with 1.78 when window.titleBarStyle=custom #181533
Comments
Can you attach the crash logs following the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues#creating-a-crash-report |
Alright, here it is. I believe I've done it correctly. |
I'm experiencing the same crash, but not just in vs code, other electron22 apps as well. Seems to be an upstream problem. I'm not using hyprland but I'm using sway. But they use the same compositor. Way upstream I guess. It's on the chromium level. https://bugs.chromium.org/p/chromium/issues/detail?id=1409940 |
Same for me. Sometimes it works and then not. Other electron22 applications like Obsidian are working fine. |
@russelltg are you using @chrisr87 @ELT4N1N if you are on Sway then you might be hitting #179836, please check if #179836 (comment) helps in your case as well. |
Not using Sway or disabling scaling are not solutions though. I'm more inclined to not use VS Code than do either of those things. |
I also don't want to install gnome. VSCode should also work with sway. I don't think that #179836 is in my case the same issue because I don't use scaling. It happens on 1440p as well as on 1080p. Besides of that I also tried it on my other PCs. There, it does not crash anywhere as often as on my work PC but still crashes sometimes. |
Is your title bar style set to native? |
If it is not the default setting, no. I use sway without title bars. Here is the command i use: |
@deepak1556 setting the title style to |
Actually, it does still seem to crash, but much much much less often (90% -> 5%, and always works the second time) |
for me the only thing getting code to launch is setting
|
@Mithras the crash dump you have attached shows a different trace than the one this issue was originally tracking, I am going to separate it out into #184124, lets continue the conversation in that issue. @zjeffer can you update to latest insiders and check if the crash happens, the version you are on does not contain the fix electron/electron#38199 @russelltg can you confirm if you are facing the crash with latest insiders https://code.visualstudio.com/insiders ? |
@deepak1556 Ah, yes that was it. There seems to be a minor issue with the AUR package (https://aur.archlinux.org/packages/visual-studio-code-insiders-bin) where it doesn't update to the latest version unless you completely remove the downloaded packages from the cache. Removing |
I am not facing this particular crash on the latest insiders |
Looks like the issue is not fixed, it has been crashing again. Am I not on the latest version?
|
It crashes every time now as long as window.titleBarStyle=custom. I am using Hyprland on Arch Linux.
With option: Verbose output (note that there is only one error now(tag not found), the no-such-file error is gone)
|
FWIW, I am on 1.79.0 on NixOS and Sway and it crashes at startup frequently. It also crashes when creating a new window, albeit this seems less frequent.
(Note: this is based on the upstream Linux VSCode binaries.) I tried The drag'n'drop thing seems like an unrelated fix. Based on the description of that one, it sounds like it could only ever matter on screens with a scale factor other than 1. While I do have some machines that have a scale factor of 2+, it makes no difference in particular for this bug in my experience. I am not sure how to find the actual problem. I tried taking a look at the dumps with
I think this should probably be re-opened? |
I can confirm I have the exact same behaviour on my system: much more frequent crashes with custom titlebar. Currently on code-insiders |
Same for me (on With (I.e. the The |
Still crashing for me, but this time after
UPD:
|
I think the crush people still experience is not the original one but the new one reported here #184124 |
I'm in SwayWM, so I can't really maximize windows. For me the behavior of the bug has not changed since 1.78: some percentage of times a window is created (either during first launch or by clicking new window,) VS Code segfaults. The change that supposedly closed this bug seems to be related to drag'n'drop, which makes me skeptical that the original crash here was ever fixed. |
For me running on AMD/Nvidia card on Hyprland adding this to {
"window.titleBarStyle": "custom",
...
} and then to no see the annoying title bar I put this to my windowrulev2=fakefullscreen, class:^(code-url-handler)$ |
I checked it on 3 versions of Electron (22, 24, 25), on 2 instances of Gnome X11 and Wayland with the main branch built directly from git. And |
Vscode keeps crashing when starting on wayland. IMHO the issue should be reopened.
|
For now I've just downgraded to 1.77, and it seems it could be a while before anyone notices the fix has nothing to do with this bug. This is unfortunate, but not unexpected, being honest: I don't really expect Wayland support to be very good unless some VSCode maintainers actually use VSCode on Wayland, and I presume they probably are not right now. This is unfortunate but not surprising given that it's not even the default in Electron yet. The issue should still be re-opened, though, as it is very seriously not fixed. |
Right now wayland users either have to use the native titlebar or use 1.77. This issue is not fixed |
Using native titlebar vs custom isn't a solution. The issue seems more frequent for me with native but it still happens some of the time with either option. Running using native wayland doesn't get a lot of testing since using Xwayland is the default (and there's no issue when running using Xwayland). |
The lack of a good stack-trace and some early comments in this thread (e.g.: #181533 (comment)) made it look like this issue might be a duplicate of #179836. When more context was provided, it turned out they were two separate issues that were both resulting in segfaults on Wayland. The reason this issue stays closed is because it got spun-out into #184124 which more accurately describes the underlying root issue (and also doesn't have some of the noise from this thread where different people were experiencing a segfault rather than this segfault). TLDR: If you are still affected by this issue just subscribe and add your input to #184124 instead. |
PSA if you’re on Arch Linux: 1.77 is beginning to grow out of sync with its dependencies. For starters, if you want to stay on 1.77 you’re going to need a copy |
Still broken (XWayland works fine tho~) |
Not fixed. XWayland not working either (black menus, weird cursor stuff happening). |
|
starting with |
Type: Bug
I've been using vscode 1.77 for a while and it's very stable on my system (Hyprland (wlroots) wayland, with
--enable-features=UseOzonePlatform --ozone-platform=wayland
in~/.config/code-flags.conf
. But after an upgrade to 1.78 it's quite crashy. What crashes for me (about 60% of the time) is runningcode --disable-extensions -d a b
wherea
andb
are local files. It was crashing in other locations as well though.VS Code version: Code 1.78.0 (252e546, 2023-05-03T20:09:46.685Z)
OS version: Linux x64 6.3.1-arch1-1
Modes:
Sandboxed: Yes (I'm not sure why it says yes here--I'm using the visual-studio-code-bin package from the AUR)
EDIT: Seems to only happen when window.titleBarStyle=custom
Verbose log
``` $ code --disable-extensions -d ~/orin_refimage_shotoverkernel.log ~/orin_myimage_shotoverkernel.log --verbose Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium. Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium. [0504/093229.704709:ERROR:file_io_posix.cc(152)] open /home/russell/.config/Code/Crashpad/pending/19ca2e88-8774-4393-bcf1-53aedd0811c6.lock: File exists (17) [0504/093229.704754:ERROR:file_io_posix.cc(152)] open /home/russell/.config/Code/Crashpad/pending/afefff46-1dd2-446d-b61e-88f1b4593ca0.lock: File exists (17) [63076:0504/093229.705274:WARNING:wayland_object.cc(144)] Binding to zwp_linux_dmabuf_v1 version 3 but version 4 is available. [63076:0504/093229.705324:WARNING:wayland_object.cc(144)] Binding to wl_seat version 5 but version 8 is available. [63076:0504/093229.705353:WARNING:wayland_object.cc(144)] Binding to zwp_pointer_gestures_v1 version 1 but version 3 is available. [63076:0504/093229.781404:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable. [63117:0504/093229.802904:ERROR:gl_display.cc(508)] EGL Driver message (Error) eglQueryDevicesEXT: EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list. [63117:0504/093229.823966:ERROR:gpu_init.cc(523)] Passthrough is not supported, GL is egl, ANGLE is [63117:0504/093229.826348:WARNING:sandbox_linux.cc(380)] InitializeSandbox() called with multiple threads in process gpu-process. [main 2023-05-04T15:32:29.834Z] [File Watcher (node.js)] Request to start watching: /home/russell/.config/Code/User (excludes: , includes: ),/home/russell/.config/Code/User/settings.json (excludes: , includes: ) [main 2023-05-04T15:32:29.842Z] Starting VS Code [main 2023-05-04T15:32:29.842Z] from: /opt/visual-studio-code/resources/app [main 2023-05-04T15:32:29.842Z] args: { _: [ '/home/russell/orin_refimage_shotoverkernel.log', '/home/russell/orin_myimage_shotoverkernel.log' ], diff: true, merge: false, add: false, goto: false, 'new-window': false, 'reuse-window': false, wait: false, help: false, 'list-extensions': false, 'show-versions': false, 'pre-release': false, version: false, verbose: true, status: false, 'prof-startup': false, 'no-cached-data': false, 'prof-v8-extensions': false, 'disable-extensions': true, 'disable-gpu': false, 'ms-enable-electron-run-as-node': false, telemetry: false, debugRenderer: false, 'enable-smoke-test-driver': false, logExtensionHostCommunication: false, 'skip-release-notes': false, 'skip-welcome': false, 'disable-telemetry': false, 'disable-updates': false, 'disable-keytar': false, 'disable-workspace-trust': false, 'disable-crash-reporter': false, 'crash-reporter-id': '7cf4773b-9eec-4e98-be97-71aead94ebd8', 'skip-add-to-recently-opened': false, 'unity-launch': false, 'open-url': false, 'file-write': false, 'file-chmod': false, force: false, 'do-not-sync': false, trace: false, 'force-user-env': false, 'force-disable-user-env': false, 'open-devtools': false, 'disable-gpu-sandbox': false, '__enable-file-policy': false, 'enable-coi': false, 'no-proxy-server': false, 'no-sandbox': false, nolazy: false, 'force-renderer-accessibility': false, 'ignore-certificate-errors': false, 'allow-insecure-localhost': false, 'disable-dev-shm-usage': false, 'profile-temp': false, logsPath: '/home/russell/.config/Code/logs/20230504T093229' } [main 2023-05-04T15:32:29.843Z] Resolving machine identifier... [main 2023-05-04T15:32:29.843Z] Resolved machine identifier: 5ae45673b43208087ad57923c5cb25a0522a935da792e6a7f2fe060c58ebab62 [main 2023-05-04T15:32:29.843Z] Main->SharedProcess#connect [main 2023-05-04T15:32:29.845Z] [File Watcher (node.js)] Started watching: '/home/russell/.config/Code/User' [main 2023-05-04T15:32:29.846Z] [File Watcher (node.js)] Started watching: '/home/russell/.config/Code/User/settings.json' [main 2023-05-04T15:32:29.846Z] StorageMainService: creating application storage [main 2023-05-04T15:32:29.849Z] ElectronURLListener: waiting for window to be ready to handle URLs... [main 2023-05-04T15:32:29.849Z] lifecycle (main): phase changed (value: 2) [main 2023-05-04T15:32:29.849Z] windowsManager#open [main 2023-05-04T15:32:29.850Z] windowsManager#open pathsToOpen [ { fileUri: w { scheme: 'file', authority: '', path: '/home/russell/orin_refimage_shotoverkernel.log', query: '', fragment: '', _formatted: null, _fsPath: null }, type: 1, exists: true, options: { selection: undefined } }, { fileUri: w { scheme: 'file', authority: '', path: '/home/russell/orin_myimage_shotoverkernel.log', query: '', fragment: '', _formatted: null, _fsPath: null }, type: 1, exists: true, options: { selection: undefined } } ] [main 2023-05-04T15:32:29.850Z] IPC Object URL: Registered new channel vscode:0d402d8f-3060-42dd-8008-ea93ed84c475. [main 2023-05-04T15:32:29.850Z] window#validateWindowState: validating window state on 2 display(s) { mode: 1, x: 0, y: 0, width: 884, height: 1526 } [main 2023-05-04T15:32:29.851Z] window#validateWindowState: multi-monitor working area { x: 0, y: 0, width: 2560, height: 1600 } [main 2023-05-04T15:32:29.851Z] window#ctor: using window state { mode: 1, x: 0, y: 0, width: 884, height: 1526 } [63076:0504/093229.851335:WARNING:wayland_surface.cc(149)] Server doesn't support zcr_alpha_compositing_v1. [63076:0504/093229.851344:WARNING:wayland_surface.cc(164)] Server doesn't support overlay_prioritizer. [63076:0504/093229.851346:WARNING:wayland_surface.cc(178)] Server doesn't support surface_augmenter. [63076:0504/093229.851348:WARNING:wayland_surface.cc(193)] Server doesn't support wp_content_type_v1 [63076:0504/093229.851351:WARNING:wayland_surface.cc(212)] Server doesn't support zcr_color_management_surface. [63076:0504/093229.861916:WARNING:xdg_activation.cc(86)] Cannot activate a window because no active windows found! [63076:0504/093229.861948:WARNING:xdg_activation.cc(86)] Cannot activate a window because no active windows found! [main 2023-05-04T15:32:29.862Z] window#load: attempt to load window (id: 1) [main 2023-05-04T15:32:29.866Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 0, emptyToRestore: 0, emptyToOpen: 0) [main 2023-05-04T15:32:29.866Z] lifecycle (main): phase changed (value: 3) [main 2023-05-04T15:32:29.866Z] resolveShellEnv(): skipped (VSCODE_CLI is set) [main 2023-05-04T15:32:29.866Z] update#setState idle [main 2023-05-04T15:32:29.894Z] resolveShellEnv(): skipped (VSCODE_CLI is set) [0504/093229.952092:ERROR:elf_dynamic_array_reader.h(64)] tag not found [0504/093229.955272:ERROR:directory_reader_posix.cc(42)] opendir /home/russell/.config/Code/Crashpad/attachments/dbe6758a-c27c-4bc2-bd98-a8b25c6a26a5: No such file or directory (2) ```System Info
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Extensions (37)
(1 theme extensions excluded)
A/B Experiments
The text was updated successfully, but these errors were encountered: