Closed colin-marshall closed 6 years ago
Hmm. This one I'm not able to reproduce on my El Capitan setup. Can you reproduce it with this build? This build should have debug symbols as well, which will better tell me where the crash is happening.
edit: I may have reproduced this. Does the crash persist on a restart? I think the bug may have to do with not updating cached track lists when new tracks are added, which causes explosions when lists of upcoming tracks are generated for a play event. Investigating.
This time it actually played a few songs, but it crashed eventually again. Here's the report:
This last crash looks like a problem reading from the audio file rather than the queue issue, which I fixed in 19412ae. Let me know if it still happens with the build I just put up.
The build that's on the releases page?
Yeah.
Still crashing. Report:
Okay, now able to reproduce. Got the following trace:
* thread #1: tid = 0x2121, 0x00007fff83639a01 libc++abi.dylib`__cxa_throw, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x00007fff83639a01 libc++abi.dylib`__cxa_throw
frame #1: 0x0000000109c38a04 AudioCodecs`ACMP3Decoder::SetProperty(unsigned int, unsigned int, void const*) + 182
frame #2: 0x0000000109d121f2 AudioCodecs`SetProperty(void*, unsigned int, unsigned int, void const*) + 22
frame #3: 0x00007fff92014121 AudioToolbox`CodecConverter::EnableInstrumentation(bool) + 41
frame #4: 0x00007fff91fc7196 AudioToolbox`AudioConverterChain::SetProperty(unsigned int, unsigned int, void const*) + 416
frame #5: 0x00007fff91fc6fc0 AudioToolbox`AudioConverterSetProperty + 82
frame #6: 0x00007fff9203cf72 AudioToolbox`ExtAudioFile::UpdateInternals() + 326
frame #7: 0x00007fff9203d5c7 AudioToolbox`ExtAudioFile::SetClientFormat(CAStreamBasicDescription const&, CAAudioChannelLayout const*) + 1005
frame #8: 0x00007fff92034a5b AudioToolbox`ExtAudioFileSetProperty + 644
frame #9: 0x00007fff85da2bfa libAVFAudio.dylib`AVAudioFileImpl::CheckClientFormatSet() + 106
frame #10: 0x00007fff85da2693 libAVFAudio.dylib`-[AVAudioFile readIntoBuffer:frameCount:error:] + 236
frame #11: 0x000000010011090d jmc`jmc.AVAudioFileBufferer.prepareFirstBuffer () -> Swift.Optional<__ObjC.AVAudioPCMBuffer> + 253
frame #12: 0x0000000100111782 jmc`protocol witness for jmc.FileBufferer.prepareFirstBuffer () -> Swift.Optional<__ObjC.AVAudioPCMBuffer> in conformance jmc.AVAudioFileBufferer : jmc.FileBufferer in jmc + 66
frame #13: 0x000000010025f155 jmc`jmc.AudioModule.initializePlayback () -> () + 2021
frame #14: 0x000000010025ced7 jmc`jmc.AudioModule.playImmediately (Swift.String) -> () + 663
frame #15: 0x00000001001f094e jmc`jmc.MainWindowController.playSong (jmc.Track, row : Swift.Optional<Swift.Int>) -> () + 4590
frame #16: 0x00000001002a8636 jmc`jmc.LibraryTableViewController.interpretEnterEvent () -> () + 1062
frame #17: 0x00000001000216ba jmc`jmc.TableViewYouCanPressSpacebarOn.keyDown (with : __ObjC.NSEvent) -> () + 666
frame #18: 0x00000001000218ba jmc`@objc jmc.TableViewYouCanPressSpacebarOn.keyDown (with : __ObjC.NSEvent) -> () + 58
frame #19: 0x00007fff88442b15 AppKit`-[NSWindow _reallySendEvent:isDelayedEvent:] + 2108
frame #20: 0x00007fff87e81539 AppKit`-[NSWindow sendEvent:] + 517
frame #21: 0x00007fff87e0216a AppKit`-[NSApplication sendEvent:] + 4382
frame #22: 0x00007fff87c68df2 AppKit`-[NSApplication run] + 796
frame #23: 0x00007fff87c32368 AppKit`NSApplicationMain + 1176
frame #24: 0x00000001001493ad jmc`main + 13
frame #25: 0x00007fff8a13a5ad libdyld.dylib`start + 1
frame #26: 0x00007fff8a13a5ad libdyld.dylib`start + 1
It looks like some sort of AVAudioFileBufferer / AVAudioFile bug, since it seems to be occuring in system code when reading the mp3 into a buffer, and does not occur with FLAC files on my VM....
edit: It also doesn't seem to happen all the time. Trying to isolate specific conditions.
Can you confirm this is still happening? And is it 100% of the time? I'm no longer able to reproduce the crash in my El Capitan VM.
Appears to be working now. Thanks!
I can now add folders to my library thanks to the El Capitan update (thanks for the quick fix), however it crashes when I try to play a file. Here's the report:
crash report
``` Process: jmc [29225] Path: /Applications/jmc.app/Contents/MacOS/jmc Identifier: com.jcm.jmc Version: 1.0 (1) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: jmc [29225] User ID: 504 Date/Time: 2017-08-03 11:11:18.773 -0600 OS Version: Mac OS X 10.11.6 (15G1611) Report Version: 11 Anonymous UUID: D33C5CF9-B59D-F381-B95E-D77DC416A31A Sleep/Wake UUID: C28AE616-A2BC-4283-8DFC-C8F05B514BDC Time Awake Since Boot: 290000 seconds Time Since Wake: 7800 seconds System Integrity Protection: disabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: Performing @selector(tableViewDoubleClick:) from sender jmc.TableViewYouCanPressSpacebarOn 0x7fc6c38ed4a0 Breadcrumb Trail (reverse chronological seconds): 1 logging-started Global Trace Buffer (reverse chronological seconds): 0.703826 CFNetwork 0x00007fff8c6cbdb3 TCP Conn 0x7fc6c04a7f80 SSL Handshake DONE 1.172715 CFNetwork 0x00007fff8c6cbc8f TCP Conn 0x7fc6c04a7f80 starting SSL negotiation 1.172855 CFNetwork 0x00007fff8c6ca659 TCP Conn 0x7fc6c04a7f80 complete. fd: 30, err: 0 1.172968 CFNetwork 0x00007fff8c758f33 TCP Conn 0x7fc6c04a7f80 event 1. err: 0 1.990863 CFNetwork 0x00007fff8c6c992b TCP Conn 0x7fc6c04a7f80 started 2.022573 CFNetwork 0x00007fff8c68d56e Creating default cookie storage with process/bundle identifier 2.022573 CFNetwork 0x00007fff8c68d506 Faulting in CFHTTPCookieStorage singleton 2.022573 CFNetwork 0x00007fff8c68d395 Faulting in NSHTTPCookieStorage singleton Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.jcm.jmc 0x000000010bb2fd0b 0x10b9a4000 + 1621259 1 com.jcm.jmc 0x000000010bb39d63 0x10b9a4000 + 1662307 2 com.jcm.jmc 0x000000010bb2ea2e 0x10b9a4000 + 1616430 3 com.jcm.jmc 0x000000010baf7568 0x10b9a4000 + 1389928 4 com.jcm.jmc 0x000000010baeaa8e 0x10b9a4000 + 1337998 5 com.jcm.jmc 0x000000010bb85252 0x10b9a4000 + 1970770 6 com.jcm.jmc 0x000000010bb7d9f2 0x10b9a4000 + 1939954 7 libsystem_trace.dylib 0x00007fff9543007a _os_activity_initiate + 75 8 com.apple.AppKit 0x00007fff9cce1dbd -[NSApplication sendAction:to:from:] + 460 9 com.apple.AppKit 0x00007fff9ccf3f12 -[NSControl sendAction:to:] + 86 10 com.apple.AppKit 0x00007fff9cd731d5 -[NSTableView _sendAction:to:row:column:] + 111 11 com.apple.AppKit 0x00007fff9cd7193e -[NSTableView mouseDown:] + 6067 12 com.apple.AppKit 0x00007fff9d2453c9 -[NSWindow _handleMouseDownEvent:isDelayedEvent:] + 6322 13 com.apple.AppKit 0x00007fff9d2463ad -[NSWindow _reallySendEvent:isDelayedEvent:] + 212 14 com.apple.AppKit 0x00007fff9cc85539 -[NSWindow sendEvent:] + 517 15 com.apple.AppKit 0x00007fff9cc05a38 -[NSApplication sendEvent:] + 2540 16 com.apple.AppKit 0x00007fff9ca6cdf2 -[NSApplication run] + 796 17 com.apple.AppKit 0x00007fff9ca36368 NSApplicationMain + 1176 18 com.jcm.jmc 0x000000010b9aac99 0x10b9a4000 + 27801 19 libdyld.dylib 0x00007fff9ab7f5ad start + 1 Thread 1: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 2:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff943f6efa kevent_qos + 10 1 libdispatch.dylib 0x00007fff9f606165 _dispatch_mgr_invoke + 216 2 libdispatch.dylib 0x00007fff9f605dcd _dispatch_mgr_thread + 52 Thread 3: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 4: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 5: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 6: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 7: 0 libsystem_kernel.dylib 0x00007fff943effc6 semaphore_timedwait_trap + 10 1 libdispatch.dylib 0x00007fff9f60bc67 _dispatch_semaphore_wait_slow + 149 2 libdispatch.dylib 0x00007fff9f605d1b _dispatch_worker_thread + 148 3 libsystem_pthread.dylib 0x00007fff94f9c99d _pthread_body + 131 4 libsystem_pthread.dylib 0x00007fff94f9c91a _pthread_start + 168 5 libsystem_pthread.dylib 0x00007fff94f9a351 thread_start + 13 Thread 8: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 9: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 10: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 11:: com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x00007fff943eff72 mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff943ef3b3 mach_msg + 55 2 com.apple.CoreFoundation 0x00007fffa03b0114 __CFRunLoopServiceMachPort + 212 3 com.apple.CoreFoundation 0x00007fffa03af5dc __CFRunLoopRun + 1356 4 com.apple.CoreFoundation 0x00007fffa03aee28 CFRunLoopRunSpecific + 296 5 com.apple.CFNetwork 0x00007fff8c690a6d +[NSURLConnection(Loader) _resourceLoadLoop:] + 412 6 com.apple.Foundation 0x00007fff8ba2bc84 __NSThread__start__ + 1351 7 libsystem_pthread.dylib 0x00007fff94f9c99d _pthread_body + 131 8 libsystem_pthread.dylib 0x00007fff94f9c91a _pthread_start + 168 9 libsystem_pthread.dylib 0x00007fff94f9a351 thread_start + 13 Thread 12: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 13: 0 libsystem_kernel.dylib 0x00007fff943f65e2 __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff94f9c578 _pthread_wqthread + 1283 2 libsystem_pthread.dylib 0x00007fff94f9a341 start_wqthread + 13 Thread 14:: com.apple.NSEventThread 0 libsystem_kernel.dylib 0x00007fff943eff72 mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff943ef3b3 mach_msg + 55 2 com.apple.CoreFoundation 0x00007fffa03b0114 __CFRunLoopServiceMachPort + 212 3 com.apple.CoreFoundation 0x00007fffa03af5dc __CFRunLoopRun + 1356 4 com.apple.CoreFoundation 0x00007fffa03aee28 CFRunLoopRunSpecific + 296 5 com.apple.AppKit 0x00007fff9cbced95 _NSEventThread + 149 6 libsystem_pthread.dylib 0x00007fff94f9c99d _pthread_body + 131 7 libsystem_pthread.dylib 0x00007fff94f9c91a _pthread_start + 168 8 libsystem_pthread.dylib 0x00007fff94f9a351 thread_start + 13 Thread 15:: com.apple.CFSocket.private 0 libsystem_kernel.dylib 0x00007fff943f607a __select + 10 1 com.apple.CoreFoundation 0x00007fffa03ed45a __CFSocketManager + 762 2 libsystem_pthread.dylib 0x00007fff94f9c99d _pthread_body + 131 3 libsystem_pthread.dylib 0x00007fff94f9c91a _pthread_start + 168 4 libsystem_pthread.dylib 0x00007fff94f9a351 thread_start + 13 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00007fff5425b201 rbx: 0x00007fc6c3c13570 rcx: 0x0000000000000040 rdx: 0x000000010bb29c00 rdi: 0x00007fff5425b220 rsi: 0x00007fc6c043a670 rbp: 0x00007fff5425b280 rsp: 0x00007fff5425b120 r8: 0x0000000000000003 r9: 0x00007fc6c3c5a2d0 r10: 0x00007fc6c3c23670 r11: 0x00007fff7e86c658 r12: 0x000000010bb325a0 r13: 0x000000010bfed048 r14: 0x00007fff5425b220 r15: 0x00007fc6c043a630 rip: 0x000000010bb2fd0b rfl: 0x0000000000010202 cr2: 0x000000010c32dc84 Logical CPU: 0 Error Code: 0x00000000 Trap Number: 6 Binary Images: 0x10b9a4000 - 0x10bc06ff7 +com.jcm.jmc (1.0 - 1) <989FEC90-2733-398F-A171-3DB1B310C72B> /Applications/jmc.app/Contents/MacOS/jmc 0x10bcde000 - 0x10bce2ff7 +libogg.dylib (9.2) <04945B8D-D1E6-381A-869A-2EB09DE008EC> /Applications/jmc.app/Contents/Frameworks/libogg.dylib 0x10bceb000 - 0x10bcf8fff +libswiftAVFoundation.dylib (3.1 - 802.0.53) <3060437F-33F4-3378-9D51-60F4A8002294> /Applications/jmc.app/Contents/Frameworks/libswiftAVFoundation.dylib 0x10bd06000 - 0x10bd12fff +libswiftAppKit.dylib (3.1 - 802.0.53)