Change:
Type: <bBug</bI've been using vscode 1.77 for a while and it's very stable on my system (Hyprland (wlroots) wayland, with in . But after an upgrade to 1.78 it's quite crashy. What crashes for me (about 60% of the time) is running where and are local files. It was crashing in other locations as well though. VS Code version: Code 1.78.0 (, 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 <details<summaryVerbose log</summary</details<details<summarySystem Info</summary </details<details<summaryExtensions (37)</summaryExtensionVersion ------ better-toml0.3.2 doxdocgen1.4.0 gitlens13.5.0 remotehub0.56.0 vscode-pull-request-github0.62.0 better-cpp-syntax1.17.2 cmake-language-support-vscode0.0.9 vscode-clangd0.1.24 cortex-debug1.10.0 Kotlin1.7.1 Lisp0.1.12 debug-tracker-vscode0.0.15 memory-view0.0.20 rtos-views0.0.6 vscode-docker1.25.0 vscode-dotnet-runtime1.6.0 jupyter-keymap1.1.0 remote-containers0.292.0 remote-ssh0.100.0 remote-ssh-edit0.84.0 remote-wsl0.78.4 azure-repos0.32.0 cmake-tools1.14.31 cpptools-extension-pack1.3.0 remote-explorer0.4.0 remote-repositories0.34.0 veriloghdl1.11.4 probe-rs-debugger0.17.4 awesome-vhdl0.0.1 vscode-xml0.25.0 rust-analyzer0.4.1501 crates0.5.11 cmake0.0.17 vscode-lldb1.9.1 vim1.25.2 markdown-all-in-one3.5.1 vscode-proto30.5.5 (1 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Can you attach the crash logs following the steps at
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.
Same for me. Sometimes it works and then not. Other electron22 applications like Obsidian are working fine. I'm on Arch/Sway and start it with It crashes with the error and I only see an window without content that closes instantly.
are you using ? If not, can you change to it and start the application with the following flags and see if the crash repros. if you are on Sway then you might be hitting , please check if 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 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. Here is a full log of my startup of code with --verbose and WAYLAND_DEBUG=1:
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:
setting the title style to does seem to workaround the bug--updating the description
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 my code- are
Still crashing for me. Last logs with and : <details<summaryWhen pressing maximize</summary</details<details<summaryWhen starting app in maximised state</summary</detailsVS Code 1.78.2 Electron 22.3.3 Mesa 23.0.3 Intel(R) Xe Graphics (TGL GT2) KDE Wayland, No scaling.
I built vscode with Electron 22.3.10 and can no longer reproduce the crashes on Wayland (Plasma 5.27.5) :champagne:. I tested native and custom title bars and did not get a single crash on either with actions that would previously trigger the crash. It seems very likely to me that was the fix for this issue, and I think this issue can be closed once vscode updates to a patched version of Electron. ! (launching with ) If there are any packagers in here, you can use the following snippet to update Electron for your OS packages: And then build normally.
I am experiencing what looks like the same crash, and I can confirm it seems related to the popup that shows during drag-and-drop (for me it reproduces 100% of the time by just trying to drag a folder from the file explorer).
I found workaround: downgrading to version 1.77.3 with Electron 19.1.9 fixes this issue. Looks like regression in upstream or vscode.
I'm running Manjaro Plasma, and it looks like Electron 22.5 doesn't include that fix, or the issue is somewhere else: Just got a crash a few minutes ago after opening a new window by connecting to a Docker container, and clicking maximize immediately afterwards. Edit: I also can't easily repro/disprove the (my config is ) with connecting to a container and clicking maximize right away -- but 1.77.x doesn't crash, 1.78.x does...
Well, considering this doesn't seem to be an official version of Electron you should probably take this up with the Manjaro devs. If you tell them that the fix is in Electron 22.3.9 they should be able to cherry-pick the fix into their weird Electron branch. Specifically, the fix is required for Electron 22. Electron = 23 does not seem to require it, though I didn't actually check to see if the Chromium commit is present in their trees.
Correct, there is no such Electron release. The package in AUR , and as it only uses the pre-built binaries from , I have no explanation nor guesses why it shows that version. I don't even have Electron versions installed on this computer, but as I'm curious, I'll ask around in Arch/Manjaro forums. Edit: The version number is indeed set by the developers: I did manage to pull out a few crashes, but I didn't have logging enabled. I noticed that the cases I had a crash was when the container was removed and re-created, and only then connected to.
Well, that's the proprietary Microsoft version. You can't build that one yourself because it's closed-source. But you can with the Code - OSS version:
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
Nope, still crushing for me. Opening 3-4 windows and moving/maximizing them crashes consistently. !
Is your title bar style set to custom or native?
can you attach the crash logs following the steps at
Sure, here you go
I have the same issue with running on Hyprland when running with . It segfaults on startup the first 3-5 times. After that, it starts fine and I have no issues whatsoever.
Based on reports, looks like this cannot yet be verified pls correct me if i'm wrong
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 , lets continue the conversation in that issue. can you update to latest insiders and check if the crash happens, the version you are on does not contain the fix can you confirm if you are facing the crash with latest insiders ?
Ah, yes that was it. There seems to be a minor issue with the AUR package () where it doesn't update to the latest version unless you completely remove the downloaded packages from the cache. Removing and then installing again updated my code-insiders to the latest version, and fixed the issue.
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: <details<summaryVerbose output (note that there is only one error now(tag not found), the no-such-file error is gone)</summary<pre<codeWarning: 'ozone-platform-hint' is not in the list of known options, but still passed to Electron/Chromium. Found --crash-reporter-directory argument. Setting crashDumps directory to be '/home/leo/code-logs/' [(144)] Binding to zwplinuxdmabufv1 version 3 but version 4 is available. [(144)] Binding to wlseat version 5 but version 8 is available. [(144)] Binding to zwppointergesturesv1 version 1 but version 3 is available. [(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: objectpath= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “” [(144)] version: GetAndBlock: failed. [(274)] Failed to read portal version property [(247)] Floss manager not present, cannot set Floss enable/disable. [(523)] Passthrough is not supported, GL is egl, ANGLE is [(380)] InitializeSandbox() called with multiple threads in process gpu-process. [main 2023-06-10T06:22:46.448Z] [File Watcher ()] Request to start watching: - Insiders/User (excludes: <none, includes: <all), - (excludes: <none, includes: <all) [main 2023-06-10T06:22:46.466Z] Starting VS Code [main 2023-06-10T06:22:46.466Z] from: /opt/visual-studio-code-insiders/resources/app [main 2023-06-10T06:22:46.466Z] args: { : [], diff: false, 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': false, '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-directory': '/home/leo/code-logs/', '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: ' - Insiders/logs/20230610T142246' } [main 2023-06-10T06:22:46.469Z] Resolving machine identifier... [main 2023-06-10T06:22:46.469Z] Resolved machine identifier: cc822720f44bcad27e3b1f751be9ec4415abe59d8f6ab454323fcb11b19ef868 [main 2023-06-10T06:22:46.469Z] Main-SharedProcess#connect [main 2023-06-10T06:22:46.474Z] [File Watcher ()] Started watching: ' - Insiders/User' [main 2023-06-10T06:22:46.475Z] [File Watcher ()] Started watching: ' - ' [main 2023-06-10T06:22:46.477Z] StorageMainService: creating application storage [main 2023-06-10T06:22:46.481Z] ElectronURLListener: waiting for window to be ready to handle URLs... [main 2023-06-10T06:22:46.481Z] lifecycle (main): phase changed (value: 2) [main 2023-06-10T06:22:46.481Z] windowsManager#open [main 2023-06-10T06:22:46.483Z] windowsManager#open pathsToOpen [ { workspace: { id: '', uri: [o] }, type: 2, exists: true } ] [main 2023-06-10T06:22:46.483Z] windowsManager#doOpenFolderOrWorkspace { folderOrWorkspace: { workspace: { id: '', uri: [o] }, type: 2, exists: true }, filesToOpen: undefined } [main 2023-06-10T06:22:46.484Z] IPC Object URL: Registered new channel vscode:-76d6-4c21-829d-. [main 2023-06-10T06:22:46.484Z] window#validateWindowState: validating window state on 1 display(s) { mode: 1, x: 0, y: 0, width: 1256, height: 736 } [main 2023-06-10T06:22:46.485Z] window#validateWindowState: 1 monitor working area { x: 0, y: 0, width: 1280, height: 800 } [main 2023-06-10T06:22:46.485Z] window#ctor: using window state { mode: 1, x: 0, y: 0, width: 1256, height: 736 } [(149)] Server doesn't support zcralphacompositingv1. [(164)] Server doesn't support overlayprioritizer. [(178)] Server doesn't support surfaceaugmenter. [(193)] Server doesn't support wpcontenttypev1 [(212)] Server doesn't support zcrcolormanagementsurface. [(133)] Failed to load a platform cursor of type kNull [(86)] Cannot activate a window because no active windows found! [(86)] Cannot activate a window because no active windows found! [main 2023-06-10T06:22:46.507Z] window#load: attempt to load window (id: 1) [main 2023-06-10T06:22:46.515Z] StorageMainService: creating workspace storage () [main 2023-06-10T06:22:46.516Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 1, emptyToRestore: 0, emptyToOpen: 0) [main 2023-06-10T06:22:46.516Z] lifecycle (main): phase changed (value: 3) [main 2023-06-10T06:22:46.517Z] resolveShellEnv(): skipped (VSCODECLI is set) [main 2023-06-10T06:22:46.517Z] update#setState idle [main 2023-06-10T06:22:46.600Z] resolveShellEnv(): skipped (VSCODECLI is set) [0610/.:ERROR:elfdynamicarray_reader.h(64)] tag not found </code</pre</details
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 and putting in my , but this didn't change much for me. If I do it crashes more often, but it's very sporadic either way. 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 , but I don't have symbols. Nothing obvious shows up. Nope, repro'd there too. 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 ), frequent crashes when opening initial or further windows. Happens since update (everything and above). Since I had some issues with and related to specific commits/dependencies it seems to be difficult to pinpoint, though for me it started around the transition to . With there is not really an obvious reason logged for crashes. I haven't yet experimented with scaling, but a friend reported that crashes at start are solved when (temporary) setting . ! (I.e. the version is higher than the fix mentioned for this issue) The setting doesn't appear to make significant difference for me.
Still crashing for me, but this time after . UPD: Seems to be . Haven't experienced any crash due to window maximizing so far.
I think the crush people still experience is not the original one but the new one reported here Anyway, as a short term workaround you can remove or from and use XWayland. It doesn't crash for me in XWayland.
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 fixed the issue and then to no see the annoying title bar I put this to my and it looks just as good as the X11 platform
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 it comes to me every time. Changing doesn't help either.
Vscode keeps crashing when starting on wayland. IMHO the issue should be reopened. My reproducible stuff:
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.: ) made it look like this issue might be a duplicate of . 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 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 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 as of today. Easiest way to get that is probably the package on the AUR.
Still broken (XWayland works fine tho~)
Not fixed. XWayland not working either (black menus, weird cursor stuff happening).
starting with worked for me

Discussion:
disturl "https://electronjs.org/headers" <del> target "22.3.5" </del> <ins> target "22.3.10" </ins> runtime "electron" build_from_source "true"

}); } exports.config = { <del> version: product.electronRepository ? '22.5.2' : util.getElectronVersion(), </del> <ins> version: product.electronRepository ? '22.5.3' : util.getElectronVersion(), </ins> productAppName: product.nameLong, companyName: 'Microsoft Corporation', copyright: 'Copyright (C) 2023 Microsoft. All rights reserved',

}; } async function main(arch = process.arch) { <del> const version = product.electronRepository ? '22.5.2' : util.getElectronVersion(); </del> <ins> const version = product.electronRepository ? '22.5.3' : util.getElectronVersion(); </ins> const electronPath = path.join(root, '.build', 'electron'); const versionFile = path.join(electronPath, 'version'); const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;

} export const config = { <del> version: product.electronRepository ? '22.5.2' : util.getElectronVersion(), </del> <ins> version: product.electronRepository ? '22.5.3' : util.getElectronVersion(), </ins> productAppName: product.nameLong, companyName: 'Microsoft Corporation', copyright: 'Copyright (C) 2023 Microsoft. All rights reserved',

} async function main(arch = process.arch): Promise<void> { <del> const version = product.electronRepository ? '22.5.2' : util.getElectronVersion(); </del> <ins> const version = product.electronRepository ? '22.5.3' : util.getElectronVersion(); </ins> const electronPath = path.join(root, '.build', 'electron'); const versionFile = path.join(electronPath, 'version'); const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;

"git": { "name": "electron", "repositoryUrl": "https://github.com/electron/electron", <del> "commitHash": "0b17a201195ae6445e11cee50e436a3511717600" </del> <ins> "commitHash": "b07f2f0f42a1483cd2e5ec8fa3c77ebaa0507069" </ins> } }, "isOnlyProductionDependency": true, "license": "MIT", <del> "version": "22.3.5" </del> <ins> "version": "22.3.10" </ins> }, { "component": {

"cssnano": "^4.1.11", "debounce": "^1.0.0", "deemon": "^1.8.0", <del> "electron": "22.3.5", </del> <ins> "electron": "22.3.10", </ins> "eslint": "8.36.0", "eslint-plugin-header": "3.1.1", "eslint-plugin-jsdoc": "^39.3.2",

resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.207.tgz#9c3310ebace2952903d05dcaba8abe3a4ed44c01" integrity sha512-piH7MJDJp4rJCduWbVvmUd59AUne1AFBJ8JaRQvk0KzNTSUnZrVXHCZc+eg+CGE4OujkcLJznhGKD6tuAshj5Q== <del> electron@22.3.5: version "22.3.5" resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.5.tgz#a53a318cbb25a44914dfedd30a9ad6120632197f" integrity sha512-CTdnoTbO3sDiMv47TX3ZO640Ca57v1qpiqGChFF8oZbtfHuQjTPPaE4hsoynf22wwnBiyJNL41DpB/pfp9USnA== </del> <ins> electron@22.3.10: version "22.3.10" resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.10.tgz#bf2b98fbb452f41b057ffcd4e57678e363f9735c" integrity sha512-gh7PtSh+rfxHfM4dzPiEO+k1NRo07FvaK/jXG3HzuODrpTTEhC9rsE+AJGrTKQU6Nz7GorseMvnvs8PnUQPPTw== </ins> dependencies: "@electron/get" "^2.0.0" "@types/node" "^16.11.26"