Skip to content

Crash when rebuilding application menu on wayland #184124

Closed

Description

@deepak1556

Extracted from #181533 (comment)

Crash reason:  SIGSEGV /SEGV_MAPERR
Crash address: 0x1010101
Process uptime: 142 seconds

Thread 0 (crashed)
 0  code-insiders!views::View::UnregisterChildrenForVisibleBoundsNotification(views::View*) [view.cc : 2859 + 0x0]
 1  code-insiders!views::View::UnregisterChildrenForVisibleBoundsNotification(views::View*) [view.cc : 2860 + 0x5]
 2  code-insiders!views::View::DoRemoveChildView(views::View*, bool, bool, views::View*) [view.cc : 2702 + 0x8]
 3  code-insiders!views::View::RemoveAllChildViews() [view.cc : 340 + 0x12]
 4  code-insiders!electron::MenuBar::RebuildChildren() [menu_bar.cc : 234 + 0x5]
 5  code-insiders!electron::RootView::SetMenu(electron::ElectronMenuModel*) [root_view.cc : 71 + 0x8]
 6  code-insiders!electron::api::BaseWindow::SetMenu(v8::Isolate*, v8::Local<v8::Value>) [electron_api_base_window.cc : 0 + 0x8]
 7  code-insiders!gin_helper::Dispatcher<void (electron::api::BaseWindow*, v8::Isolate*, v8::Local<v8::Value>)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&) [callback.h : 267 + 0x3]
 8  code-insiders!v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [api-arguments-inl.h : 146 + 0x3]

Mithras (@Mithras) can you provide the following details to help us repro the issue,

  1. Are you using custom or native titlebar ?
  2. Are you starting the application with --ozone-platform=wayland --enable-features=WaylandWindowDecorations ?
  3. Where did you install insiders from ? Snap, deb or rpm ?
  4. A video recording showing the exact repro steps will be helpful.

