Skip to content

Tray destroy method crashes the app #9982

Closed

Description

@antonio-ramadas
  • Electron version: 1.6.11
  • Operating system: macOS 10.12.5

Expected behaviour

Create and destroy the tray instance multiple times with no issues or faulty behaviour.

Actual behavior

Create the tray instance and destroy it, one after the other. You may need to repeat these steps multiple times. The crash will eventually happen when destroying the tray instance. The app crash seems to happen randomly. From my experience, it may happen on the first time or only after multiple repetitions (7 or so). The app will crash with Received signal 11 SEGV_MAPERR followed by the stack dump.

How to reproduce

I've created a repository to reproduce the issue. There's only one branch and the instructions, as some other information, is in the README.md file at the root level. The tray instance has a context menu, built from the template, and the window has a button to create the instance. Lastly, the repository is based on the sample app provided by Electron.

Repository: https://github.com/antonio-ramadas/electron-tray-app-crash

Activity

  1. microshine commented on Nov 27, 2017

    @microshine

    I've got the same problem

    Electron: v1.7.6
    OS: OS X 10.13.1

  2. matt-way commented on Nov 28, 2017

    @matt-way
    Contributor

    Not sure if exactly related, but I found that destroying the tray would crash on my machine due to a mouse tracking race condition.

    See: #11272

  3. Splode commented on Mar 14, 2018

    @Splode

    I'm encountering this issue as well.

    Electron v.1.7.5
    OS: OS X 10.13.3

  4. nalejandroveron commented on Apr 25, 2018

    @nalejandroveron

    I think that i've got it, just wrap the .destroy() in a setTimeout() like this:

    setTimeout(() => {
      myTray.destroy()
    }, 0)
  5. LabDeve commented on Jun 28, 2018

    @LabDeve

    I've got the same problem...

    Electron v.2.0.3
    OS: OS X 10.13.5

  6. digitalergonom commented on Jul 4, 2018

    @digitalergonom

    Subscribing this, because we got the same issue here.

  7. miniak commented on Sep 2, 2018

    @miniak
    Contributor

    Seems like a duplicate of #14036

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