Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS: atom::WindowList::CloseAllWindows() [window_list.cc : 88 + 0x3] #14161

Closed
bpasero opened this issue Aug 17, 2018 · 14 comments · Fixed by #22948
Closed

EXC_BAD_ACCESS: atom::WindowList::CloseAllWindows() [window_list.cc : 88 + 0x3] #14161

bpasero opened this issue Aug 17, 2018 · 14 comments · Fixed by #22948

Comments

@bpasero
Copy link
Contributor

bpasero commented Aug 17, 2018

  • Electron Version: 2.0.5
  • Operating System (Platform and Version): macOS

Data from our crash reporter shows this as one of the top crashes:


Package: VSCode
Version: 1.26.0
OS: Mac OS X 10.13.6 (17G65)

Operating system: Mac OS X
                  10.13.6 17G65
CPU: amd64
     family 6 model 60 stepping 3
     4 CPUs

GPU: UNKNOWN

Crash reason:  EXC_BAD_ACCESS / EXC_I386_GPFLT
Crash address: 0x10ac4d8e6
Process uptime: 14298 seconds

Thread 0 (crashed)
 0  Electron Framework!atom::WindowList::CloseAllWindows() [window_list.cc : 88 + 0x3]
    rax = 0x6000000000000000   rdx = 0x00007ffee764fa88
    rcx = 0x0000000000000000   rbx = 0x00006040002004d8
    rsi = 0x0000000000003830   rdi = 0x00007fe126f490d0
    rbp = 0x00007ffee764fc20   rsp = 0x00007ffee764fbf0
     r8 = 0x00000000000003ff    r9 = 0x000060000039c630
    r10 = 0x00007fe127390a30   r11 = 0x00007fe127a6df10
    r12 = 0x0000000000000064   r13 = 0x000060000017bc00
    r14 = 0x00006040002004e0   r15 = 0x0000000000000000
    rip = 0x000000010ac4d8e6
    Found by: given as instruction pointer in context
 1  Electron Framework!<name omitted> [browser.cc : 52 + 0x5]
    rbp = 0x00007ffee764fc40   rsp = 0x00007ffee764fc30
    rip = 0x000000010abfa516
    Found by: previous frame's frame pointer
 2  Electron Framework!-[AtomApplication terminate:] [atom_application.mm : 38 + 0x8]
    rbp = 0x00007ffee764fc60   rsp = 0x00007ffee764fc50
    rip = 0x000000010ac04e55
    Found by: previous frame's frame pointer
 3  AppKit + 0x404008
    rbp = 0x00007ffee764fd00   rsp = 0x00007ffee764fc70
    rip = 0x00007fff553ff008
    Found by: previous frame's frame pointer
 4  AppKit + 0x403e6d
    rbp = 0x00007ffee764fd20   rsp = 0x00007ffee764fd10
    rip = 0x00007fff553fee6d
    Found by: previous frame's frame pointer
 5  AppKit + 0x468c01
    rbp = 0x00007ffee764fd40   rsp = 0x00007ffee764fd30
    rip = 0x00007fff55463c01
    Found by: previous frame's frame pointer
 6  CoreFoundation + 0xa387c
    rbp = 0x00007ffee764fd50   rsp = 0x00007ffee764fd50
    rip = 0x00007fff57abf87c
    Found by: previous frame's frame pointer
 7  CoreFoundation + 0x86253
    rbp = 0x00007ffee764fdd0   rsp = 0x00007ffee764fd60
    rip = 0x00007fff57aa2253
    Found by: previous frame's frame pointer
 8  CoreFoundation + 0x858de
    rbp = 0x00007ffee7650ac0   rsp = 0x00007ffee764fde0
    rip = 0x00007fff57aa18de
    Found by: previous frame's frame pointer
 9  CoreFoundation + 0x85153
    rbp = 0x00007ffee7650b50   rsp = 0x00007ffee7650ad0
    rip = 0x00007fff57aa1153
    Found by: previous frame's frame pointer
10  HIToolbox + 0x2fd96
    rbp = 0x00007ffee7650ba0   rsp = 0x00007ffee7650b60
    rip = 0x00007fff56d8bd96
    Found by: previous frame's frame pointer
11  HIToolbox + 0x2fa0f
    rbp = 0x00007ffee7650c20   rsp = 0x00007ffee7650bb0
    rip = 0x00007fff56d8ba0f
    Found by: previous frame's frame pointer
12  HIToolbox + 0x2f884
    rbp = 0x00007ffee7650c40   rsp = 0x00007ffee7650c30
    rip = 0x00007fff56d8b884
    Found by: previous frame's frame pointer
