electron: Electron crashes unexpectedly Fatal Error: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS in URLRequestContextGetter

Preflight Checklist

  • [x ] I have read the Contributing Guidelines for this project.
  • [ x] I agree to follow the Code of Conduct that this project adheres to.
  • [x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version: 6.0.11
  • Operating System: Mac OS X 10.15 (19A583)
  • Last Known Working Electron version: Dont know.

Expected Behavior

No crashy crashy

Actual Behavior

Electron quits unexpectedly. Fatal Error: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS

To Reproduce

The stack seems to imply that it’s all happening in some electron process.

OS Version: Mac OS X 10.15 (19A583)
Report Version: 104

Crashed Thread: 4212

Application Specific Information:
Fatal Error: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS

Thread 4212 Crashed:
0   libsystem_pthread.dylib         0x7fff6f3e73d3      <unknown>
1   Electron Framework              0x11427a73f         IOThread::RegisterURLRequestContextGetter (lock.h:31)
2   Electron Framework              0x11429f73d         atom::URLRequestContextGetter::Handle::CreateMainRequestContextGetter (url_request_context_getter.cc:130)
3   Electron Framework              0x11426a917         atom::AtomBrowserContext::CreateRequestContext (atom_browser_context.cc:163)
4   Electron Framework              0x113c4a507         content::StoragePartitionImplMap::Get (storage_partition_impl_map.cc:426)
5   Electron Framework              0x1137ee36c         content::(anonymous namespace)::GetStoragePartitionFromConfig (browser_context.cc:219)
6   Electron Framework              0x1137e9d78         content::BrowserContext::GetDefaultStoragePartition (browser_context.cc:438)
7   Electron Framework              0x114279e3d         atom::CookieChangeNotifier::StartListening (cookie_change_notifier.cc:40)
8   Electron Framework              0x114269ff6         atom::AtomBrowserContext::AtomBrowserContext (memory:3131)
9   Electron Framework              0x11426af81         atom::AtomBrowserContext::From (atom_browser_context.cc:70)
10  Electron Framework              0x1142199f8         atom::api::Session::FromPartition (atom_api_session.cc:760)
11  Electron Framework              0x11421b239         (anonymous namespace)::FromPartition (atom_api_session.cc:821)
12  Electron Framework              0x11421b301         mate::internal::Dispatcher<T>::DispatchToCallback (callback.h:136)
13  Electron Framework              0x112b7c68b         v8::internal::FunctionCallbackArguments::Call (api-arguments-inl.h:158)
14  Electron Framework              0x112b3b0c4         v8::internal::(anonymous namespace)::HandleApiCallHelper<T> (builtins-api.cc:109)
15  Electron Framework              0x112b3a701         v8::internal::Builtin_Impl_HandleApiCall (builtins-api.cc:139)
16  Electron Framework              0x1134a5fd8         Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit
17  Electron Framework              0x113424d23         [inlined] Builtins_InterpreterEntryTrampoline
18  Electron Framework              0x113424d23         [inlined] Builtins_InterpreterEntryTrampoline
19  Electron Framework              0x113424d23         [inlined] Builtins_InterpreterEntryTrampoline
20  Electron Framework              0x113424d23         Builtins_InterpreterEntryTrampoline
21  Electron Framework              0x113474142         Builtins_PromiseConstructor
22  Electron Framework              0x1134209c2         Builtins_JSBuiltinsConstructStub
23  Electron Framework              0x113500ec3         Builtins_ConstructHandler
24  Electron Framework              0x113424d23         [inlined] Builtins_InterpreterEntryTrampoline
25  Electron Framework              0x113424d23         Builtins_InterpreterEntryTrampoline
26  Electron Framework              0x11341e65b         Builtins_ArgumentsAdaptorTrampoline
27  Electron Framework              0x113424d23         Builtins_InterpreterEntryTrampoline
28  Electron Framework              0x11341e65b         Builtins_ArgumentsAdaptorTrampoline
29  Electron Framework              0x113424d23         Builtins_InterpreterEntryTrampoline
30  Electron Framework              0x11341e65b         Builtins_ArgumentsAdaptorTrampoline
31  Electron Framework              0x113424d23         [inlined] Builtins_InterpreterEntryTrampoline
32  Electron Framework              0x113424d23         Builtins_InterpreterEntryTrampoline
33  Electron Framework              0x113450a06         Builtins_AsyncFunctionAwaitResolveClosure
34  Electron Framework              0x113475591         Builtins_PromiseFulfillReactionJob
35  Electron Framework              0x1134428ba         Builtins_RunMicrotasks
36  Electron Framework              0x113422637         Builtins_JSRunMicrotasksEntry
37  Electron Framework              0x112bee4cc         v8::internal::(anonymous namespace)::Invoke (simulator.h:138)
38  Electron Framework              0x112beeb47         v8::internal::(anonymous namespace)::InvokeWithTryCatch (execution.cc:327)
39  Electron Framework              0x112c098d5         v8::internal::MicrotaskQueue::RunMicrotasks (execution.cc:404)
40  Electron Framework              0x1177a1d23         node::InternalCallbackScope::Close (callback.cc:103)
41  Electron Framework              0x1177a20ac         node::InternalMakeCallback (callback.cc:168)
42  Electron Framework              0x1177afa30         node::AsyncWrap::MakeCallback (async_wrap.cc:718)
43  Electron Framework              0x11781e243         node::fs::FSReqCallback::Resolve (async_wrap-inl.h:95)
44  Electron Framework              0x11781e4a0         node::fs::AfterNoArgs (node_file.cc:523)
45  Electron Framework              0x1178fe6e7         uv__work_done (threadpool.c:313)
46  Electron Framework              0x1179025a3         uv__async_io (async.c:147)
47  Electron Framework              0x11791329a         uv__io_poll (kqueue.c:343)
48  Electron Framework              0x117902a20         uv_run (core.c:368)
49  Electron Framework              0x1177d5068         node::Environment::CleanupHandles (env.cc:520)
50  Electron Framework              0x1177d521d         node::Environment::RunCleanup (env.cc:566)
51  Electron Framework              0x1177a49cd         node::FreeEnvironment (environment.cc:319)
52  Electron Framework              0x11426c871         atom::AtomBrowserMainParts::~AtomBrowserMainParts (memory:2338)
53  Electron Framework              0x11426c95d         atom::AtomBrowserMainParts::~AtomBrowserMainParts (atom_browser_main_parts.cc:238)
54  Electron Framework              0x1137efcc9         content::BrowserMainLoop::~BrowserMainLoop (memory:2338)
55  Electron Framework              0x1137efe2d         content::BrowserMainLoop::~BrowserMainLoop (browser_main_loop.cc:543)
56  Electron Framework              0x1137f428d         content::BrowserMainRunnerImpl::Shutdown (memory:2338)
57  Electron Framework              0x1137ef841         content::BrowserMain (browser_main.cc:49)
58  Electron Framework              0x1136c4514         content::ContentMainRunnerImpl::RunServiceManager (content_main_runner_impl.cc:551)
59  Electron Framework              0x1136c4100         content::ContentMainRunnerImpl::Run (content_main_runner_impl.cc:870)
60  Electron Framework              0x115a57b8f         service_manager::Main (main.cc:422)
61  Electron Framework              0x112951593         content::ContentMain (content_main.cc:19)
62  Electron Framework              0x111f8e993         AtomMain (atom_library_main.mm:23)
63  Clockk                          0x10b1fba0f         main (atom_main.cc:232)
64  libdyld.dylib                   0x7fff6f1df405      <unknown>

Additional Information

Stack trace provided by Sentry.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 18 (9 by maintainers)

Most upvoted comments

I wanted to add confirmation here that this crash exists in 6.1.7 and is definitely caused by the autoupdater. This is the breadcrumb we see in Sentry after the user clicks “Update now” and autoUpdater.quitAndInstall(); is called.

image

If an Electron maintainer is interested in fixing this and wants even more details please reach out to me in the Electron HQ Slack (username: tom) and I can share links to our detailed crash reports on Sentry.

Hey Electron team - we recently moved from 5.x to 8.1.1, and we are seeing this quite a bit. Is this on your radar in 8? Like @tommoor I’m happy to share our Sentry reports, let me know how to privately get those to you.

@tommoor in order to make sense of the stack trace that macOS’s crash reporter produces we need the full output. The full output includes the Electron version as well as the base address at which the framework is loaded, without both of which we cannot convert the addresses into symbols.