<ul dir="auto">
<li>Electron version: 1.6.11</li>
<li>Operating system: macOS 10.12.5</li>
</ul>
<h3 dir="auto">Expected behaviour</h3>
<p dir="auto">Create and destroy the tray instance multiple times with no issues or faulty behaviour.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">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 <code class="notranslate">Received signal 11 SEGV_MAPERR</code> followed by the stack dump.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">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.</p>
<p dir="auto">Repository: <a href="https://github.com/antonio-ramadas/electron-tray-app-crash">https://github.com/antonio-ramadas/electron-tray-app-crash</a></p>
<ul dir="auto">
<li>Electron Version: latest (non beta)</li>
<li>Operating System (Platform and Version): mac high sierrra</li>
<li>Last known working Electron version: n/a</li>
</ul>
<p dir="auto"><strong>Expected Behavior</strong><br>
I have 2 independent tray icons. When I destroy one icon sometimes application crashes with this error:<br>
<code class="notranslate">Electron[6667:281388] -[__NSCFString isMenuOpen]: unrecognized selector sent to instance 0x7fc7f35c28d0</code></p>
<p dir="auto"><strong>Actual behavior</strong><br>
It should not crash</p>