gdavis / Mimir-Feedback

The place to report bugs and suggest improvements for the podcast app Mimir
https://mimirpodcasts.app
9 stars 0 forks source link

[Crash]: `EXC_BAD_ACCESS` in `ImageManager.cachedImage(for:)` #136

Closed gdavis closed 2 years ago

gdavis commented 2 years ago

Looks like a threading issue. Perhaps multiple requests were being made for the same cached image from different threads?

Thread 9:
0   libobjc.A.dylib                 0x00000001c1a7b27c objc_class::isInitialized() + 36
1   libobjc.A.dylib                 0x00000001c1a62c18 lookUpImpOrForward + 76
2   libobjc.A.dylib                 0x00000001c1a628e4 _objc_msgSend_uncached + 68
3   CoreFoundation                  0x00000001c1c83e40 __24-[NSCache objectForKey:]_block_invoke + 36
4   libcache.dylib                  0x00000001cc735be8 cache_get + 376
5   CoreFoundation                  0x00000001c1c83a38 -[NSCache objectForKey:] + 192
6   MimirKit                        0x00000001068b0248 closure #1 in static ImageManager.cachedImage(for:) + 100
7   MimirKit                        0x00000001068b0560 thunk for @callee_guaranteed () -> (@owned ImageManager.ImageCache?, @error @owned Error) + 24
8   MimirKit                        0x00000001068a3618 partial apply for thunk for @callee_guaranteed () -> (@owned ImageManager.ImageCache?, @error @owned Error) + 16
9   libswiftDispatch.dylib          0x00000001d43747dc partial apply for thunk for @callee_guaranteed () -> (@out A, @error @owned Error) + 28
10  libswiftDispatch.dylib          0x00000001d4374908 thunk for @callee_guaranteed () -> (@out A, @error @owned Error)partial apply + 16
11  libswiftDispatch.dylib          0x00000001d4372c4c closure #1 in closure #1 in OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:) + 188
12  libswiftDispatch.dylib          0x00000001d4374688 partial apply for thunk for @callee_guaranteed () -> () + 28
13  libswiftDispatch.dylib          0x00000001d436e634 thunk for @escaping @callee_guaranteed () -> () + 28
14  libdispatch.dylib               0x00000001c1a181b4 _dispatch_client_callout + 20
15  libdispatch.dylib               0x00000001c1a27414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
16  libswiftDispatch.dylib          0x00000001d437371c implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync<A>(execute:) + 180
17  libswiftDispatch.dylib          0x00000001d4373ecc partial apply for implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync<A>(execute:) + 56
18  libswiftDispatch.dylib          0x00000001d4372a8c OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:) + 396
19  libswiftDispatch.dylib          0x00000001d437328c OS_dispatch_queue.sync<A>(execute:) + 168
20  MimirKit                        0x00000001068a0cd0 closure #1 in closure #1 in static Publishers.cachedImagePublisher(request:) + 188
21  MimirKit                        0x00000001068a9a9c thunk for @escaping @callee_guaranteed () -> () + 28
22  libdispatch.dylib               0x00000001c1a165f0 _dispatch_call_block_and_release + 32
23  libdispatch.dylib               0x00000001c1a181b4 _dispatch_client_callout + 20
24  libdispatch.dylib               0x00000001c1a1f8a8 _dispatch_lane_serial_drain + 668
25  libdispatch.dylib               0x00000001c1a20404 _dispatch_lane_invoke + 392
26  libdispatch.dylib               0x00000001c1a2ac98 _dispatch_workloop_worker_thread + 648
27  libsystem_pthread.dylib         0x00000001c1bd8360 _pthread_wqthread + 288
28  libsystem_pthread.dylib         0x00000001c1bd7080 start_wqthread + 8

testflight_feedback(9).zip