Activity

  1. added
    bug
    info-needed
    freeze-slow-crash-leak
    linux
    wayland
    upstream
    electron
    and removed on Jun 2, 2023
  2. Mithras commented on Jun 2, 2023

    @Mithras
    1. Native but I don't think it matters as I can repo this with both native and custom:
      image
    2. Yes (assuming code-insiders uses the same ~/.config/code-flags.conf)
      --enable-features=WaylandWindowDecorations
      --ozone-platform-hint=auto
      
    3. AUR (https://aur.archlinux.org/packages/visual-studio-code-insiders-bin)
    4. https://youtu.be/DfQ8Jyeqhpk
  3. Mithras commented on Jun 2, 2023

    @Mithras
    1. titlebar=Custom: https://youtu.be/Pc1cJ9BZnVY

    It almost always (but not exclusively) happens when I try to maximize one of the windows. Sometimes it crashes immediately, sometimes I need to open/move/expand/collapse for a few minutes. It seems to happen more (or maybe even only) if there are a couple different folders opened. I can't seem to repo it with only default "Welcome" tab.

  4. Mithras commented on Jun 2, 2023

    @Mithras

    No difference between --ozone-platform=wayland and --ozone-platform-hint=auto both crash. Removing --ozone-platform fixes the issue so it only reproducible in Wayland.

  5. deepak1556 commented on Jun 3, 2023

    @deepak1556
    CollaboratorAuthor

    Which OS and desktop environment are you testing on ?

  6. Mithras commented on Jun 3, 2023

    @Mithras

    image

  7. 195 remaining items

  8. C0rn3j commented on Apr 10, 2024

    @C0rn3j

    I am pretty sure there are multiple Wayland crashes being talked about in this thread (and many more in the thread that this one is extracted from), some of them fixed in the current 1.88.

    If you still experience crashes, attaching debug logs and other information from 1.88 would probably be helpful to the developers.

    I still have uncommon crashing issues, but it's no longer 100% reproducible.

  9. VikinoCavalier commented on May 14, 2024

    @VikinoCavalier

    Extracted from #181533 (comment)

    Crash reason:  SIGSEGV /SEGV_MAPERR
    Crash address: 0x1010101
    Process uptime: 142 seconds
    
    Thread 0 (crashed)
     0  code-insiders!views::View::UnregisterChildrenForVisibleBoundsNotification(views::View*) [view.cc : 2859 + 0x0]
     1  code-insiders!views::View::UnregisterChildrenForVisibleBoundsNotification(views::View*) [view.cc : 2860 + 0x5]
     2  code-insiders!views::View::DoRemoveChildView(views::View*, bool, bool, views::View*) [view.cc : 2702 + 0x8]
     3  code-insiders!views::View::RemoveAllChildViews() [view.cc : 340 + 0x12]
     4  code-insiders!electron::MenuBar::RebuildChildren() [menu_bar.cc : 234 + 0x5]
     5  code-insiders!electron::RootView::SetMenu(electron::ElectronMenuModel*) [root_view.cc : 71 + 0x8]
     6  code-insiders!electron::api::BaseWindow::SetMenu(v8::Isolate*, v8::Local<v8::Value>) [electron_api_base_window.cc : 0 + 0x8]
     7  code-insiders!gin_helper::Dispatcher<void (electron::api::BaseWindow*, v8::Isolate*, v8::Local<v8::Value>)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&) [callback.h : 267 + 0x3]
     8  code-insiders!v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [api-arguments-inl.h : 146 + 0x3]
    

    @Mithras can you provide the following details to help us repro the issue,

    1. Are you using custom or native titlebar ?
    2. Are you starting the application with --ozone-platform=wayland --enable-features=WaylandWindowDecorations ?
    3. Where did you install insiders from ? Snap, deb or rpm ?
    4. A video recording showing the exact repro steps will be helpful.
  10. spikespaz commented on May 14, 2024

    @spikespaz

    Martin (@C0rn3j) Yes, after updating to version 1.88, I was hoping the new Electron version would resolve the issue, but unfortunately, it didn't. I wasn't aware of the env vars, I'll definitely give them a try. Thanks for the tip!

    Ah, got it. So I had those features enabled: --enable-features=UseOzonePlatform,WaylandWindowDecorations. Now that I've disabled them, it seems to be more stable. I'll keep an eye on it for the next 2-3 days and update you accordingly.

    Update: I haven't experienced any issues since removing the option --enable-features=UseOzonePlatform,WaylandWindowDecorations.

    Electron 28 chooses to use Wayland without explicitly setting UseOzonePlatform and WaylandWindowDecorations? Are you sure it isn't using Xwayland? What WM/DE are you using?


    Vscode:

    Version: 1.88.1
    Commit: e170252f762678dec6ca2cc69aba1570769a5d39
    Date: 2024-04-10T17:34:12.840Z
    Electron: 28.2.8
    ElectronBuildId: 27744544
    Chromium: 120.0.6099.291
    Node.js: 18.18.2
    V8: 12.0.267.19-electron.0
    OS: Linux x64 6.6.28
    

    Wrapper:

    exec -a "$0" "/nix/store/2255594likj46bixv013j9h2cv1r5in5-vscode-1.88.1/bin/.code-wrapped"  ${NIXOS_OZONE_WL:+${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}  "$@"
    

    No problems here.

  11. ali10129 commented on Jul 29, 2024

    @ali10129

    Hi, I just changed the

    "window.titleBarStyle": "native,"

    to "custom", and it worked for me. my default was "native" and I had this problem. I tried everything. but when I saw your solution, I changed it to "custom".
    by the way, since I had this problem with the snap version, I switched to apt version.

  12. xmatthias commented on Jul 31, 2024

    @xmatthias

    Interestingly, i've got titlebar style to "custom" for all profiles - and yet, it's the 2nd time this week that i'm seeing a crash of vscode.

  13. LeanderK commented on Aug 1, 2024

    @LeanderK

    I rarely have a vscode crash anymore, once a month max. I've got titlebar style custom. I used to see them quite often!

  14. C0rn3j commented on Aug 1, 2025

    @C0rn3j

    Robo (@deepak1556) I think this can be closed?

    I do not have the issue anymore and judging by the radio silence for the last 8 months, I suppose the problem is gone for people.

  15. Sewer56 commented on Aug 1, 2025

    @Sewer56

    Yeah, it can probably be closed.

  16. pierrick-martin-dev commented on Aug 1, 2025

    @pierrick-martin-dev

    I confirm, no more issue. I can't pinpoint the exact release for which the problem was solved. Can be closed.

  17. deepak1556 commented on Oct 9, 2025

    @deepak1556
    CollaboratorAuthor

    Thanks for confirming, closing for now.

  18. added
    verified
    on Oct 9, 2025
  19. locked and limited conversation to collaborators on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugconfirmedelectronfreeze-slow-crash-leaklinuxupstreamupstream-issue-linkedverifiedwayland

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions