2014-01-17 79 views
-1

我在我的應用程序中顯示地圖,但所有突然開始拋出異常後與iOS 7崩潰。這裏是Xcode日誌,讓我知道如果你想查看代碼,任何幫助將是非常好的。地圖在例外後崩潰應用程序

2014-01-17 07:41:03.310 InSite[6608:552b] ERROR:Uncaught Exception: *** -[__NSDictionaryM  
removeObjectForKey:]: key cannot be nil 
(
0 CoreFoundation      0x041f75e4 __exceptionPreprocess + 180 
1 libobjc.A.dylib      0x00be78b6 objc_exception_throw + 44 
2 CoreFoundation      0x04281835 -[__NSDictionaryM removeObjectForKey:] + 677 
3 InSite        0x001720c5 -[NSURLConnection(GDNET) gdDealloc] + 119 
4 libobjc.A.dylib      0x00bf8692 _ZN11objc_object17sidetable_releaseEb + 268 
5 libobjc.A.dylib      0x00bf9adf -[NSObject release] + 25 
6 Foundation       0x026e13fb __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 88 
7 Foundation       0x02569a6e -[NSURLConnectionInternalConnection invokeForDelegate:] + 119 
8 Foundation       0x025699d6 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 208 
9 Foundation       0x026e154d -[NSURLConnectionInternal _withConnectionAndDelegate:] + 76 
10 Foundation       0x02569d2a -[NSURLConnectionInternal _withConnectionDisconnectFromConnection] + 84 
11 Foundation       0x02569ccc _NSURLConnectionReleaseClient + 33 
12 CFNetwork       0x02cfcce1 _ZN27URLConnectionClient_Classic11setDelegateEPK24CFURLConnectionClient_V1 + 163 
13 CFNetwork       0x02d9664b ___ZN27URLConnectionClient_Classic15invalidateAsyncEP16dispatch_queue_sU13block_pointerFvvE_block_invoke_2 + 37 
14 CFNetwork       0x02d965fd ___ZN27URLConnectionClient_Classic15invalidateAsyncEP16dispatch_queue_sU13block_pointerFvvE_block_invoke + 210 
15 CFNetwork       0x02d93e20 ___ZNK25URLConnectionInstanceData19_withWorkQueueAsyncEPKcU13block_pointerFvvE_block_invoke + 17 
16 CFNetwork       0x02de1170 ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke79 + 31 
17 libdispatch.dylib     0x039fb7f8 _dispatch_call_block_and_release + 15 
18 libdispatch.dylib     0x03a104b0 _dispatch_client_callout + 14 
19 libdispatch.dylib     0x039fe07f _dispatch_queue_drain + 452 
20 libdispatch.dylib     0x039fde7a _dispatch_queue_invoke + 128 
21 libdispatch.dylib     0x039fee1f _dispatch_root_queue_drain + 83 
22 libdispatch.dylib     0x039ff137 _dispatch_worker_thread2 + 39 
23 libsystem_c.dylib     0x03e0de72 _pthread_wqthread + 441 
24 libsystem_c.dylib     0x03df5daa start_wqthread + 30 
) 
2014-01-17 07:41:03.312 InSite[6608:552b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM removeObjectForKey:]: key cannot be nil' 
*** First throw call stack: 
(
0 CoreFoundation      0x041f75e4 __exceptionPreprocess + 180 
1 libobjc.A.dylib      0x00be78b6 objc_exception_throw + 44 
2 CoreFoundation      0x04281835 -[__NSDictionaryM removeObjectForKey:] + 677 
3 InSite        0x001720c5 -[NSURLConnection(GDNET) gdDealloc] + 119 
4 libobjc.A.dylib      0x00bf8692 _ZN11objc_object17sidetable_releaseEb + 268 
5 libobjc.A.dylib      0x00bf9adf -[NSObject release] + 25 
6 Foundation       0x026e13fb __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 88 
7 Foundation       0x02569a6e -[NSURLConnectionInternalConnection invokeForDelegate:] + 119 
8 Foundation       0x025699d6 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 208 
9 Foundation       0x026e154d -[NSURLConnectionInternal _withConnectionAndDelegate:] + 76 
10 Foundation       0x02569d2a -[NSURLConnectionInternal _withConnectionDisconnectFromConnection] + 84 
11 Foundation       0x02569ccc _NSURLConnectionReleaseClient + 33 
12 CFNetwork       0x02cfcce1 _ZN27URLConnectionClient_Classic11setDelegateEPK24CFURLConnectionClient_V1 + 163 
13 CFNetwork       0x02d9664b ___ZN27URLConnectionClient_Classic15invalidateAsyncEP16dispatch_queue_sU13block_pointerFvvE_block_invoke_2 + 37 
14 CFNetwork       0x02d965fd ___ZN27URLConnectionClient_Classic15invalidateAsyncEP16dispatch_queue_sU13block_pointerFvvE_block_invoke + 210 
15 CFNetwork       0x02d93e20 ___ZNK25URLConnectionInstanceData19_withWorkQueueAsyncEPKcU13block_pointerFvvE_block_invoke + 17 
16 CFNetwork       0x02de1170 ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke79 + 31 
17 libdispatch.dylib     0x039fb7f8 _dispatch_call_block_and_release + 15 
18 libdispatch.dylib     0x03a104b0 _dispatch_client_callout + 14 
19 libdispatch.dylib     0x039fe07f _dispatch_queue_drain + 452 
20 libdispatch.dylib     0x039fde7a _dispatch_queue_invoke + 128 
21 libdispatch.dylib     0x039fee1f _dispatch_root_queue_drain + 83 
22 libdispatch.dylib     0x039ff137 _dispatch_worker_thread2 + 39 
23 libsystem_c.dylib     0x03e0de72 _pthread_wqthread + 441 
24 libsystem_c.dylib     0x03df5daa start_wqthread + 30 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
+0

錯誤和堆棧跟蹤非常清晰。在你的'NSURLConnection(GDNET)'類的'gdDealloc'方法中,你在一個可變字典上調用'removeObjectForKey:',但是你傳遞'nil'作爲這個鍵。你不可以通過'無'鑰匙,因此崩潰。 – rmaddy

回答

0

終止應用程序由於未捕獲的異常 'NSInvalidArgumentException',原因是: '* - [__ NSDictionaryM removeObjectForKey:]:鍵不能是零'

它說清楚鍵不能是零

你的代碼是在這個方法中,由於craxhing到

[__NSDictionaryM removeObjectForKey:] 

檢查,並解決它