我在网络线程中遇到了一个奇怪的崩溃,在发布一个URLResponse时发生了。我没有直接操作URLCache的内容,那么可能是造成这个问题的原因?
以下是崩溃日志供参考:
Incident Identifier: E4116BAA-7467-42F8-B28E-7A1FA2D12278
CrashReporter Key: dcaac993b4bfa7e5015f07b0ffc611182b196e57
Hardware Model: iPad2,1
Process: *** [6299]
Path: /var/mobile/Applications/
Identifier: ***
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-06-25 11:11:59.347 +0800
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x42810008
Crashed Thread: 2
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x30367010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x30367206 mach_msg + 50
2 CoreFoundation 0x37cea41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x37ce911a __CFRunLoopRun + 818
4 CoreFoundation 0x37c6c4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x37c6c39e CFRunLoopRunInMode + 98
6 GraphicsServices 0x37a43fc6 GSEventRunModal + 150
7 UIKit 0x317ec73c UIApplicationMain + 1084
8 *** 0x00002d80 0x1000 + 7552
9 *** 0x00002c9c 0x1000 + 7324
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x303673b4 kevent + 24
1 libdispatch.dylib 0x308d2f74 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x308d2c92 _dispatch_mgr_thread + 30
Thread 2 name: WebThread
Thread 2 Crashed:
0 libobjc.A.dylib 0x3785cfbc objc_msgSend + 16
1 CoreFoundation 0x37c5f470 CFRelease + 88
2 CFNetwork 0x33adc9e4 URLResponse::~URLResponse() + 72
3 CoreFoundation 0x37c5f524 CFRelease + 268
4 CFNetwork 0x33b2e278 __CFCachedURLResponse::~__CFCachedURLResponse() + 60
5 CFNetwork 0x33b2e07c _ZL30_CFCachedURLResponseDeallocatePKv + 12
6 CoreFoundation 0x37c5f524 CFRelease + 268
7 CFNetwork 0x33b2e39a __CFURLCacheNode::~__CFURLCacheNode() + 30
8 CFNetwork 0x33b2fba6 __CFURLCache::RemoveResponseFromCacheContainers(__CFURLCacheNode*, _CFCachedURLResponse const*, __CFString const*, bool) + 110
9 CFNetwork 0x33b2fc92 __CFURLCache::RemoveLRUCachedItems(long, __CFURLCacheNode*) + 150
10 CFNetwork 0x33b308ac __CFURLCache::CreateAndStoreCacheNode(__CFURLCacheNode*, _CFCachedURLResponse const*, __CFString const*, _CFURLRequest const*, void const*, bool, bool&) + 92
11 CFNetwork 0x33b30aa4 AddCacheTask(__CFURLCacheNode*) + 280
12 CFNetwork 0x33b32778 CFURLCacheAddCachedResponseForRequest + 136
13 CFNetwork 0x33ade7b2 URLConnectionClient::_clientWillCacheResponse(URLConnectionClient::ClientConnectionEventQueue*) + 478
14 CFNetwork 0x33ad353e URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 418
15 CFNetwork 0x33ad323c URLConnectionClient::processEvents() + 100
16 CFNetwork 0x33ad3172 MultiplexerSource::perform() + 150
17 CoreFoundation 0x37ceaafc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
18 CoreFoundation 0x37cea2c8 __CFRunLoopDoSources0 + 208
19 CoreFoundation 0x37ce906e __CFRunLoopRun + 646
20 CoreFoundation 0x37c6c4d6 CFRunLoopRunSpecific + 294
21 CoreFoundation 0x37c6c39e CFRunLoopRunInMode + 98
22 WebCore 0x32743128 _ZL12RunWebThreadPv + 396
23 libsystem_c.dylib 0x377dac16 _pthread_start + 314
24 libsystem_c.dylib 0x377daad0 thread_start + 0
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x30367010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x30367206 mach_msg + 50
2 CoreFoundation 0x37cea41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x37ce9154 __CFRunLoopRun + 876
4 CoreFoundation 0x37c6c4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x37c6c39e CFRunLoopRunInMode + 98
6 Foundation 0x34fbbbc2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x34fbba8a -[NSThread main] + 66
8 Foundation 0x3504f59a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x377dac16 _pthread_start + 314
10 libsystem_c.dylib 0x377daad0 thread_start + 0
Thread 4 name: com.apple.CFSocket.private
Thread 4:
0 libsystem_kernel.dylib 0x30377570 __select + 20
1 CoreFoundation 0x37cee66a __CFSocketManager + 726
2 libsystem_c.dylib 0x377dac16 _pthread_start + 314
3 libsystem_c.dylib 0x377daad0 thread_start + 0
Thread 5 name: WebCore: CFNetwork Loader
Thread 5:
0 libsystem_kernel.dylib 0x30367010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x30367206 mach_msg + 50
2 CoreFoundation 0x37cea41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x37ce9154 __CFRunLoopRun + 876
4 CoreFoundation 0x37c6c4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x37c6c39e CFRunLoopRunInMode + 98
6 WebCore 0x3276c69e _ZN7WebCoreL15runLoaderThreadEPv + 122
7 libsystem_c.dylib 0x377dac16 _pthread_start + 314
8 libsystem_c.dylib 0x377daad0 thread_start + 0
Thread 6:
0 libsystem_kernel.dylib 0x30377cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x377d530a _pthread_wqthread + 610
2 libsystem_c.dylib 0x377d509c start_wqthread + 0
Thread 2 crashed with ARM Thread State:
r0: 0x0ae93de0 r1: 0x30da109c r2: 0x00000001 r3: 0x00000000
r4: 0x42810000 r5: 0x0ae93de4 r6: 0x3f000000 r7: 0x012e7d68
r8: 0x3f936690 r9: 0x0c368427 r10: 0x0000011c r11: 0x00000080
ip: 0x3f910814 sp: 0x012e7d34 lr: 0x37c5f477 pc: 0x3785cfbc
cpsr: 0x20000030