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

Opening DevTools causes "Out of memory" error in 0.27.0 #1790

Closed
bengotow opened this issue May 27, 2015 · 0 comments · Fixed by #1797
Closed

Opening DevTools causes "Out of memory" error in 0.27.0 #1790

bengotow opened this issue May 27, 2015 · 0 comments · Fixed by #1797

Comments

@bengotow
Copy link
Contributor

This crash is a significant breaker for us—I've attached a crash log below. Here are the steps to reproduce:

  1. Download Electron 0.27.0 on a Mac running Mac OS X 10.10.
  2. Run it without specifying an application so that it opens the default_app bundled with Electron.
    (for me, just running ./Electron.app/Contents/MacOS/Electron on the command line)
  3. Press command-option-I to open the Chromium Developer Tools. Open and close them several times. Electron should crash with the exception below.

If Electron doesn't crash, try toggling between the popped-out and docked modes for the developer tools (option in the top right of the developer panel). That seems to trigger it for me.

Electron(81201,0x7fff749be300) malloc: *** mach_vm_map(size=5764616290198818816) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
[81201:0527/112125:FATAL:memory.cc(18)] Out of memory. size=5764616290198815232
Trace/BPT trap: 5

With lldb:

(lldb) target create "./electron/Electron.app/Contents/MacOS/Electron"
Current executable set to './electron/Electron.app/Contents/MacOS/Electron' (x86_64).
(lldb) br set --name malloc_error_break
Breakpoint 1: where = libsystem_malloc.dylib`malloc_error_break, address = 0x000000000001319f
(lldb) continue
error: invalid process
(lldb) process launch
Process 81276 launched: './electron/Electron.app/Contents/MacOS/Electron' (x86_64)
[81283:0527/112509:INFO:renderer_main.cc(200)] Renderer process started
Electron(81276,0x7fff749be300) malloc: *** mach_vm_map(size=562950235492352) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Process 81276 stopped
* thread #1: tid = 0x206048, 0x00007fff85e3619f libsystem_malloc.dylib`malloc_error_break, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x00007fff85e3619f libsystem_malloc.dylib`malloc_error_break
libsystem_malloc.dylib`malloc_error_break:
->  0x7fff85e3619f <+0>: pushq  %rbp
    0x7fff85e361a0 <+1>: movq   %rsp, %rbp
    0x7fff85e361a3 <+4>: nop    
    0x7fff85e361a4 <+5>: nopl   (%rax)
(lldb) bt
* thread #1: tid = 0x206048, 0x00007fff85e3619f libsystem_malloc.dylib`malloc_error_break, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x00007fff85e3619f libsystem_malloc.dylib`malloc_error_break
    frame #1: 0x00007fff85e32d2b libsystem_malloc.dylib`szone_error + 406
    frame #2: 0x00007fff85e25048 libsystem_malloc.dylib`allocate_pages + 371
    frame #3: 0x00007fff85e2801f libsystem_malloc.dylib`large_malloc + 1042
    frame #4: 0x00007fff85e263a5 libsystem_malloc.dylib`szone_malloc_should_clear + 1426
    frame #5: 0x0000000100145e00 Electron Framework`___lldb_unnamed_function4040$$Electron Framework + 16
    frame #6: 0x00007fff85e25877 libsystem_malloc.dylib`malloc_zone_malloc + 71
    frame #7: 0x00007fff85e24395 libsystem_malloc.dylib`malloc + 42
    frame #8: 0x00007fff901c043e libc++.1.dylib`operator new(unsigned long) + 30
    frame #9: 0x00007fff901c3f93 libc++.1.dylib`std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__grow_by(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) + 139
    frame #10: 0x0000000101133915 Electron Framework`___lldb_unnamed_function89566$$Electron Framework + 101
    frame #11: 0x000000010112bcde Electron Framework`___lldb_unnamed_function89488$$Electron Framework + 158
    frame #12: 0x0000000100030aa6 Electron Framework`atom::api::WebContents::DidGetResourceResponseStart(content::ResourceRequestDetails const&) + 294
    frame #13: 0x0000000100030b7d Electron Framework`non-virtual thunk to atom::api::WebContents::DidGetResourceResponseStart(content::ResourceRequestDetails const&) + 13
    frame #14: 0x000000010083acf6 Electron Framework`___lldb_unnamed_function38702$$Electron Framework + 342
    frame #15: 0x00000001006f3574 Electron Framework`___lldb_unnamed_function31938$$Electron Framework + 132
    frame #16: 0x000000010011c6c8 Electron Framework`___lldb_unnamed_function3014$$Electron Framework + 248
    frame #17: 0x00000001001386cf Electron Framework`___lldb_unnamed_function3701$$Electron Framework + 415
    frame #18: 0x0000000100138ab6 Electron Framework`___lldb_unnamed_function3704$$Electron Framework + 438
    frame #19: 0x00000001001154d1 Electron Framework`___lldb_unnamed_function2842$$Electron Framework + 49
    frame #20: 0x00007fff827e3a01 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #21: 0x00007fff827d5b8d CoreFoundation`__CFRunLoopDoSources0 + 269
    frame #22: 0x00007fff827d51bf CoreFoundation`__CFRunLoopRun + 927
    frame #23: 0x00007fff827d4bd8 CoreFoundation`CFRunLoopRunSpecific + 296
    frame #24: 0x00007fff8d99d56f HIToolbox`RunCurrentEventLoopInMode + 235
    frame #25: 0x00007fff8d99d2ea HIToolbox`ReceiveNextEventCommon + 431
    frame #26: 0x00007fff8d99d12b HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71
    frame #27: 0x00007fff8a3069bb AppKit`_DPSNextEvent + 978
    frame #28: 0x00007fff8a305f68 AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
    frame #29: 0x00007fff8a2fbbf3 AppKit`-[NSApplication run] + 594
    frame #30: 0x0000000100115b61 Electron Framework`___lldb_unnamed_function2862$$Electron Framework + 321
    frame #31: 0x000000010011533c Electron Framework`___lldb_unnamed_function2838$$Electron Framework + 92
    frame #32: 0x0000000100146e73 Electron Framework`___lldb_unnamed_function4104$$Electron Framework + 99
    frame #33: 0x00000001005b4311 Electron Framework`___lldb_unnamed_function25737$$Electron Framework + 113
    frame #34: 0x00000001005b4275 Electron Framework`___lldb_unnamed_function25736$$Electron Framework + 69
    frame #35: 0x00000001005b6872 Electron Framework`___lldb_unnamed_function25777$$Electron Framework + 18
    frame #36: 0x00000001005b097f Electron Framework`___lldb_unnamed_function25720$$Electron Framework + 159
    frame #37: 0x000000010054fe92 Electron Framework`___lldb_unnamed_function23922$$Electron Framework + 114
    frame #38: 0x000000010054f536 Electron Framework`___lldb_unnamed_function23915$$Electron Framework + 54
    frame #39: 0x0000000100004b0d Electron Framework`AtomMain + 77
    frame #40: 0x0000000100000eea Electron`main + 58
    frame #41: 0x00007fff8c8675c9 libdyld.dylib`start + 1
(lldb) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant