Alamofire / AlamofireImage

AlamofireImage is an image component library for Alamofire
MIT License
3.99k stars 523 forks source link

Crash on specialized Dictionary.subscript.getter #385

Closed rausnitz closed 5 years ago

rausnitz commented 5 years ago

What did you do?

I've recently started seeing this crash in Crashlytics (generated from an app that users have downloaded from the App Store) but I haven't reproduced it. I'm not certain of the versions of Xcode and Swift that were in use so I'm omitting those, but I think it might be useful to share this crash report anyway since it doesn't seem related to our implementation.

What did you expect to happen?

Not crash.

What happened instead?

Crashed: org.alamofire.autopurgingimagecache-ba8a47d5e954d59a
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000 Raw Text
--
0 | AlamofireImage | <compiler-generated> line 0
specialized Dictionary.subscript.getter
1 | AlamofireImage | ImageCache.swift line 325
closure #1 in AutoPurgingImageCache.image(withIdentifier:) + 325
2 | AlamofireImage | <compiler-generated> line 0
partial apply for thunk for @callee_guaranteed () -> ()
3 | AlamofireImage | <compiler-generated> line 0
thunk for @escaping @callee_guaranteed () -> ()
4 | libdispatch.dylib | _dispatch_client_callout + 16
5 | libdispatch.dylib | _dispatch_sync_invoke_and_complete + 56
6 | AlamofireImage | ImageCache.swift line 324
AutoPurgingImageCache.image(withIdentifier:) + 324

Alamofire Environment

jshier commented 5 years ago

This is likely related to the thread-safety issues that was recently fixed. Update to 3.6.0 to get the fix.