Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

9.0.0-beta.18 (also reproducible in 8.2.3)

Operating System:

Windows 10 1909

Last Known Working Electron version:

Unknown

Expected Behavior

The web page to behave as expected.

Actual Behavior

Electron crashes:

Received fatal exception EXCEPTION_ACCESS_VIOLATION

Backtrace:

(No symbol) [0x0000000000000000]

std::__1::vector<v8::CpuProfileDeoptInfo,std::__1::allocator<v8::CpuProfileDeoptInfo> >::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.

To Reproduce

See electron fiddle at:

https://gist.github.com/Niquolas/81cc70179578975651e7efd94d6f9748

Ensure any adblockers e.g. Pi-hole are disabled.

Launch the application

Wait for the page to fully load

Interact with the page (clicking on an ad yields the most consistent results)

Additional Information

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.

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.

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

9.0.0-beta.5

Operating System:

MacOS 10.15.3

Last Known Working Electron version:

Unknown

Expected Behavior

Navigating to a page (afaict when it has an iframe) and then navigating away via "Back" should not crash Electron.

Actual Behavior

Electron crashes with the following trace (with debug symbols):

```
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&, unsigned int, mojo::HandleSignalsState const&) + 103
16 Electron Framework 0x0000000117eea8fb mojo::SimpleWatcher::OnHandleReady(int, unsigned int, mojo::HandleSignalsState const&) + 443
17 Electron Framework 0x0000000117eeaea1 void base::internal::Invoker, int, unsigned int, mojo::HandleSignalsState>, void ()>::RunImpl, int, unsigned int, mojo::HandleSignalsState>, 0ul, 1ul, 2ul, 3ul>(void (mojo::SimpleWatcher::*&&)(int, unsigned int, mojo::HandleSignalsState const&), std::__1::tuple, int, unsigned int, mojo::HandleSignalsState>&&, 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&) + 269
42 Electron Framework 0x00000001161c7f06 content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) + 998
43 Electron Framework 0x00000001161c7af3 content::ContentMainRunnerImpl::Run(bool) + 483
44 Electron Framework 0x000000011a1031d9 service_manager::Main(service_manager::MainParams const&) + 3017
45 Electron Framework 0x000000011441da48 content::ContentMain(content::ContentMainParams const&) + 120
46 Electron Framework 0x00000001127d5946 ElectronMain + 134
47 Electron 0x0000000106f22071 main + 289
48 libdyld.dylib 0x00007fff650b97fd start + 1
49 ??? 0x0000000000000002 0x0 + 2
```

Using lldb I was able to trace the crash to

electron/shell/browser/network_hints_handler_impl.cc

Line 33
in
efc1156

render_frame_host_->GetProcess()->GetBrowserContext();

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 render_frame_host_ is no longer valid.

To Reproduce

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:

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()
})

Steps to recreate:

Wait for the google results

Click on the second result (html-goodies.com)

Wait for the page to finish loading (some iframes will load on the right side)

Go back (use the devtools to enter history.back())

Electron should crash during the "back" navigation.