Closed DanielRuf closed 3 months ago
The crash is caused in this part of RefreshManager by a nil
MIMEType in the request response…
curl -I https://github.com/security-advisories
answers content-type: atom; charset=utf-8
, which is a bit unusual (application/atom+xml
is quite frequent) and might confuse NSURLSession.
content-type: atom
isn't mentioned on the IANA list. Regardless, I overlooked that MIMEType
may be nil
, so it should be checked first (and maybe set to an empty string, since the only purpose currently is to detect JSON content). Maybe adding distinct arguments to finalizeFolderRefresh
instead of a dictionary would be preferable too.
Should be resolved by #1775.
Describe the bug After adding https://github.com/security-advisories Vienna crashes.
To Reproduce Steps to reproduce the behaviour, if possible.
Please complete the following information:
Additional information:
Log
``` ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: Vienna [46384] Path: /Volumes/VOLUME/*/Vienna.app/Contents/MacOS/Vienna Identifier: uk.co.opencommunity.vienna2 Version: 3.9.1 :a82691eb: (8219) Code Type: X86-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2024-07-21 13:47:35.8275 +0200 OS Version: macOS 12.7.5 (21H1222) Report Version: 12 Anonymous UUID: D78E91B9-7162-1DED-15E1-AD85C1D4A0DE Sleep/Wake UUID: 513F4558-E60E-44CC-8C01-FBCE2D3F3B1D Time Awake Since Boot: 1500000 seconds Time Since Wake: 5037 seconds System Integrity Protection: enabled Crashed Thread: 1 Dispatch queue: uk.co.opencommunity.vienna2.refresh Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: abort() called Application Specific Backtrace 0: 0 CoreFoundation 0x00007ff80f9bf6b3 __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff80f71f8bb objc_exception_throw + 48 2 CoreFoundation 0x00007ff80fa7af5c _CFThrowFormattedException + 202 3 CoreFoundation 0x00007ff80fa858b1 -[__NSPlaceholderDictionary initWithCapacity:].cold.1 + 0 4 CoreFoundation 0x00007ff80f8cec2e -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 251 5 CoreFoundation 0x00007ff80f8ceb19 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49 6 Vienna 0x00000001038ec122 Vienna + 471330 7 libdispatch.dylib 0x00007ff80f6c40cc _dispatch_call_block_and_release + 12 8 libdispatch.dylib 0x00007ff80f6c5317 _dispatch_client_callout + 8 9 libdispatch.dylib 0x00007ff80f6cb317 _dispatch_lane_serial_drain + 672 10 libdispatch.dylib 0x00007ff80f6cbdfd _dispatch_lane_invoke + 366 11 libdispatch.dylib 0x00007ff80f6d5eee _dispatch_workloop_worker_thread + 753 12 libsystem_pthread.dylib 0x00007ff80f879fd0 _pthread_wqthread + 326 13 libsystem_pthread.dylib 0x00007ff80f878f57 start_wqthread + 15 Thread 0:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x7ff80f84093a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x7ff80f840ca8 mach_msg + 56 2 CoreFoundation 0x7ff80f94427d __CFRunLoopServiceMachPort + 319 3 CoreFoundation 0x7ff80f942908 __CFRunLoopRun + 1276 4 CoreFoundation 0x7ff80f941d4c CFRunLoopRunSpecific + 562 5 HIToolbox 0x7ff8185f55e6 RunCurrentEventLoopInMode + 292 6 HIToolbox 0x7ff8185f534a ReceiveNextEventCommon + 594 7 HIToolbox 0x7ff8185f50e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70 8 AppKit 0x7ff812380aa9 _DPSNextEvent + 927 9 AppKit 0x7ff81237f166 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394 10 AppKit 0x7ff812371818 -[NSApplication run] + 586 11 AppKit 0x7ff81234579a NSApplicationMain + 817 12 dyld 0x10d58852e start + 462 Thread 1 Crashed:: Dispatch queue: uk.co.opencommunity.vienna2.refresh 0 libsystem_kernel.dylib 0x7ff80f846fce __pthread_kill + 10 1 libsystem_pthread.dylib 0x7ff80f87d1ff pthread_kill + 263 2 libsystem_c.dylib 0x7ff80f7c8d14 abort + 123 3 libc++abi.dylib 0x7ff80f839082 abort_message + 241 4 libc++abi.dylib 0x7ff80f82a25d demangling_terminate_handler() + 266 5 libobjc.A.dylib 0x7ff80f726e39 _objc_terminate() + 96 6 libc++abi.dylib 0x7ff80f8384a7 std::__terminate(void (*)()) + 8 7 libc++abi.dylib 0x7ff80f838458 std::terminate() + 56 8 libdispatch.dylib 0x7ff80f6c532b _dispatch_client_callout + 28 9 libdispatch.dylib 0x7ff80f6cb317 _dispatch_lane_serial_drain + 672 10 libdispatch.dylib 0x7ff80f6cbdfd _dispatch_lane_invoke + 366 11 libdispatch.dylib 0x7ff80f6d5eee _dispatch_workloop_worker_thread + 753 12 libsystem_pthread.dylib 0x7ff80f879fd0 _pthread_wqthread + 326 13 libsystem_pthread.dylib 0x7ff80f878f57 start_wqthread + 15 Thread 2: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 3: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 4: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 5: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 6:: JavaScriptCore libpas scavenger 0 libsystem_kernel.dylib 0x7ff80f8433aa __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x7ff80f87da6f _pthread_cond_wait + 1249 2 JavaScriptCore 0x7ff8282f1f25 scavenger_thread_main + 1397 3 libsystem_pthread.dylib 0x7ff80f87d4e1 _pthread_start + 125 4 libsystem_pthread.dylib 0x7ff80f878f6b thread_start + 15 Thread 7:: com.apple.coreanimation.render-server 0 libsystem_kernel.dylib 0x7ff80f84093a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x7ff80f840ca8 mach_msg + 56 2 QuartzCore 0x7ff816a3d943 CA::Render::Server::server_thread(void*) + 534 3 QuartzCore 0x7ff816a3d722 thread_fun(void*) + 25 4 libsystem_pthread.dylib 0x7ff80f87d4e1 _pthread_start + 125 5 libsystem_pthread.dylib 0x7ff80f878f6b thread_start + 15 Thread 8: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 9:: com.apple.NSEventThread 0 libsystem_kernel.dylib 0x7ff80f84093a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x7ff80f840ca8 mach_msg + 56 2 CoreFoundation 0x7ff80f94427d __CFRunLoopServiceMachPort + 319 3 CoreFoundation 0x7ff80f942908 __CFRunLoopRun + 1276 4 CoreFoundation 0x7ff80f941d4c CFRunLoopRunSpecific + 562 5 AppKit 0x7ff8124ee572 _NSEventThread + 132 6 libsystem_pthread.dylib 0x7ff80f87d4e1 _pthread_start + 125 7 libsystem_pthread.dylib 0x7ff80f878f6b thread_start + 15 Thread 10: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 11: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 12: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 13: 0 libsystem_pthread.dylib 0x7ff80f878f48 start_wqthread + 0 Thread 14:: com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x7ff80f84093a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x7ff80f840ca8 mach_msg + 56 2 CoreFoundation 0x7ff80f94427d __CFRunLoopServiceMachPort + 319 3 CoreFoundation 0x7ff80f942908 __CFRunLoopRun + 1276 4 CoreFoundation 0x7ff80f941d4c CFRunLoopRunSpecific + 562 5 CFNetwork 0x7ff814570964 0x7ff814328000 + 2394468 6 Foundation 0x7ff810799734 __NSThread__start__ + 1009 7 libsystem_pthread.dylib 0x7ff80f87d4e1 _pthread_start + 125 8 libsystem_pthread.dylib 0x7ff80f878f6b thread_start + 15 Thread 1 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x000070000ea58000 rcx: 0x000070000ea572c8 rdx: 0x0000000000000000 rdi: 0x0000000000002707 rsi: 0x0000000000000006 rbp: 0x000070000ea572f0 rsp: 0x000070000ea572c8 r8: 0x000070000ea57190 r9: 0x00007ff80f83bf9b r10: 0x0000000000000000 r11: 0x0000000000000246 r12: 0x0000000000002707 r13: 0x0000003000000008 r14: 0x0000000000000006 r15: 0x0000000000000016 rip: 0x00007ff80f846fce rfl: 0x0000000000000246 cr2: 0x0000000000000000 Logical CPU: 0 Error Code: 0x02000148 Trap Number: 133 Binary Images: 0x7ff80f83f000 - 0x7ff80f876fff libsystem_kernel.dylib (*) <4c15b367-00c6-38ab-80d0-19ce510c640d> /usr/lib/system/libsystem_kernel.dylib 0x7ff80f8c4000 - 0x7ff80fdc6fff com.apple.CoreFoundation (6.9) <900586d5-33c5-353b-940a-0bfc9c3c4298> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7ff8185c7000 - 0x7ff8188bafff com.apple.HIToolbox (2.1.1) <913d3d2e-4e4c-3907-98fe-8f4abd551297> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x7ff812342000 - 0x7ff8131d1fff com.apple.AppKit (6.9) <125f013d-d099-3aa0-b5bc-b26ff1859626> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x10d583000 - 0x10d5eefff dyld (*) <10c8ed27-59df-36b5-ab45-7a381b384783> /usr/lib/dyld 0x7ff80f877000 - 0x7ff80f882fff libsystem_pthread.dylib (*) <5a5f7316-85b7-315e-baf3-76211ee65604> /usr/lib/system/libsystem_pthread.dylib 0x7ff80f747000 - 0x7ff80f7cffff libsystem_c.dylib (*) <202d7260-ea46-3956-a471-19c9bcf45274> /usr/lib/system/libsystem_c.dylib 0x7ff80f829000 - 0x7ff80f83efff libc++abi.dylib (*) <69ac868b-1157-364a-984a-5ef26973f661> /usr/lib/libc++abi.dylib 0x7ff80f709000 - 0x7ff80f743fff libobjc.A.dylib (*)