13  AppKit + 0x41a73
    rbp = 0x00007ffee7651080   rsp = 0x00007ffee7650c50
    rip = 0x00007fff5503ca73
    Found by: previous frame's frame pointer
14  AppKit + 0x7d7e34
    rbp = 0x00007ffee7651300   rsp = 0x00007ffee7651090
    rip = 0x00007fff557d2e34
    Found by: previous frame's frame pointer
15  AppKit + 0x36885
    rbp = 0x00007ffee76513b0   rsp = 0x00007ffee7651310
    rip = 0x00007fff55031885
    Found by: previous frame's frame pointer
16  Electron Framework!base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) [message_pump_mac.mm : 749 + 0xd]
    rbp = 0x00007ffee7651410   rsp = 0x00007ffee76513c0
    rip = 0x000000010de8e8fe
    Found by: previous frame's frame pointer
17  Electron Framework!base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) [message_pump_mac.mm : 141 + 0xc]
    rbp = 0x00007ffee7651440   rsp = 0x00007ffee7651420
    rip = 0x000000010de8d2fc
    Found by: previous frame's frame pointer
18  Electron Framework!<name omitted> [run_loop.cc : 111 + 0x5]
    rbp = 0x00007ffee76514d0   rsp = 0x00007ffee7651450
    rip = 0x000000010de301b3
    Found by: previous frame's frame pointer
19  Electron Framework!content::BrowserMainLoop::MainMessageLoopRun() [browser_main_loop.cc : 1696 + 0x8]
    rbp = 0x00007ffee7651540   rsp = 0x00007ffee76514e0
    rip = 0x000000010c3900ef
    Found by: previous frame's frame pointer
20  Electron Framework!content::BrowserMainLoop::RunMainMessageLoopParts() [browser_main_loop.cc : 1172 + 0x8]
    rbp = 0x00007ffee7651570   rsp = 0x00007ffee7651550
    rip = 0x000000010c38ff10
    Found by: previous frame's frame pointer
21  Electron Framework!content::BrowserMainRunnerImpl::Run() [browser_main_runner.cc : 142 + 0x5]
    rbp = 0x00007ffee7651590   rsp = 0x00007ffee7651580
    rip = 0x000000010c0ca852
    Found by: previous frame's frame pointer
22  Electron Framework!content::BrowserMain(content::MainFunctionParams const&) [browser_main.cc : 46 + 0x9]
    rbp = 0x00007ffee76515c0   rsp = 0x00007ffee76515a0
    rip = 0x000000010c47fb3c
    Found by: previous frame's frame pointer
23  Electron Framework!content::ContentMainRunnerImpl::Run() [content_main_runner.cc : 686 + 0x8]
    rbp = 0x00007ffee7651630   rsp = 0x00007ffee76515d0
    rip = 0x000000010c01faa0
    Found by: previous frame's frame pointer
24  Electron Framework!service_manager::Main(service_manager::MainParams const&) [main.cc : 469 + 0xa]
    rbp = 0x00007ffee7651ab0   rsp = 0x00007ffee7651640
    rip = 0x000000010e702da4
    Found by: previous frame's frame pointer
25  Electron Framework!content::ContentMain(content::ContentMainParams const&) [content_main.cc : 19 + 0x8]
    rbp = 0x00007ffee7651b30   rsp = 0x00007ffee7651ac0
    rip = 0x000000010c01f084
    Found by: previous frame's frame pointer
26  Electron Framework!AtomMain [atom_library_main.mm : 23 + 0x5]
    rbp = 0x00007ffee7651bb0   rsp = 0x00007ffee7651b40
    rip = 0x000000010ab50044
    Found by: previous frame's frame pointer
27  Electron + 0xf26
    rbp = 0x00007ffee7651bd0   rsp = 0x00007ffee7651bc0
    rip = 0x00000001085aef26
    Found by: previous frame's frame pointer
28  libdyld.dylib + 0x1015
    rbp = 0x00007ffee7651be0   rsp = 0x00007ffee7651be0
    rip = 0x00007fff7f8e2015
    Found by: previous frame's frame pointer
@codebytere
Copy link
Member

@bpasero does this happen on the latest beta?

@bpasero
Copy link
Contributor Author

bpasero commented Sep 1, 2018

@codebytere unfortunately we are not running the 3.0.x beta in insiders yet to gather data that could have an answer to that question.

@sofianguy
Copy link
Contributor

@bpasero does this bug still happen on version 4.x or later?

@sofianguy sofianguy added the blocked/need-info ❌ Cannot proceed without more information label Aug 9, 2019
@bpasero
Copy link
Contributor Author

bpasero commented Aug 9, 2019

I cannot tell as we currently do not get any useful crash reports because symbols are not working for us. Feel free to close and I can report back once we get good stacktraces again.

