It's rare, but we are seeing a handful of EXC_BAD_ACCESS KERN_INVALID_ADDRESS crashes with version 9.2.4 when Nuke attempts to create an image from Data in ImageDecoders.Default._decode(_:). We have not been able to reproduce it. I suspect this is an issue within Nuke or UIKit, but please let me know if there is something we could be doing to cause this. The pertinent stack trace is below.
Crashed: com.github.kean.Nuke.ImagePipeline
0 libdyld.dylib 0x1865fafcc tlv_load_notification + 104
1 libdyld.dylib 0x186600150 invocation function for block in dyld3::AllImages::runImageCallbacks(dyld3::Array<dyld3::LoadedImage> const&) + 240
2 libdyld.dylib 0x1865ff984 dyld3::AllImages::runImageCallbacks(dyld3::Array<dyld3::LoadedImage> const&) + 140
3 libdyld.dylib 0x186604aec dyld3::AllImages::loadImage(Diagnostics&, char const*, unsigned int, dyld3::closure::DlopenClosure const*, bool, bool, bool, bool, void const*) + 716
4 libdyld.dylib 0x186604678 dyld3::AllImages::dlopen(Diagnostics&, char const*, bool, bool, bool, bool, bool, void const*, bool) + 872
5 libdyld.dylib 0x186606294 dyld3::dlopen_internal(char const*, int, void*) + 368
6 libdyld.dylib 0x1865f9590 dlopen_internal(char const*, int, void*) + 108
7 ImageIO 0x187f09340 IIO_ReaderHandler::buildPluginList() + 204
8 ImageIO 0x187f09200 IIO_ReaderHandler::IIO_ReaderHandler() + 64
9 ImageIO 0x187f0b7cc invocation function for block in IIO_ReaderHandler::GetReaderHandler() + 28
10 libdispatch.dylib 0x1865d6280 _dispatch_client_callout + 16
11 libdispatch.dylib 0x18657a2f4 _dispatch_once_callout + 28
12 ImageIO 0x187f0b7ac IIO_ReaderHandler::GetReaderHandler() + 60
13 ImageIO 0x187e6ae50 IIOImageSource::doBindToReader() + 56
14 ImageIO 0x187e6b4cc IIOImageSource::updatedCount() + 52
15 ImageIO 0x187e6fe5c CGImageSourceGetCount + 156
16 UIKitCore 0x1897c59dc _UIImageRefFromData + 268
17 UIKitCore 0x188e0150c -[UIImage _initWithData:preserveScale:cache:scale:] + 60
18 Nuke 0x10a0c0664 @nonobjc UIImage.init(data:scale:) + 68 (<compiler-generated>:68)
19 Nuke 0x10a0c0610 UIImage.__allocating_init(data:scale:) + 68 (<compiler-generated>:68)
20 Nuke 0x10a0bfcf8 static ImageDecoders.Default._decode(_:) + 198 (ImageDecoding.swift:198)
21 Nuke 0x10a0bf03c ImageDecoders.Default._decode(_:) + 117 (ImageDecoding.swift:117)
22 Nuke 0x10a0bedc8 ImageDecoders.Default.init(data:context:) + 96 (ImageDecoding.swift:96)
23 Nuke 0x10a0bec7c ImageDecoders.Default.__allocating_init(data:context:) + 95 (ImageDecoding.swift:95)
24 Nuke 0x10a0c0590 protocol witness for ImageDecoderRegistering.init(data:context:) in conformance ImageDecoders.Default + 20 (<compiler-generated>:20)
25 Nuke 0x10a0c10dc closure #1 in ImageDecoderRegistry.register<A>(_:) + 286 (ImageDecoding.swift:286)
26 Nuke 0x10a0c0f34 ImageDecoderRegistry.decoder(for:) + 273 (ImageDecoding.swift:273)
27 Nuke 0x10a0ac188 implicit closure #2 in implicit closure #1 in variable initialization expression of ImagePipeline.Configuration.makeImageDecoder + 40 (<compiler-generated>:40)
28 Nuke 0x10a0777f8 ImagePipeline.decoder(for:data:urlResponse:isCompleted:) + 638 (ImagePipeline.swift:638)
29 Nuke 0x10a07733c ImagePipeline.decodeData(_:urlResponse:isCompleted:task:context:) + 604 (ImagePipeline.swift:604)
30 Nuke 0x10a077034 closure #1 in closure #1 in ImagePipeline.getOriginalImage(for:) + 584 (ImagePipeline.swift:584)
31 Nuke 0x10a077640 thunk for @escaping @callee_guaranteed (@guaranteed Data, @guaranteed NSURLResponse?, @unowned Bool, @guaranteed Task<ImageResponse, ImagePipeline.Error>) -> () + 88 (<compiler-generated>:88)
32 Nuke 0x10a0872d8 closure #1 in Task.Publisher.subscribe<A>(_:onValue:) + 194 (Task.swift:194)
33 Nuke 0x10a0864a8 Task.send(event:) + 144 (Task.swift:144)
34 Nuke 0x10a085fec Task.send(value:isCompleted:) + 118 (Task.swift:118)
35 Nuke 0x10a07969c closure #1 in closure #1 in ImagePipeline.performOriginalImageDataTask(_:context:) + 698 (ImagePipeline.swift:698)
36 Nuke 0x10a068eec thunk for @escaping @callee_guaranteed () -> () + 52 (<compiler-generated>:52)
37 libdispatch.dylib 0x1865d5298 _dispatch_call_block_and_release + 24
38 libdispatch.dylib 0x1865d6280 _dispatch_client_callout + 16
39 libdispatch.dylib 0x18657edcc _dispatch_lane_serial_drain$VARIANT$mp + 612
40 libdispatch.dylib 0x18657f8a8 _dispatch_lane_invoke$VARIANT$mp + 424
41 libdispatch.dylib 0x186589338 _dispatch_workloop_worker_thread + 712
42 libsystem_pthread.dylib 0x1cf1815a4 _pthread_wqthread + 272
43 libsystem_pthread.dylib 0x1cf184874 start_wqthread + 8
It's rare, but we are seeing a handful of EXC_BAD_ACCESS KERN_INVALID_ADDRESS crashes with version 9.2.4 when Nuke attempts to create an image from
DatainImageDecoders.Default._decode(_:). We have not been able to reproduce it. I suspect this is an issue within Nuke or UIKit, but please let me know if there is something we could be doing to cause this. The pertinent stack trace is below.