macOS 10.11: Crash on exit from command line
Exiting VLC from command line (only there) (Ctrl + C) crashes on 10.11. Cannot be seen on 10.13.
Time Awake Since Boot: 2000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000007f97aa11ed8
VM Regions Near 0x7f97aa11ed8:
CoreUI image data 000000010ff69000-000000010ff7b000 [ 72K] rw-/rwx SM=PRV
-->
STACK GUARD 0000700000000000-0000700000001000 [ 4K] ---/rwx SM=NUL stack guard for thread 1
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff95452c61 objc_retain + 33
1 libmacosx_plugin.dylib 0x000000010aa7a758 -[PXSourceListDelegateDataSourceProxy dealloc] + 72
2 libvlccore.dylib 0x0000000107057da3 vlc_module_unload + 163
Making the delegates as weak, instead of unsafe_unretained, leads to another crash:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018
VM Regions Near 0x18:
-->
__TEXT 0000000107754000-0000000107758000 [ 16K] r-x/rwx SM=COW /Users/USER/Documents/*/VLC.app/Contents/MacOS/VLC
Application Specific Information:
objc_msgSend() selector name: respondsToSelector:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff95452d5d objc_msgSend + 29
1 com.apple.AppKit 0x00007fff90ee885b -[NSOutlineView didRemoveRowView:forRow:] + 48
2 com.apple.AppKit 0x00007fff90ead2b9 -[NSTableRowData _removeViewAndAddToReuse:forRow:] + 163
3 com.apple.AppKit 0x00007fff90ead09c -[NSTableRowData _removeRowViewForRow:] + 338
4 com.apple.AppKit 0x00007fff90deaf18 -[NSTableRowData _removeVisibleRows] + 108
5 com.apple.AppKit 0x00007fff90dea87a -[NSTableRowData removeAllKnownSubviews] + 165
6 com.apple.AppKit 0x00007fff90dea500 -[NSTableRowData reloadData] + 92
7 com.apple.AppKit 0x00007fff90dea42d -[NSOutlineView setDataSource:] + 351
8 libmacosx_plugin.dylib 0x000000010cef4015 -[PXSourceList dealloc] + 69
9 libvlccore.dylib 0x000000010779cda3 vlc_module_unload + 163