//cc @deepak1556

@codebytere
Copy link
Member

Thanks @bpasero! Will do.

@bpasero
Copy link
Contributor Author

bpasero commented Aug 23, 2019

@codebytere please reopen, we receive this crash still with 4.x:

Package: VSCode
Version: 1.37.1
OS: Mac OS X 10.14.6 (18G87)
Date: Thu Aug 15 14:45:08 GMT-04:00 2019

Operating system: Mac OS X
                  10.14.6 18G87
CPU: amd64
     family 6 model 158 stepping 13
     16 CPUs

GPU: UNKNOWN

Crash reason:  EXC_BAD_ACCESS / EXC_I386_GPFLT
Crash address: 0x11403f1c6
Process uptime: 15 seconds

Thread 0 (crashed)
 0  Electron Framework!atom::WindowList::CloseAllWindows() [window_list.cc : 88 + 0x3]

@codebytere codebytere reopened this Aug 23, 2019
@codebytere
Copy link
Member

@bpasero do you by chance have a repro or approximate action set that tends to coincide with this crash?

@bpasero
Copy link
Contributor Author

bpasero commented Aug 24, 2019

@codebytere no, just the crash unfortunately. @deepak1556 fyi this is the crash I was talking about.

@sofianguy sofianguy added 4-2-x and removed blocked/need-info ❌ Cannot proceed without more information labels Aug 27, 2019
@electron-triage
Copy link

Thank you for taking the time to report this issue and helping to make Electron better.

The version of Electron you reported this on has been superseded by newer releases.

If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.

Thanks in advance! Your help is appreciated.

@electron-triage electron-triage added the blocked/need-info ❌ Cannot proceed without more information label Feb 19, 2020
@codebytere codebytere self-assigned this Feb 22, 2020
@electron-triage
Copy link

Thank you for your issue!

We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.

@bpasero
Copy link
Contributor Author

bpasero commented Mar 31, 2020

This is still our top crash on macOS even with Electron 7:

Electron Framework
electron::WindowList::CloseAllWindows() window_list.cc:88
AppKit
0x3102640f + 4858895
AppKit
0x3102627e + 4858494
AppKit
0x310702fc + 5161724
CoreFoundation
0x335e5f14 + 491284
CoreFoundation
0x335a9637 + 243255
CoreFoundation
0x335a8d56 + 240982
CoreFoundation
0x335a866e + 239214
HIToolbox
0x328071ab + 45483
HIToolbox
0x32806ded + 44525
HIToolbox
0x32806c76 + 44150
AppKit
0x30b9e77d + 108413
AppKit
0x30b9d46b + 103531
AppKit
0x30b97588 + 79240
Electron Framework
base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) message_pump_mac.mm:850
Electron Framework
base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) message_pump_mac.mm:186
Electron Framework
non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) thread_controller_with_message_pump_impl.cc:463
Electron Framework
base::RunLoop::Run() run_loop.cc:156
Electron Framework
content::BrowserMainLoop::RunMainMessageLoopParts() browser_main_loop.cc:1509
Electron Framework
content::BrowserMainRunnerImpl::Run() browser_main_runner_impl.cc:149
Electron Framework
content::BrowserMain(content::MainFunctionParams const&) browser_main.cc:47
Electron Framework
content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) content_main_runner_impl.cc:556
Electron Framework
content::ContentMainRunnerImpl::Run(bool) content_main_runner_impl.cc:871
Electron Framework
service_manager::Main(service_manager::MainParams const&) main.cc:423
Electron Framework
content::ContentMain(content::ContentMainParams const&) content_main.cc:19
Electron Framework
AtomMain atom_library_main.mm:31
Electron
main atom_main.cc:245
libdyld.dylib
0x5f5303d5 + 91093
libdyld.dylib
0x5f5303d5 + 91093

@codebytere
Copy link
Member

@bpasero do you have a symbolicated version of that crash? or a bit more idea of related codepath?

@codebytere codebytere reopened this Mar 31, 2020
@bpasero
Copy link
Contributor Author

bpasero commented Mar 31, 2020

@codebytere thanks for reopening, I suggest @deepak1556 takes over from here

@codebytere codebytere removed their assignment Apr 1, 2020
@deepak1556
Copy link
Member

@codebytere I haven't been able to get a repro based on the trace but the crash is a EXC_BAD_ACCESS at line electron::WindowList::CloseAllWindows() window_list.cc:88

Based on our code path this can only happen during shutdown when an object in the WindowVector is destroyed while the cleanup happens since we only maintain a weakmap, adding a nullptr check should do the trick.

if (window && !window->IsClosed())
  window->Close();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants