estemendoza
estemendoza

Reputation: 3085

AFNetworking crash analysis for EXC_BAD_ACCESS KERN_INVALID_ADDRESS

I'm getting crash reports of AFNetworking throwing an EXC_BAD_ACCESS KERN_INVALID_ADDRESS:

Thread : Crashed: com.apple.root.default-priority
0  libobjc.A.dylib                0x39e237fa objc_release + 9
1  MY_APP                         0x0015ba63 __64-[AFHTTPRequestOperation setCompletionBlockWithSuccess:failure:]_block_invoke (AFHTTPRequestOperation.m:266)
2  MY_APP                         0x00163bf7 __47-[AFURLConnectionOperation setCompletionBlock:]_block_invoke (AFURLConnectionOperation.m:301)
3  Foundation                     0x3049a2a9 __103+[__NSOperationInternal _observeValueForKeyPath:ofObject:changeKind:oldValue:newValue:indexes:context:]_block_invoke96 + 12
4  libdispatch.dylib              0x3a30b0c3 _dispatch_call_block_and_release + 10
5  libdispatch.dylib              0x3a3107d9 _dispatch_root_queue_drain + 224
6  libdispatch.dylib              0x3a3109c5 _dispatch_worker_thread2 + 56
7  libsystem_pthread.dylib        0x3a43adff _pthread_wqthread + 298

I need help to understand the possible bug. This is something that happens sometimes, actually is very rare and it could be related to a timeout issue when user is using 3G (network can be disconnected while loading data).

I don't post my code because I can't find on the crash log in which file or class this crash happened and I use AFNetworking in a lot of files.

Upvotes: 0

Views: 1813

Answers (1)

Kevin
Kevin

Reputation: 3131

Without any code this is all conjecture but:

Something in the completion block is being accessed after it is deallocated. Commonly, this happens when a network operation isn't cancelled after a view controller is dismissed.

Upvotes: 1

Related Questions