我在我的应用程序中显示地图,但是在抛出异常后,它突然开始与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 :(得分:0)
由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:' * - [__ NSDictionaryM removeObjectForKey:]:key不能为nil'
其说清楚关键不能为零
由于
,您的代码在此方法中很糟糕[__NSDictionaryM removeObjectForKey:]
检查并解决它