We are getting crashes reported on Crashlytics at line 137 of AFURLResponseSerialization.m inside the validateResponse method.
Crashed: com.alamofire.networking.session.manager.processing
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000f7202bec8
0 | libobjc.A.dylib | objc_object::release() + 16
1 | MyApp | AFURLResponseSerialization.m聽line聽137-[AFHTTPResponseSerializer validateResponse:data:error:]
2 | MyApp | AFURLResponseSerialization.m聽line聽239-[AFJSONResponseSerializer responseObjectForResponse:data:error:]
3 | MyApp | AWJSONResponseSerializer.m聽line聽25-[AWJSONResponseSerializer responseObjectForResponse:data:error:]
4 | MyApp | AFURLSessionManager.m聽line聽292__72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke.147
Is there any further data in Crashlytics for this crash? Hard to know what鈥檚 going on from these lines.
Unfortunately no more information. I suppose any information about what could cause this crash or how to hunt it down would be helpful. Even if it's not specific.
I'm not sure what version of AFNetworking you鈥檙e using, but in master this line covers error reporting. If you put a breakpoint there, do you hit it?
I am using 3.1. The crash has only reproduced in production, I've never managed to get it locally.
@Haberdashery1234 you should update to the latest version.
I think this problem is not fixed, my team use the same code as the
@Haberdashery1234 you should update to the latest version.
3526 had fixed that.
Maybe this question is not fixed. I have the same code in my app, but it still have the same question.
0 | libobjc.A.dylib | 0x00000001a091eb00 objc_object::release() + 16
-- | -- | --
1 | myapp | 0x00000001052808b4 -[AFHTTPResponseSerializer validateResponse:data:error:] (AFURLResponseSerialization.m:116)
2 | myapp | 0x00000001052815e4 -[AFJSONResponseSerializer responseObjectForResponse:data:error:] (AFURLResponseSerialization.m:238)
3 | myapp | 0x0000000105065808 __72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke.180 (AFURLSessionManager.m:227)
@mcmengchen - the latest version release (3.2.1) does not include the changes, but if you pull from the master branch using:
pod 'AFNetworking', :git => 'https://github.com/AFNetworking/AFNetworking.git', :commit => '685e31a31bb1ebce3fdb5a752e392dfd8263e169'
Then you'll get the fixes.
This issue has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
It looks like 4.0.0 was just released, which should fix this issue, and so I believe this could be closed.
Most helpful comment
I think this problem is not fixed, my team use the same code as the
Maybe this question is not fixed. I have the same code in my app, but it still have the same question.
0 | libobjc.A.dylib | 0x00000001a091eb00 objc_object::release() + 16
-- | -- | --
1 | myapp | 0x00000001052808b4 -[AFHTTPResponseSerializer validateResponse:data:error:] (AFURLResponseSerialization.m:116)
2 | myapp | 0x00000001052815e4 -[AFJSONResponseSerializer responseObjectForResponse:data:error:] (AFURLResponseSerialization.m:238)
3 | myapp | 0x0000000105065808 __72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke.180 (AFURLSessionManager.m:227)