Given the following symbolicated crash log, is it more likely that the crash occurred due to the ASIHTTPRequest on Thread 5 or the NSURLConnection on Thread 3? I ask because this question has similar issues: ASIHTTPRequest, EXC_BAD_ACCESS when request did finished
However, they had more around their ASIHTTPREquest crash and it was on Thread 3 whereas my NSURLConnection is on Thread 3 with more info than the other.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 Crashed:
0 libSystem.B.dylib 0x33bd52d4 __kill + 8
1 libSystem.B.dylib 0x33bd52c4 kill + 4
2 libSystem.B.dylib 0x33bd52b6 raise + 10
3 libSystem.B.dylib 0x33be9d72 abort + 50
4 libstdc++.6.dylib 0x31bdba20 __gnu_cxx::__verbose_terminate_handler() + 376
5 libobjc.A.dylib 0x3347c594 _objc_terminate + 104
6 libstdc++.6.dylib 0x31bd9df2 __cxxabiv1::__terminate(void (*)()) + 46
7 libstdc++.6.dylib 0x31bd9e46 std::terminate() + 10
8 libstdc++.6.dylib 0x31bd9f16 __cxa_throw + 78
9 libobjc.A.dylib 0x3347b4c4 objc_exception_throw + 64
10 Foundation 0x33639910 __NSThreadPerformPerform + 648
11 CoreFoundation 0x33a767d6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
12 CoreFoundation 0x33a485b0 __CFRunLoopDoSources0 + 376
13 CoreFoundation 0x33a47e54 __CFRunLoopRun + 224
14 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
15 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
16 GraphicsServices 0x33b0e4a4 GSEventRunModal + 108
17 GraphicsServices 0x33b0e550 GSEventRun + 56
18 UIKit 0x32099322 -[UIApplication _run] + 406
19 UIKit 0x32096e8c UIApplicationMain + 664
20 AppName 0x00002172 main (main.m:14)
21 AppName 0x0000213c start + 32
Thread 1:
0 libSystem.B.dylib 0x33b89974 kevent + 24
1 libSystem.B.dylib 0x33c33704 _dispatch_mgr_invoke + 88
2 libSystem.B.dylib 0x33c33174 _dispatch_queue_invoke + 96
3 libSystem.B.dylib 0x33c32b98 _dispatch_worker_thread2 + 120
4 libSystem.B.dylib 0x33bd724a _pthread_wqthread + 258
5 libSystem.B.dylib 0x33bcf970 start_wqthread + 0
Thread 2:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
6 WebCore 0x304df124 RunWebThread(void*) + 332
7 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
8 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 3:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
6 Foundation 0x336465f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
7 Foundation 0x33624192 -[NSThread main] + 38
8 Foundation 0x3361d242 __NSThread__main__ + 966
9 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
10 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 4:
0 libSystem.B.dylib 0x33b8168c select$DARWIN_EXTSN + 20
1 CoreFoundation 0x33a7f662 __CFSocketManager + 582
2 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
3 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 5:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a57efe CFR开发者_如何学GounLoopRun + 42
6 StageBloc 0x00032a08 +[ASIHTTPRequest runRequests] (ASIHTTPRequest.m:4269)
7 Foundation 0x33624192 -[NSThread main] + 38
8 Foundation 0x3361d242 __NSThread__main__ + 966
9 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
10 libSystem.B.dylib 0x33bcba88 thread_start + 0
As other's have said, there's not enough information in the crash dump to tell if it's the NSURLConnection or the ASIHTTPRequest thread that might be involved, and the console output may help.
However, given past experience, it seems that the chances are that it involves ASIHTTPRequest.
What version of ASIHTTPRequest are you using?
The most common problem people have with ASIHTTPRequest is issues with request vs delegate lifetime, so I'd recommend double checking that in every object you have that can be a delegate to an ASIHTTPRequest (or an ASINetworkQueue) has in the dealloc method:
[request cancel]
[request setDelegate:nil];
[request release];
This should be done for every potentially active request.
Googled for objc_exception_throw __NSThreadPerformPerform and found this question with similar crash backtrace ... your exception might be the same missing selector thing. In that thread Brad Larson suggests "going to your build settings and adding -Wundeclared-selector in the Other Warning Flags" to maybe catch this at compile time.
objc_exception_throw 8 or 9 down in the stack indicates, of course, an exception was thrown. you want to look in the device's console log (or xcode's run console if running in the simulator) to see if a message was logged before crashing.
(i have a bone to pick with os x & ios crash reporting, why aren't a bunch of the last lines logged to the console included in the crash report? that would be very helpful for a many kinds of crashes).
It turned out to be a Three20 issue. When I initially installed it, I had to change some linker flags in the build settings. Those flags weren't changed for my distribution build, just my debug one. So the App Store people were seeing it crash because those necessary flags weren't there. Stupid mistake.
As far as I know, the problem is in Thread 5:
Thread 5:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a57efe CFRunLoopRun + 42
**6 StageBloc 0x00032a08 +[ASIHTTPRequest runRequests] (ASIHTTPRequest.m:4269)**
ASIHTTPRequest could be the problem. Try update the ASIHTTPRequest to the lasted version: http://allseeing-i.com/ASIHTTPRequest/
I used this as
[request clearDelegatesAndCancel];
request = nil;
精彩评论