Skip to content

Menu: updating menu while visible can cause a crash when hovering over it #14213

Closed

Description

@bpasero
  • Electron Version: 2.0.7
  • Operating System (Platform and Version): Windows 10
  • Last known working Electron version: possibly 1.7.x

Expected Behavior
Updating menu while visible should not crash when hovering over it

Actual behavior
In VSCode we recently added code to update the main menu bar more frequently right after startup. If a user manages to interact with the menu while it is being replaced, chances are a crash comes up.

The crash reveals some details when using a debug build of 2.0.7:

ui_base.dll!0000028cc4e233f5()
views.dll!0000028cc50f4be3()
electron.exe!atom::MenuDelegate::SelectionChanged(views::MenuItemView * menu) Line 88
    at c:\gitdevelopment\electron\atom\browser\ui\views\menu_delegate.cc(88)
views.dll!0000028cc50ddabb()
views.dll!0000028cc50d7abd()
views.dll!0000028cc50d9d4d()
views.dll!0000028cc50e7b90()
views.dll!0000028cc51f79bb()
views.dll!0000028cc529dd71()
events.dll!0000028cbfbfd413()
events.dll!0000028cbfbfa333()
events.dll!0000028cbfbfae02()
events.dll!0000028cbfbfaa16()
events.dll!0000028cbfbfa4d4()
events.dll!0000028cbfbfe274()
events.dll!0000028cbfc0070a()
events.dll!0000028cbfc00bf8()
views.dll!0000028cc52bc3ec()
views.dll!0000028cc5226dd4()
views.dll!0000028cc522b584()
views.dll!0000028cc521319a()
views.dll!0000028cc522ef03()
gfx.dll!0000028cc01bce9c()
gfx.dll!0000028cc01ba345()
[External Code]
base.dll!0000028cb2f91526()
base.dll!0000028cb2f9164b()
base.dll!0000028cb2f90983()
base.dll!0000028cb2f91f8d()
base.dll!0000028cb2f870f0()
base.dll!0000028cb308ec8f()
content.dll!0000028cba8733c9()
content.dll!0000028cba875af7()
content.dll!0000028cba87d6f4()
content.dll!0000028cba862e20()
content.dll!0000028cbd01e794()
content.dll!0000028cbd01e5f3()
content.dll!0000028cbd01b80f()
embedder.dll!0000028cc9a2f9d2()
content.dll!0000028cbd01be86()
electron.exe!wWinMain(HINSTANCE__ * instance, HINSTANCE__ * __formal, wchar_t * cmd, int __formal) Line 153
    at c:\gitdevelopment\electron\atom\app\atom_main.cc(153)
[External Code]

To Reproduce
I still was not able to reproduce this outside of VSCode. But for VSCode the steps are:

  • start VSCode
  • right when the "File" menu shows up, click it
  • move the mouse up and down so that menu items get selected
  • wait for the application to crash after a while

grid-tw

Activity

  1. bpasero commented on Aug 20, 2018

    @bpasero
    ContributorAuthor

    Minimal repro (though different crash it seems): https://gist.github.com/bpasero/dd1290a862368e0590016a16065d29c7

    Steps:

    • start fiddle
    • quickly click into "File" menu
    • leave it showing while moving the mouse around
    views.dll!000001d3f967b2f6()
    views.dll!000001d3f967d8d8()
    electron.exe!atom::MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point & screenPoint, atom::AtomMenuModel * * menu_model, views::MenuButton * * button) Line 85
    	at c:\gitdevelopment\electron\atom\browser\ui\views\menu_bar.cc(85)
    electron.exe!atom::MenuDelegate::GetSiblingMenu(views::MenuItemView * menu, const gfx::Point & screen_point, views::MenuAnchorPosition * anchor, bool * has_mnemonics, views::MenuButton * * __formal) Line 115
    	at c:\gitdevelopment\electron\atom\browser\ui\views\menu_delegate.cc(115)
    views.dll!000001d3f958e3b8()
    views.dll!000001d3f9587a8d()
    views.dll!000001d3f9589d4d()
    views.dll!000001d3f9597b90()
    views.dll!000001d3f96a79bb()
    views.dll!000001d3f974dd71()
    events.dll!000001d3f423d413()
    events.dll!000001d3f423a333()
    events.dll!000001d3f423ae02()
    events.dll!000001d3f423aa16()
    events.dll!000001d3f423a4d4()
    events.dll!000001d3f423e274()
    events.dll!000001d3f424070a()
    events.dll!000001d3f4240bf8()
    views.dll!000001d3f976c3ec()
    views.dll!000001d3f96d6dd4()
    views.dll!000001d3f96db584()
    views.dll!000001d3f96c319a()
    views.dll!000001d3f96def03()
    gfx.dll!000001d3f441ce9c()
    gfx.dll!000001d3f441a345()
    [External Code]
    base.dll!000001d3e7b41526()
    base.dll!000001d3e7b4164b()
    base.dll!000001d3e7b40983()
    base.dll!000001d3e7b41f8d()
    base.dll!000001d3e7b370f0()
    base.dll!000001d3e7c3ec8f()
    content.dll!000001d3eec633c9()
    content.dll!000001d3eec65af7()
    content.dll!000001d3eec6d6f4()
    content.dll!000001d3eec52e20()
    content.dll!000001d3f140e794()
    content.dll!000001d3f140e5f3()
    content.dll!000001d3f140b80f()
    embedder.dll!000001d3fde3f9d2()
    content.dll!000001d3f140be86()
    electron.exe!wWinMain(HINSTANCE__ * instance, HINSTANCE__ * __formal, wchar_t * cmd, int __formal) Line 153
    	at c:\gitdevelopment\electron\atom\app\atom_main.cc(153)
    [External Code]
    
    
  2. bpasero commented on Aug 20, 2018

    @bpasero
    ContributorAuthor

    I believe a good solution would be to implement somthing like #13966 for Windows and Linux as well.

  3. self-assigned this
    on Aug 20, 2018
  4. codebytere commented on Aug 20, 2018

    @codebytere
    Member

    @bpasero does this happen on 3.0 betas as well?

  5. bpasero commented on Aug 21, 2018

    @bpasero
    ContributorAuthor

    @codebytere yes, reproduces with 3.0 beta 6 as well.

    before

  6. removed their assignment
    on Sep 30, 2018
  7. sofianguy commented on Aug 9, 2019

    @sofianguy
    Contributor

    @bpasero is this bug happening on version 4.x or later?

  8. added
    blocked/need-info ❌
    on Aug 9, 2019
  9. bpasero commented on Aug 9, 2019

    @bpasero
    ContributorAuthor

    We no longer use the native menu on Electron.

  10. patsimm commented on Sep 5, 2019

    @patsimm

    @sofianguy Yes this is still happening to us. Just testet with version 4.x, 5.x and 6.x. I would vote for reopening this issue.

    Edit: Also this happens on linux and windows but not on macOS

  11. removed
    blocked/need-info ❌
    on Sep 18, 2019
  12. electron-triage commented on Mar 9, 2021

    @electron-triage

    The Electron version reported on this issue is no longer supported. See our supported versions documentation.

    If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know.

    Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions