<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>
<ul dir="auto">
<li>9.0.0-beta.18 (also reproducible in 8.2.3)</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 10 1909</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>Unknown</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The web page to behave as expected.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Electron crashes:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Received fatal exception EXCEPTION_ACCESS_VIOLATION

Backtrace:

(No symbol) [0x0000000000000000]

std::__1::vector&lt;v8::CpuProfileDeoptInfo,std::__1::allocator&lt;v8::CpuProfileDeoptInfo&gt; &gt;::get_allocator [0x00007FF6BF946448+58424]

uv_fs_get_statbuf [0x00007FF6C15FB25C+86348]

uv_cond_signal [0x00007FF6C1ADB90E+938254]

uv_cond_signal [0x00007FF6C1AE018D+956813]

uv_cond_signal [0x00007FF6C1ADFD87+955783]

uv_cond_signal [0x00007FF6C1ADA320+932640]

uv_cond_signal [0x00007FF6C1ADABE7+934887]

uv_cond_signal [0x00007FF6C1AEBCD0+1004752]

uv_mutex_unlock [0x00007FF6C19B67B1+2152321]

uv_gettimeofday [0x00007FF6C21774A9+225113]

uv_gettimeofday [0x00007FF6C2177230+224480]

uv_mutex_unlock [0x00007FF6C19F2374+2396996]

uv_mutex_unlock [0x00007FF6C19F1ADE+2394798]

uv_gettimeofday [0x00007FF6C2177AB8+226664]

uv_mutex_unlock [0x00007FF6C19A239A+2069354]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C103D772+5951442]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C103D643+5951139]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C103F2C1+5958433]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C103AFED+5941325]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F4022D+4913805]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F40DD1+4916785]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F40A93+4915955]

IsSandboxedProcess [0x00007FF6C1EA8BC3+310707]

v8::ResourceConstraints::ResourceConstraints [0x00007FF6C0314F3E+1398462]

Ordinal0 [0x00007FF6BF87140B+5131]

node::AsyncResource::CallbackScope::CallbackScope [0x00007FF6C4CCB982+21725986]

BaseThreadInitThunk [0x00007FFF6E917BD4+20]

RtlUserThreadStart [0x00007FFF6F2ACE51+33]

Electron exited with code 3221225477."><pre class="notranslate"><code class="notranslate">Received fatal exception EXCEPTION_ACCESS_VIOLATION

Backtrace:

(No symbol) [0x0000000000000000]

std::__1::vector&lt;v8::CpuProfileDeoptInfo,std::__1::allocator&lt;v8::CpuProfileDeoptInfo&gt; &gt;::get_allocator [0x00007FF6BF946448+58424]

uv_fs_get_statbuf [0x00007FF6C15FB25C+86348]

uv_cond_signal [0x00007FF6C1ADB90E+938254]

uv_cond_signal [0x00007FF6C1AE018D+956813]

uv_cond_signal [0x00007FF6C1ADFD87+955783]

uv_cond_signal [0x00007FF6C1ADA320+932640]

uv_cond_signal [0x00007FF6C1ADABE7+934887]

uv_cond_signal [0x00007FF6C1AEBCD0+1004752]

uv_mutex_unlock [0x00007FF6C19B67B1+2152321]

uv_gettimeofday [0x00007FF6C21774A9+225113]

uv_gettimeofday [0x00007FF6C2177230+224480]

uv_mutex_unlock [0x00007FF6C19F2374+2396996]

uv_mutex_unlock [0x00007FF6C19F1ADE+2394798]

uv_gettimeofday [0x00007FF6C2177AB8+226664]

uv_mutex_unlock [0x00007FF6C19A239A+2069354]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C103D772+5951442]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C103D643+5951139]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C103F2C1+5958433]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C103AFED+5941325]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F4022D+4913805]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F40DD1+4916785]

v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F40A93+4915955]

IsSandboxedProcess [0x00007FF6C1EA8BC3+310707]

v8::ResourceConstraints::ResourceConstraints [0x00007FF6C0314F3E+1398462]

Ordinal0 [0x00007FF6BF87140B+5131]

node::AsyncResource::CallbackScope::CallbackScope [0x00007FF6C4CCB982+21725986]

BaseThreadInitThunk [0x00007FFF6E917BD4+20]

RtlUserThreadStart [0x00007FFF6F2ACE51+33]

Electron exited with code 3221225477.
</code></pre></div>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">See electron fiddle at:</p>
<p dir="auto"><a href="https://gist.github.com/Niquolas/81cc70179578975651e7efd94d6f9748">https://gist.github.com/Niquolas/81cc70179578975651e7efd94d6f9748</a></p>
<p dir="auto">Ensure any adblockers e.g. Pi-hole are disabled.</p>
<ol dir="auto">
<li>Launch the application</li>
<li>Wait for the page to fully load</li>
<li>Interact with the page (clicking on an ad yields the most consistent results)</li>
</ol>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">There seems to be a script on the page (probably an advert, as enabling Pi-hole negates the issue for me) that is causing the native crash.</p>
<p dir="auto">Not sure if this is an Electron bug or something further upstream, so I thought it best to check here. Apologies if this is out of scope.</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>
<ul dir="auto">
<li>9.0.0-beta.5</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>MacOS 10.15.3</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>Unknown</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Navigating to a page (afaict when it has an iframe) and then navigating away via "Back" should not crash Electron.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Electron crashes with the following trace (with debug symbols):</p>
<details>
```
Received signal 11 SEGV_MAPERR 058c0000057c
0   Electron Framework                  0x0000000117ad7739 base::debug::CollectStackTrace(void**, unsigned long) + 9
1   Electron Framework                  0x00000001179a8df3 base::debug::StackTrace::StackTrace() + 19
2   Electron Framework                  0x0000000117ad75e1 base::debug::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, void*) + 2385
3   libsystem_platform.dylib            0x00007fff652b242d _sigtramp + 29
4   ???                                 0x00007f9d56173880 0x0 + 140313730955392
5   Electron Framework                  0x0000000117231c1c network_hints::mojom::NetworkHintsHandlerStubDispatch::Accept(network_hints::mojom::NetworkHintsHandler*, mojo::Message*) + 1148
6   Electron Framework                  0x0000000117ebc45f mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) + 991
7   Electron Framework                  0x0000000117ec09fb mojo::MessageDispatcher::Accept(mojo::Message*) + 283
8   Electron Framework                  0x0000000117ebdb08 mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) + 120
9   Electron Framework                  0x0000000117ec65cb mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper*, mojo::internal::MultiplexRouter::ClientCallBehavior, base::SequencedTaskRunner*) + 1451
10  Electron Framework                  0x0000000117ec5a7a mojo::internal::MultiplexRouter::Accept(mojo::Message*) + 426
11  Electron Framework                  0x0000000117ec09fb mojo::MessageDispatcher::Accept(mojo::Message*) + 283
12  Electron Framework                  0x0000000117eb4184 mojo::Connector::DispatchMessage(mojo::Message) + 420
13  Electron Framework                  0x0000000117eb5146 mojo::Connector::ReadAllAvailableMessages() + 710
14  Electron Framework                  0x0000000117eb4d89 mojo::Connector::OnHandleReadyInternal(unsigned int) + 185
15  Electron Framework                  0x0000000112819447 mojo::SimpleWatcher::DiscardReadyState(base::RepeatingCallback const&amp;, unsigned int, mojo::HandleSignalsState const&amp;) + 103
16  Electron Framework                  0x0000000117eea8fb mojo::SimpleWatcher::OnHandleReady(int, unsigned int, mojo::HandleSignalsState const&amp;) + 443
17  Electron Framework                  0x0000000117eeaea1 void base::internal::Invoker, int, unsigned int, mojo::HandleSignalsState&gt;, void ()&gt;::RunImpl, int, unsigned int, mojo::HandleSignalsState&gt;, 0ul, 1ul, 2ul, 3ul&gt;(void (mojo::SimpleWatcher::*&amp;&amp;)(int, unsigned int, mojo::HandleSignalsState const&amp;), std::__1::tuple, int, unsigned int, mojo::HandleSignalsState&gt;&amp;&amp;, std::__1::integer_sequence) + 193
18  Electron Framework                  0x0000000117a3baf4 base::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 404
19  Electron Framework                  0x0000000117a5d195 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*, bool*) + 485
20  Electron Framework                  0x0000000117a5ce8e base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork() + 94
21  Electron Framework                  0x0000000117af945f base::MessagePumpCFRunLoopBase::RunWork() + 63
22  Electron Framework                  0x0000000117aed45a base::mac::CallWithEHFrame(void () block_pointer) + 10
23  Electron Framework                  0x0000000117af8c3f base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 63
24  CoreFoundation                      0x00007fff2da15b21 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
25  CoreFoundation                      0x00007fff2da15ac0 __CFRunLoopDoSource0 + 103
26  CoreFoundation                      0x00007fff2da158d4 __CFRunLoopDoSources0 + 209
27  CoreFoundation                      0x00007fff2da14740 __CFRunLoopRun + 1272
28  CoreFoundation                      0x00007fff2da13bd3 CFRunLoopRunSpecific + 499
29  HIToolbox                           0x00007fff2c56965d RunCurrentEventLoopInMode + 292
30  HIToolbox                           0x00007fff2c56939d ReceiveNextEventCommon + 600
31  HIToolbox                           0x00007fff2c569127 _BlockUntilNextEventMatchingListInModeWithFilter + 64
32  AppKit                              0x00007fff2abd9ba4 _DPSNextEvent + 990
33  AppKit                              0x00007fff2abd8380 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
34  AppKit                              0x00007fff2abca09e -[NSApplication run] + 658
35  Electron Framework                  0x0000000117afa5fc base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) + 348
36  Electron Framework                  0x0000000117af8592 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 130
37  Electron Framework                  0x0000000117a5db22 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 242
38  Electron Framework                  0x0000000117a0f12a base::RunLoop::Run() + 826
39  Electron Framework                  0x00000001164296a1 content::BrowserMainLoop::RunMainMessageLoopParts() + 225
40  Electron Framework                  0x000000011642bdf6 content::BrowserMainRunnerImpl::Run() + 102
41  Electron Framework                  0x000000011642625d content::BrowserMain(content::MainFunctionParams const&amp;) + 269
42  Electron Framework                  0x00000001161c7f06 content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&amp;, bool) + 998
43  Electron Framework                  0x00000001161c7af3 content::ContentMainRunnerImpl::Run(bool) + 483
44  Electron Framework                  0x000000011a1031d9 service_manager::Main(service_manager::MainParams const&amp;) + 3017
45  Electron Framework                  0x000000011441da48 content::ContentMain(content::ContentMainParams const&amp;) + 120
46  Electron Framework                  0x00000001127d5946 ElectronMain + 134
47  Electron                            0x0000000106f22071 main + 289
48  libdyld.dylib                       0x00007fff650b97fd start + 1
49  ???                                 0x0000000000000002 0x0 + 2
```
</details>
<p dir="auto">Using lldb I was able to trace the crash to </p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/electron/electron/blob/efc11563e8562e87ed56e1e961434730334e9826/shell/browser/network_hints_handler_impl.cc#L33">electron/shell/browser/network_hints_handler_impl.cc</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 33
      in
      <a data-pjax="true" class="commit-tease-sha" href="/electron/electron/commit/efc11563e8562e87ed56e1e961434730334e9826">efc1156</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L33" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="33"></td>
          <td id="LC33" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> render_frame_host_-&gt;<span class="pl-c1">GetProcess</span>()-&gt;<span class="pl-c1">GetBrowserContext</span>(); </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">I'm unable to get lldb to emit any frame variables, but based on some test accesses I added to the code, it appears that <code class="notranslate">render_frame_host_</code> is no longer valid.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">This does not occur frequently, but it seems to happen most when I go "back" from a page with an iframe. I am able to reproduce using the following fiddle:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {app, BrowserWindow} = require('electron')
let mainWindow

function createWindow () {
  mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: false,
      sandbox: true
    }
  })

  mainWindow.loadURL('https://www.google.com/search?q=js+time+interval+format')

  mainWindow.on('closed', function () {
    mainWindow = null
  })
}

app.on('ready', createWindow)

app.on('window-all-closed', function () {
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

app.on('activate', function () {
  if (mainWindow === null) createWindow()
})"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>app<span class="pl-kos">,</span> BrowserWindow<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span>
<span class="pl-k">let</span> <span class="pl-s1">mainWindow</span>

<span class="pl-k">function</span> <span class="pl-en">createWindow</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
    <span class="pl-c1">width</span>: <span class="pl-c1">800</span><span class="pl-kos">,</span>
    <span class="pl-c1">height</span>: <span class="pl-c1">600</span><span class="pl-kos">,</span>
    <span class="pl-c1">webPreferences</span>: <span class="pl-kos">{</span>
      <span class="pl-c1">nodeIntegration</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
      <span class="pl-c1">sandbox</span>: <span class="pl-c1">true</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">'https://www.google.com/search?q=js+time+interval+format'</span><span class="pl-kos">)</span>

  <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'closed'</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-s1">createWindow</span><span class="pl-kos">)</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'window-all-closed'</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">platform</span> <span class="pl-c1">!==</span> <span class="pl-s">'darwin'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">quit</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'activate'</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">mainWindow</span> <span class="pl-c1">===</span> <span class="pl-c1">null</span><span class="pl-kos">)</span> <span class="pl-en">createWindow</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Steps to recreate:</p>
<ul dir="auto">
<li>Wait for the google results</li>
<li>Click on the second result (html-goodies.com)</li>
<li>Wait for the page to finish loading (some iframes will load on the right side)</li>
<li>Go back (use the devtools to enter <code class="notranslate">history.back()</code>)</li>
</ul>
<p dir="auto">Electron should crash during the "back" navigation.</p>