Closed
Description
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 a bug report that matches the one I want to file, without success.
Electron Version
28.0.0, 28.1.3
What operating system are you using?
macOS
Operating System Version
Sonoma 14.2.1
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
27.2.2
Expected Behavior
The app does not segfault when I close its last window.
Actual Behavior
The app sometimes segfaults when I close its last (and only) window.
Testcase Gist URL
No response
Additional Information
This happens when the app is closed by selecting it with Cmd + Tab, holding Cmd (so that the app switcher is still visible) and hitting Cmd + Q. Both in the dev version and the packaged version. Here's an Electron Fiddle repro which is just the default code.
Let me know if I should post more of the macOS crash report.
Dev version
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Electron [83797]
Path: /Users/USER/*/Electron.app/Contents/MacOS/Electron
Identifier: com.github.Electron
Version: 28.0.0 (28.0.0)
Code Type: ARM-64 (Native)
Parent Process: Exited process [83778]
Responsible: iTerm2 [7689]
User ID: 501
Date/Time: 2023-12-20 10:04:45.6935 +0100
OS Version: macOS 14.2 (23C64)
Report Version: 12
Anonymous UUID: CEED24F1-A75C-89A9-E06E-1B0451613C4D
Sleep/Wake UUID: B0F9B326-CDC2-4DAA-AEBE-E46673A3543D
Time Awake Since Boot: 490000 seconds
Time Since Wake: 102 seconds
System Integrity Protection: enabled
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010
Exception Codes: 0x0000000000000001, 0x0000000000000010
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [83797]
VM Region Info: 0x10 is not in any region. Bytes before following region: 4374380528
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 104bbc000-104bc0000 [ 16K] r-x/r-x SM=COW ...acOS/Electron
Kernel Triage:
VM - (arg = 0x0) Fault was interrupted
VM - (arg = 0x0) Fault was interrupted
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x180b85420 objc_msgSend + 32
1 Electron Framework 0x10e32b650 node::FreeArrayBufferAllocator(node::ArrayBufferAllocator*) + 275124
2 Electron Framework 0x10e32b09c node::FreeArrayBufferAllocator(node::ArrayBufferAllocator*) + 273664
3 Electron Framework 0x10e2b79fc v8::CodeEvent::GetScriptName() + 6308
4 AppKit 0x184b405e4 -[NSApplication _terminateFromSender:askIfShouldTerminate:saveWindows:] + 124
5 AppKit 0x184b404dc __52-[NSApplication(NSAppleEventHandling) _handleAEQuit]_block_invoke + 52
6 AppKit 0x184c45764 ___NSMainRunLoopPerformBlockInModes_block_invoke + 44
7 CoreFoundation 0x18102f5e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
8 CoreFoundation 0x18102f4f8 __CFRunLoopDoBlocks + 356
9 CoreFoundation 0x18102e330 __CFRunLoopRun + 812
10 CoreFoundation 0x18102d9ac CFRunLoopRunSpecific + 608
11 HIToolbox 0x18b5dc448 RunCurrentEventLoopInMode + 292
12 HIToolbox 0x18b5dc0d8 ReceiveNextEventCommon + 220
13 HIToolbox 0x18b5dbfdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
14 AppKit 0x18480a8a4 _DPSNextEvent + 660
15 AppKit 0x184fe4980 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
16 AppKit 0x1847fdd50 -[NSApplication run] + 476
17 Electron Framework 0x1114dde20 node::GetArrayBufferAllocator(node::IsolateData*) + 17970108
18 Electron Framework 0x1114dbc8c node::GetArrayBufferAllocator(node::IsolateData*) + 17961512
19 Electron Framework 0x1114949dc node::GetArrayBufferAllocator(node::IsolateData*) + 17670008
20 Electron Framework 0x11145b5c4 node::GetArrayBufferAllocator(node::IsolateData*) + 17435488
21 Electron Framework 0x1105eeb6c node::GetArrayBufferAllocator(node::IsolateData*) + 2310408
22 Electron Framework 0x1105f0604 node::GetArrayBufferAllocator(node::IsolateData*) + 2317216
23 Electron Framework 0x1105ec4dc node::GetArrayBufferAllocator(node::IsolateData*) + 2300536
24 Electron Framework 0x10e488c78 v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 13948
25 Electron Framework 0x10e489de0 v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 18404
26 Electron Framework 0x10e489c10 v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 17940
27 Electron Framework 0x10e4884bc v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 11968
28 Electron Framework 0x10e48865c v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 12384
29 Electron Framework 0x10e15a2f0 ElectronMain + 128
30 dyld 0x180bd10e0 start + 2360
Packaged version
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Teleport Connect [19388]
Path: /Applications/Teleport Connect.app/Contents/MacOS/Teleport Connect
Identifier: gravitational.teleport.connect
Version: 15.0.0-dev.ravicious.5 (15.0.0-dev.ravicious.5.2252)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2023-12-19 13:18:01.1922 +0100
OS Version: macOS 14.2 (23C64)
Report Version: 12
Anonymous UUID: CEED24F1-A75C-89A9-E06E-1B0451613C4D
Sleep/Wake UUID: 7095D577-34E9-4741-9ABD-8A463E984E08
Time Awake Since Boot: 420000 seconds
Time Since Wake: 11198 seconds
System Integrity Protection: enabled
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010
Exception Codes: 0x0000000000000001, 0x0000000000000010
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [19388]
VM Region Info: 0x10 is not in any region. Bytes before following region: 23781099700208
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
Memory Tag 255 15a0f8000000-15a100000000 [128.0M] ---/rwx SM=NUL
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x180b85420 objc_msgSend + 32
1 Electron Framework 0x11868b650 node::FreeArrayBufferAllocator(node::ArrayBufferAllocator*) + 275124
2 Electron Framework 0x11868b09c node::FreeArrayBufferAllocator(node::ArrayBufferAllocator*) + 273664
3 Electron Framework 0x1186179fc v8::CodeEvent::GetScriptName() + 6308
4 AppKit 0x184b405e4 -[NSApplication _terminateFromSender:askIfShouldTerminate:saveWindows:] + 124
5 AppKit 0x184b404dc __52-[NSApplication(NSAppleEventHandling) _handleAEQuit]_block_invoke + 52
6 AppKit 0x184c45764 ___NSMainRunLoopPerformBlockInModes_block_invoke + 44
7 CoreFoundation 0x18102f5e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
8 CoreFoundation 0x18102f4f8 __CFRunLoopDoBlocks + 356
9 CoreFoundation 0x18102e330 __CFRunLoopRun + 812
10 CoreFoundation 0x18102d9ac CFRunLoopRunSpecific + 608
11 HIToolbox 0x18b5dc448 RunCurrentEventLoopInMode + 292
12 HIToolbox 0x18b5dc0d8 ReceiveNextEventCommon + 220
13 HIToolbox 0x18b5dbfdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
14 AppKit 0x18480a8a4 _DPSNextEvent + 660
15 AppKit 0x184fe4980 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
16 AppKit 0x1847fdd50 -[NSApplication run] + 476
17 Electron Framework 0x11b83de20 node::GetArrayBufferAllocator(node::IsolateData*) + 17970108
18 Electron Framework 0x11b83bc8c node::GetArrayBufferAllocator(node::IsolateData*) + 17961512
19 Electron Framework 0x11b7f49dc node::GetArrayBufferAllocator(node::IsolateData*) + 17670008
20 Electron Framework 0x11b7bb5c4 node::GetArrayBufferAllocator(node::IsolateData*) + 17435488
21 Electron Framework 0x11a94eb6c node::GetArrayBufferAllocator(node::IsolateData*) + 2310408
22 Electron Framework 0x11a950604 node::GetArrayBufferAllocator(node::IsolateData*) + 2317216
23 Electron Framework 0x11a94c4dc node::GetArrayBufferAllocator(node::IsolateData*) + 2300536
24 Electron Framework 0x1187e8c78 v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 13948
25 Electron Framework 0x1187e9de0 v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 18404
26 Electron Framework 0x1187e9c10 v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 17940
27 Electron Framework 0x1187e84bc v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 11968
28 Electron Framework 0x1187e865c v8::internal::compiler::BasicBlock::set_loop_header(v8::internal::compiler::BasicBlock*) + 12384
29 Electron Framework 0x1184ba2f0 ElectronMain + 128
30 dyld 0x180bd10e0 start + 2360