SDWebImage: Crash on [SDWebImageDownloaderOperation reset]_block_invoke
[X] I have read and understood the CONTRIBUTING guide [X] I have read the Documentation [X] I have searched for a similar issue in the project and found none
I got this crash twice. Unfortunately cannot reproduce it. Just can provide info from Fabric.
Issue Info
Info | Value |
---|---|
Platform Name | iOS |
Platform Version | 10.3.1 |
SDWebImage Version | 4.0.0 |
Integration Method | Cocoapods |
Xcode Version | Xcode 8.0 |
Repro rate | twice |
Repro with demo prj | cannot reproduce |
Demo project link | cannot reproduce |
Issue Description and Steps
Crashed: com.hackemist.SDWebImageDownloaderOperationBarrierQueue EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000092a29beb8
0 libobjc.A.dylib 0x184424150 objc_msgSend + 16 1 SDWebImage 0x1013d31e0 __38-[SDWebImageDownloaderOperation reset]_block_invoke (SDWebImageDownloaderOperation.m:227) 2 libdispatch.dylib 0x1848669e0 _dispatch_call_block_and_release + 24 3 libdispatch.dylib 0x1848669a0 _dispatch_client_callout + 16 4 libdispatch.dylib 0x184878578 _dispatch_queue_concurrent_drain + 1372 5 libdispatch.dylib 0x18486a2d4 _dispatch_queue_invoke + 892 6 libdispatch.dylib 0x184876a50 _dispatch_root_queue_drain + 540 7 libdispatch.dylib 0x1848767d0 _dispatch_worker_thread3 + 124 8 libsystem_pthread.dylib 0x184a6f1d0 _pthread_wqthread + 1096 9 libsystem_pthread.dylib 0x184a6ed7c start_wqthread + 4
Also downloaded crashreport from Apple
- (void)reset {
dispatch_barrier_async(self.barrierQueue, ^{
[self.callbackBlocks removeAllObjects]; // crash is here
});
self.dataTask = nil;
self.imageData = nil;
if (self.ownedSession) {
[self.ownedSession invalidateAndCancel];
self.ownedSession = nil;
}
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 29 (12 by maintainers)
Commits related to this issue
- Attempt to fix #1883 by using a weakSelf reference to remove from callbackBlocks (on the barrierQueue) — committed to Privalia/SDWebImage by bpoplauschi 7 years ago
- Attempt to fix #1883 by using a weakSelf reference to remove from callbackBlocks (on the barrierQueue) — committed to Lightricks/SDWebImage by bpoplauschi 7 years ago
@bpoplauschi :Thanks for release
Thanks! I’ll try this on my next release and let you know what I find
We also facing the same issue and the crash only happens in iOS 10 devices.