隨機EXC_BAD_ACCESS我有時會收到關於與NSURLConnection的(我猜它根據崩潰報告是關於NSURLConnection的)一個EXC_BAD_ACCESS崩潰報告。iPhone:與NSURLConnection的
我發現了一個問題在這裏StackOverflow上與同類報告,但沒有任何幫助有:/(NSURLConnection causes bad access crash);我試着用NSZombieEnabled運行應用程序,但由於這個問題是真的「隨機」,我從來沒有設法得到它與NSZombieEnabled運行:/
任何人有提示?
感謝很多:)
這裏有一個repport:
Thread 3 Crashed:
0 libobjc.A.dylib 0x0000286c objc_msgSend + 16
1 CoreFoundation 0x0000325c CFEqual + 92
2 CoreFoundation 0x000b081c __CFBasicHashStandardEquateKeys + 12
3 CoreFoundation 0x000b2578 ___CFBasicHashFindBucket_Linear + 216
4 CoreFoundation 0x00002ff8 CFBasicHashFindBucket + 220
5 CoreFoundation 0x00002ec6 CFDictionaryGetValue + 50
6 CFNetwork 0x0005853a HTTPMessage::copyConstantHeaderFieldValue(unsigned int) const + 26
7 CFNetwork 0x00090024 URLRequest::copyConstantHeaderFieldValue(unsigned int) const + 20
8 CFNetwork 0x0008ce0e HTTPProtocol::getCacheStoragePolicy(__CFHTTPMessage*) + 158
9 CFNetwork 0x0008e6c8 HTTPProtocol::updateForHeader(__CFHTTPMessage*) + 492
10 CFNetwork 0x0008f73c HTTPProtocol::performHeaderRead() + 368
11 CFNetwork 0x0008fbea HTTPProtocol::httpReadStreamEvent(unsigned long) + 110
12 CFNetwork 0x0008fd34 HTTPProtocol::_httpReadStreamCB(__CFReadStream*, unsigned long, void*) + 4
13 CoreFoundation 0x0004985e _signalEventSync + 70
14 CoreFoundation 0x000497f2 _cfstream_shared_signalEventSync + 198
15 CoreFoundation 0x00071a86 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
16 CoreFoundation 0x000736ac __CFRunLoopDoSources0 + 188
17 CoreFoundation 0x00074504 __CFRunLoopRun + 224
18 CoreFoundation 0x0001d8e4 CFRunLoopRunSpecific + 224
19 CoreFoundation 0x0001d7ec CFRunLoopRunInMode + 52
20 Foundation 0x0003b71e +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
21 Foundation 0x0000bc96 -[NSThread main] + 38
22 Foundation 0x000909da __NSThread__main__ + 966
23 libSystem.B.dylib 0x0007a986 _pthread_start + 242
24 libSystem.B.dylib 0x000700e4 thread_start + 0
更新
我終於設法得到的錯誤,而NSZombieEnabled是......但事實並非如此幫助很多:/
以下是回溯:
[Switching to thread 13059]
Program received signal: 「EXC_BAD_ACCESS」.
[Switching to thread 13059]
(gdb) bt
#0 0x3090ce9c in CFDictionaryGetValue()
#1 0x35233540 in HTTPMessage::copyConstantHeaderFieldValue()
#2 0x3526b02a in URLRequest::copyConstantHeaderFieldValue()
#3 0x35267e14 in HTTPProtocol::getCacheStoragePolicy()
#4 0x352693e2 in HTTPProtocol::attemptToCacheMovedPermanently()
#5 0x3526a6c8 in HTTPProtocol::performHeaderRead()
#6 0x3526abf0 in HTTPProtocol::httpReadStreamEvent()
#7 0x3526ad3a in HTTPProtocol::_httpReadStreamCB()
#8 0x30953864 in _signalEventSync()
#9 0x309537f8 in _cfstream_shared_signalEventSync()
#10 0x3097ba8c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__()
#11 0x3097d6b2 in __CFRunLoopDoSources0()
#12 0x3097e50a in __CFRunLoopRun()
#13 0x309278ea in CFRunLoopRunSpecific()
#14 0x309277f2 in CFRunLoopRunInMode()
#15 0x3148b724 in +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]()
#16 0x3145bc9c in -[NSThread main]()
#17 0x314e09e0 in __NSThread__main__()
#18 0x3129298c in _pthread_start()
#19 0x312880ec in thread_start()
(gdb)
真的很難知道我是否看不到您的代碼。在這種情況下,代碼檢查是最好的,可能是唯一的方法 – vodkhang 2010-09-15 12:20:08
使用源,盧克。 – 2010-09-15 12:26:40
嗯,我不能告訴你的代碼,因爲我不知道代碼的哪一部分可能會導致此錯誤:/將不得不提供整個項目的來源。再一次,這是非常隨機的和崩潰的報告沒有那麼有用 – Vivi 2010-09-15 12:45:28