<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li>**Electron Version:<em>10.1.2</em>
<ul dir="auto">
<li>

</li>
</ul>
</li>
<li>**Operating System:<em>Windows 10 Enterprise</em>
<ul dir="auto">
<li>

</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>

</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>

<p dir="auto">I am trying to stop the second instance under special circumstances (which is not being over the registered protocol/scheme).</p>
<h3 dir="auto">Actual Behavior</h3>

<p dir="auto">I identify the second instance and call app.quit() but the application window still appears. I tried app.exit() instead with no luck.<br>
The application continues to open up (new windows). I also notice no calls made to these events after calling quit() or exit():</p>
<p dir="auto">app.on('window-all-closed', () =&gt; {<br>
console.log('window-all-closed ', process.platform);</p>
<p dir="auto">});</p>
<p dir="auto">app.on('before-quit', () =&gt; {<br>
console.log('before-quit');<br>
mainWindow.close();<br>
});</p>
<p dir="auto">app.on('activate', () =&gt; {<br>
console.log('activate is called');<br>
if (mainWindow === null) {<br>
mainWindow = windowLauncher.createWindow();<br>
}<br>
});</p>
<p dir="auto">as the console.log does not write anything in the output.</p>
<h3 dir="auto">To Reproduce</h3>

<p dir="auto">call app.requestSingleInstanceLock() and try to quit the app if no lock could be gained from the call.</p>



<h3 dir="auto">Screenshots</h3>

<h3 dir="auto">Additional Information</h3>

<p dir="auto">here is my code:</p>
<p dir="auto"><code class="notranslate">const gotTheLock: boolean = app.requestSingleInstanceLock(); if (!gotTheLock) { console.log('second instance identified, closing the app'); app.quit(); console.log('quit() was called'); }</code></p>
<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong> v11.2.0</li>
<li><strong>Operating System:</strong> macOS Big Sur 11.1</li>
<li><strong>Last Known Working Electron version:</strong></li>
</ul>
<h3 dir="auto">Expected Behavior</h3>

<p dir="auto">Electron renderer process not to crash.</p>
<h3 dir="auto">Actual Behavior</h3>

<p dir="auto">Electron renderer process crashes.</p>
<h3 dir="auto">To Reproduce</h3>

<p dir="auto"><strong>Make sure to use the ARM version of node!</strong><br>
Download GAM file: <a href="http://mirror.ifarchive.org/if-archive/games/tads/worlds.zip" rel="nofollow">http://mirror.ifarchive.org/if-archive/games/tads/worlds.zip</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/Durafen/lectrote.git

cd lectrote

git submodule init

git submodule update

npm install

.\node_modules\.bin\electron ."><pre class="notranslate"><code class="notranslate">git clone https://github.com/Durafen/lectrote.git

cd lectrote

git submodule init

git submodule update

npm install

.\node_modules\.bin\electron .
</code></pre></div>
<p dir="auto">And then extract the worlds.gam file to the same directory as lectrote and then load it from the interface.</p>



<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7021881/104929729-ee2b6380-59ac-11eb-8abb-7298f4628e0f.png"><img src="https://user-images.githubusercontent.com/7021881/104929729-ee2b6380-59ac-11eb-8abb-7298f4628e0f.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">This is the output from the run:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
[43191:0x7100000000]       44 ms: Scavenge 3.0 (4.3) -&gt; 2.9 (4.8) MB, 0.5 / 0.0 ms  (average mu = 1.000, current mu = 1.000) allocation failure 
[43191:0x7100000000]       52 ms: Scavenge 4.1 (5.5) -&gt; 3.7 (8.0) MB, 0.4 / 0.0 ms  (average mu = 1.000, current mu = 1.000) allocation failure 
[43191:0x7100000000]       96 ms: Scavenge 4.9 (8.5) -&gt; 4.5 (9.3) MB, 0.4 / 0.0 ms  (average mu = 1.000, current mu = 1.000) external memory pressure 


&lt;--- JS stacktrace ---&gt;

[43185:0118/164751.510962:ERROR:shared_image_manager.cc(143)] SharedImageManager::ProduceGLTexture: Trying to produce a representation from a non-existent mailbox. 93:F0:C7:06:C4:41:42:D4:65:FB:D7:38:76:16:D2:F5
[43185:0118/164751.511256:ERROR:gles2_cmd_decoder.cc(19029)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoCreateAndTexStorage2DSharedImageINTERNAL: invalid mailbox name
[43185:0118/164751.511282:ERROR:gles2_cmd_decoder.cc(19050)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.511299:ERROR:gles2_cmd_decoder.cc(13915)] [.DisplayCompositor]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[43185:0118/164751.511313:ERROR:shared_image_manager.cc(143)] SharedImageManager::ProduceGLTexture: Trying to produce a representation from a non-existent mailbox. C2:8E:5D:7C:46:DE:36:D8:DC:4A:AD:2F:D1:39:CC:EB
[43185:0118/164751.511330:ERROR:gles2_cmd_decoder.cc(19029)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoCreateAndTexStorage2DSharedImageINTERNAL: invalid mailbox name
[43185:0118/164751.511345:ERROR:gles2_cmd_decoder.cc(19050)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.511358:ERROR:gles2_cmd_decoder.cc(13915)] [.DisplayCompositor]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[43185:0118/164751.511372:ERROR:shared_image_manager.cc(143)] SharedImageManager::ProduceGLTexture: Trying to produce a representation from a non-existent mailbox. A2:84:80:A8:A1:72:CE:4B:6D:0E:A6:B5:7A:F1:64:29
[43185:0118/164751.511386:ERROR:gles2_cmd_decoder.cc(19029)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoCreateAndTexStorage2DSharedImageINTERNAL: invalid mailbox name
[43185:0118/164751.511398:ERROR:gles2_cmd_decoder.cc(19050)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.511414:ERROR:gles2_cmd_decoder.cc(13915)] [.DisplayCompositor]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[43185:0118/164751.511425:ERROR:shared_image_manager.cc(143)] SharedImageManager::ProduceGLTexture: Trying to produce a representation from a non-existent mailbox. CB:2A:78:10:69:E1:B9:C3:33:32:F8:EA:E8:4C:60:2F
[43185:0118/164751.511441:ERROR:gles2_cmd_decoder.cc(19029)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoCreateAndTexStorage2DSharedImageINTERNAL: invalid mailbox name
[43185:0118/164751.511454:ERROR:gles2_cmd_decoder.cc(19050)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.511472:ERROR:gles2_cmd_decoder.cc(13915)] [.DisplayCompositor]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
[43185:0118/164751.519830:ERROR:gles2_cmd_decoder.cc(19079)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.519861:ERROR:gles2_cmd_decoder.cc(19079)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.519875:ERROR:gles2_cmd_decoder.cc(19079)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.519887:ERROR:gles2_cmd_decoder.cc(19079)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared  @image```"><pre lang="&lt;---" class="notranslate"><code class="notranslate">
[43191:0x7100000000]       44 ms: Scavenge 3.0 (4.3) -&gt; 2.9 (4.8) MB, 0.5 / 0.0 ms  (average mu = 1.000, current mu = 1.000) allocation failure 
[43191:0x7100000000]       52 ms: Scavenge 4.1 (5.5) -&gt; 3.7 (8.0) MB, 0.4 / 0.0 ms  (average mu = 1.000, current mu = 1.000) allocation failure 
[43191:0x7100000000]       96 ms: Scavenge 4.9 (8.5) -&gt; 4.5 (9.3) MB, 0.4 / 0.0 ms  (average mu = 1.000, current mu = 1.000) external memory pressure 


&lt;--- JS stacktrace ---&gt;

[43185:0118/164751.510962:ERROR:shared_image_manager.cc(143)] SharedImageManager::ProduceGLTexture: Trying to produce a representation from a non-existent mailbox. 93:F0:C7:06:C4:41:42:D4:65:FB:D7:38:76:16:D2:F5
[43185:0118/164751.511256:ERROR:gles2_cmd_decoder.cc(19029)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoCreateAndTexStorage2DSharedImageINTERNAL: invalid mailbox name
[43185:0118/164751.511282:ERROR:gles2_cmd_decoder.cc(19050)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.511299:ERROR:gles2_cmd_decoder.cc(13915)] [.DisplayCompositor]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[43185:0118/164751.511313:ERROR:shared_image_manager.cc(143)] SharedImageManager::ProduceGLTexture: Trying to produce a representation from a non-existent mailbox. C2:8E:5D:7C:46:DE:36:D8:DC:4A:AD:2F:D1:39:CC:EB
[43185:0118/164751.511330:ERROR:gles2_cmd_decoder.cc(19029)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoCreateAndTexStorage2DSharedImageINTERNAL: invalid mailbox name
[43185:0118/164751.511345:ERROR:gles2_cmd_decoder.cc(19050)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.511358:ERROR:gles2_cmd_decoder.cc(13915)] [.DisplayCompositor]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[43185:0118/164751.511372:ERROR:shared_image_manager.cc(143)] SharedImageManager::ProduceGLTexture: Trying to produce a representation from a non-existent mailbox. A2:84:80:A8:A1:72:CE:4B:6D:0E:A6:B5:7A:F1:64:29
[43185:0118/164751.511386:ERROR:gles2_cmd_decoder.cc(19029)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoCreateAndTexStorage2DSharedImageINTERNAL: invalid mailbox name
[43185:0118/164751.511398:ERROR:gles2_cmd_decoder.cc(19050)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.511414:ERROR:gles2_cmd_decoder.cc(13915)] [.DisplayCompositor]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[43185:0118/164751.511425:ERROR:shared_image_manager.cc(143)] SharedImageManager::ProduceGLTexture: Trying to produce a representation from a non-existent mailbox. CB:2A:78:10:69:E1:B9:C3:33:32:F8:EA:E8:4C:60:2F
[43185:0118/164751.511441:ERROR:gles2_cmd_decoder.cc(19029)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoCreateAndTexStorage2DSharedImageINTERNAL: invalid mailbox name
[43185:0118/164751.511454:ERROR:gles2_cmd_decoder.cc(19050)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.511472:ERROR:gles2_cmd_decoder.cc(13915)] [.DisplayCompositor]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
[43185:0118/164751.519830:ERROR:gles2_cmd_decoder.cc(19079)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.519861:ERROR:gles2_cmd_decoder.cc(19079)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.519875:ERROR:gles2_cmd_decoder.cc(19079)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared image
[43185:0118/164751.519887:ERROR:gles2_cmd_decoder.cc(19079)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared  @image```
</code></pre></div>