iOS 8以奇怪的模式崩溃

iOS 8以奇怪的模式崩溃,ios,objective-c,xcode,ios8,xcode6,Ios,Objective C,Xcode,Ios8,Xcode6,我花了很多时间在一个应用程序上,它在iOS 7上运行得非常好,无论是在设备上还是在模拟器上。当我在iOS 8上运行它时,它在模拟器上运行得非常好。但出于某种原因,当我在iOS 8设备上运行它时,它开始奇怪地崩溃。如果我实施CLLocation,应用程序将在我运行它的前5次平稳运行。然后在我编译了5次之后,它就会崩溃。在这5次之后,它再次开始顺利编译。再过5次之后,它在发射时再次崩溃,并且模式继续。 第一,快跑。2.跑3.跑4.跑5.跑6-10.发射时坠毁,11-15,快跑。16-20碰撞 然而,

我花了很多时间在一个应用程序上,它在iOS 7上运行得非常好,无论是在设备上还是在模拟器上。当我在iOS 8上运行它时,它在模拟器上运行得非常好。但出于某种原因,当我在iOS 8设备上运行它时,它开始奇怪地崩溃。如果我实施CLLocation,应用程序将在我运行它的前5次平稳运行。然后在我编译了5次之后,它就会崩溃。在这5次之后,它再次开始顺利编译。再过5次之后,它在发射时再次崩溃,并且模式继续。 第一,快跑。2.跑3.跑4.跑5.跑6-10.发射时坠毁,11-15,快跑。16-20碰撞

然而,当我删除CLLocation时,应用程序运行平稳,但每第三次启动就会崩溃。即1。跑2.跑3.崩溃4.跑5.运行6。撞车

我已经有好几天没有睡过觉了。谁能给我解释一下原因吗?对于每次启动时的崩溃,控制台输出的唯一错误是NSDictionary unknown selector

如果苹果的评论员碰巧在某个“崩溃时间”运行我的应用程序,我不希望它被拒绝

控制台Bt

(lldb) bt
* thread #3: tid = 0x12646, 0x00000001983640a8 libobjc.A.dylib`objc_exception_throw, queue = 'com.apple.root.default-qos', stop reason = breakpoint 1.1
    frame #0: 0x00000001983640a8 libobjc.A.dylib`objc_exception_throw
    frame #1: 0x0000000187d8d094 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 220
    frame #2: 0x0000000187d89e48 CoreFoundation`___forwarding___ + 928
    frame #3: 0x0000000187c8f08c CoreFoundation`_CF_forwarding_prep_0 + 92
    frame #4: 0x0000000188c4f0dc Foundation`-[NSString getExternalRepresentation:extendedAttributes:forWritingToURLOrPath:usingEncoding:error:] + 192
    frame #5: 0x0000000188c4f23c Foundation`writeStringToURLOrPath + 72
  * frame #6: 0x00000001000c9f1c Blurtalk`+[PFInternalUtils installationId](self=<unavailable>, _cmd=<unavailable>) + 340 at PFInternalUtils.m:307
    frame #7: 0x00000001000f0a94 Blurtalk`+[PFNetworkCommandRunner createRequest:](self=0x000000010027d1b8, _cmd=<unavailable>, command=0x0000000170056a70) + 268 at PFNetworkCommandRunner.m:61
    frame #8: 0x00000001000f1044 Blurtalk`+[PFNetworkCommandRunner runCommandAsync:inOperation:](self=0x000000010027d1b8, _cmd=<unavailable>, command=<unavailable>, operation=<unavailable>) + 196 at PFNetworkCommandRunner.m:132
    frame #9: 0x00000001000f1748 Blurtalk`+[PFRetryingCommandRunner runCommandAsync:inOperation:attemptsMade:delay:](self=<unavailable>, _cmd=<unavailable>, command=<unavailable>, operation=<unavailable>, attemptsMade=1, delay=<unavailable>) + 92 at PFRetryingCommandRunner.m:42
    frame #10: 0x00000001000f16bc Blurtalk`+[PFRetryingCommandRunner runCommandAsync:inOperation:](self=<unavailable>, _cmd=<unavailable>, command=<unavailable>, operation=<unavailable>) + 124 at PFRetryingCommandRunner.m:35
    frame #11: 0x00000001000f1f80 Blurtalk`+[PFCachedCommandRunner runCommandAsync:inOperation:cachePolicy:maxCacheAge:](self=<unavailable>, _cmd=<unavailable>, command=<unavailable>, operation=<unavailable>, cachePolicy=<unavailable>, maxCacheAge=<unavailable>) + 240 at PFCachedCommandRunner.m:82
    frame #12: 0x000000010009dcd8 Blurtalk`__48-[BFTask continueWithExecutor:withSuccessBlock:]_block_invoke(.block_descriptor=0x0000000170241e60, task=<unavailable>) + 200 at BFTask.m:335
    frame #13: 0x000000010009d730 Blurtalk`__41-[BFTask continueWithExecutor:withBlock:]_block_invoke_2(.block_descriptor=0x000000017807a340) + 32 at BFTask.m:287
    frame #14: 0x0000000100338f20 libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #15: 0x0000000100338ee0 libdispatch.dylib`_dispatch_client_callout + 16
    frame #16: 0x00000001003459a0 libdispatch.dylib`_dispatch_root_queue_drain + 1272
    frame #17: 0x0000000100346f18 libdispatch.dylib`_dispatch_worker_thread3 + 132
    frame #18: 0x0000000198b852e4 libsystem_pthread.dylib`_pthread_wqthread + 816
(lldb)bt
*线程#3:tid=0x12646,0x00000001983640a8 libobjc.A.dylib`objc_异常抛出,队列='com.apple.root.default qos',停止原因=断点1.1
帧#0:0x00000001983640a8 libobjc.A.dylib`objc\u异常\u抛出
帧#1:0x0000000187d8d094 CoreFoundation`-[NSObject(NSObject)不识别选择器:][220
帧#2:0x0000000187d89e48 CoreFoundation`__;u转发_;+928
帧#3:0x0000000187c8f08c CoreFoundation`\u CF\u forwarding\u prep\u 0+92
帧#4:0x0000000188c4f0dc Foundation`-[NSString getExternalRepresentation:extendedAttributes:forWritingToURLOrPath:UsingEncode:error:+192
帧#5:0x0000000188c4f23c基础`writeStringToURLOrPath+72
*帧#6:0x00000001000c9f1c Blurtalk`+[PFInternalUtils安装ID](self=,_cmd=)+340位于PFInternalUtils.m:307
帧#7:0x00000001000f0a94 Blurtalk`+[PFNetworkCommandRunner createRequest:(self=0x000000010027d1b8,_cmd=,command=0x0000000170056a70)+268位于PFNetworkCommandRunner处。m:61
帧#8:0x00000001000f1044 Blurtalk`+[PFNetworkCommandRunner runCommandAsync:inOperation:](self=0x000000010027d1b8,_cmd=,command=,operation=)在PFNetworkCommandRunner处+196。m:132
帧#9:0x00000001000f1748 Blurtalk`+[PFRetryingCommandRunner runCommandAsync:inOperation:AttemptsMode:delay:(self=,_cmd=,command=,operation=,AttemptsMode=1,delay=)+92在PFRetryingCommandRunner上。m:42
帧#10:0x00000001000f16bc Blurtalk`+[PFRetryingCommandRunner runCommandAsync:inOperation:](self=,_cmd=,command=,operation=)在PFRetryingCommandRunner处+124。m:35
帧#11:0x00000001000f1f80 Blurtalk`+[PFCachedCommandRunner runCommandAsync:inOperation:cachePolicy:maxCacheAge:](self=,_cmd=,command=,operation=,cachePolicy=,maxCacheAge=)在PFCachedCommandRunner处+240。m:82
帧#12:0x000000010009dcd8 Blurtalk`uu 48-[BFTask continueWithExecutor:withSuccessBlock:][U block_调用(.block_描述符=0x0000000170241e60,task=)+200在BFTask处。m:335
帧#13:0x000000010009d730 Blurtalk`uu 41-[BFTask ContinueWithBlock:][U block_invoke_2(.block_描述符=0x000000017807a340)+32,位于BFTask。m:287
帧#14:0x0000000100338f20 libdispatch.dylib`_dispatch_call_block_和_release+24
帧15:0x0000000100338ee0 libdispatch.dylib`\u dispatch\u client\u callout+16
帧#16:0x00000001003459a0 libdispatch.dylib`_dispatch_root_queue_drain+1272
帧17:0x0000000100346f18 libdispatch.dylib`\u dispatch\u worker\u thread3+132
帧#18:0x0000000198b852e4 libsystem_pthread.dylib`_pthread_wqthread+816

您应该创建一个适用于所有断点的断点,该断点将在任何异常情况下停止,请阅读本文,这是一种非常有用的技术。


顺便说一下,NSDictionary没有长度,您将其与NSString对象混淆似乎犯了一个错误。

我已经能够使用NSZombieEnabled复制并缩小崩溃范围

我的回溯:

2014-12-30 14:58:26.997 Proto[1398:513570] *** -[CFString getExternalRepresentation:extendedAttributes:forWritingToURLOrPath:usingEncoding:error:]: message sent to deallocated instance 0x170e78fc0
(lldb) bt
* thread #7: tid = 0x7d622, 0x00000001864be440 CoreFoundation`___forwarding___ + 968, queue = 'com.apple.root.default-qos', stop reason = EXC_BREAKPOINT (code=1, subcode=0x1864be440)
  * frame #0: 0x00000001864be440 CoreFoundation`___forwarding___ + 968
    frame #1: 0x00000001863c2b6c CoreFoundation`_CF_forwarding_prep_0 + 92
    frame #2: 0x000000018738a83c Foundation`writeStringToURLOrPath + 72
    frame #3: 0x00000001002485bc Proto`+[PFInternalUtils installationId](self=<unavailable>, _cmd=<unavailable>) + 340 at PFInternalUtils.m:308
    frame #4: 0x000000010028a944 Proto`+[PFNetworkCommandRunner createRequest:](self=0x000000010054eea8, _cmd=<unavailable>, command=0x0000000170446990) + 308 at PFNetworkCommandRunner.m:62
    frame #5: 0x000000010028aef4 Proto`+[PFNetworkCommandRunner runCommandAsync:inOperation:](self=0x000000010054eea8, _cmd=<unavailable>, command=<unavailable>, operation=<unavailable>) + 196 at PFNetworkCommandRunner.m:133
    frame #6: 0x000000010028b5fc Proto`+[PFRetryingCommandRunner runCommandAsync:inOperation:attemptsMade:delay:](self=<unavailable>, _cmd=<unavailable>, command=<unavailable>, operation=<unavailable>, attemptsMade=1, delay=<unavailable>) + 92 at PFRetryingCommandRunner.m:42
    frame #7: 0x000000010028b570 Proto`+[PFRetryingCommandRunner runCommandAsync:inOperation:](self=<unavailable>, _cmd=<unavailable>, command=<unavailable>, operation=<unavailable>) + 124 at PFRetryingCommandRunner.m:35
    frame #8: 0x000000010028be40 Proto`+[PFCachedCommandRunner runCommandAsync:inOperation:cachePolicy:maxCacheAge:](self=<unavailable>, _cmd=<unavailable>, command=<unavailable>, operation=<unavailable>, cachePolicy=<unavailable>, maxCacheAge=<unavailable>) + 248 at PFCachedCommandRunner.m:83
    frame #9: 0x00000001001ad038 Proto`__48-[BFTask continueWithExecutor:withSuccessBlock:]_block_invoke(.block_descriptor=0x0000000170446ea0, task=<unavailable>) + 200 at BFTask.m:335
    frame #10: 0x00000001001aca90 Proto`__41-[BFTask continueWithExecutor:withBlock:]_block_invoke_2(.block_descriptor=0x0000000171067b40) + 32 at BFTask.m:287
    frame #11: 0x0000000100ab8e30 libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #12: 0x0000000100ab8df0 libdispatch.dylib`_dispatch_client_callout + 16
    frame #13: 0x0000000100ac59a0 libdispatch.dylib`_dispatch_root_queue_drain + 1280
    frame #14: 0x0000000100ac6f18 libdispatch.dylib`_dispatch_worker_thread3 + 132
    frame #15: 0x00000001974312e4 libsystem_pthread.dylib`_pthread_wqthread + 816
2014-12-30 14:58:26.997 Proto[1398:513570]***-[CFString getExternalRepresentation:extendedAttributes:forWritingToURLOrPath:UsingEncode:error::发送到解除分配实例0x170e78fc0的消息
(lldb)英国电信
*线程#7:tid=0x7d622,0x00000001864be440 CoreFoundation`uuuuuuuuuuuuuuuuuuuuuu+968,队列='com.apple.root.default qos',停止原因=EXC_断点(代码=1,子代码=0x1864be440)
*帧#0:0x00000001864be440 CoreFoundation`\uuuuuuuuuuuuuuuuuuu+968
帧#1:0x00000001863c2b6c核心基础`_CF_转发_准备_0+92
帧#2:0x000000018738a83c基础`writeStringToURLOrPath+72
帧#3:0x00000001002485bc Proto`+[PFInternalUtils installationId](self=,_cmd=)+340位于PFInternalUtils.m:308
帧#4:0x000000010028a944 Proto`+[PFNetworkCommandRunner createRequest:(self=0x000000010054eea8,_cmd=,command=0x0000000170446990)+308位于PFNetworkCommandRunner处。m:62
帧#5:0x000000010028aef4 Proto`+[PFNetworkCommandRunner runCommandAsync:inOperation:](self=0x000000010054eea8,_cmd=,command=,operation=)在PFNetworkCommandRunner处+196。m:133
帧#6:0x000000010028b5fc协议`+[PFRetryingCommandRunner runCommandAsync:inooperation:attemptsMade:delay:(self=,_cmd=,command=,operation=,attemptsMade=1,delay=)+92在PFRetryingCommandRunner上。m:42
帧#7:0x000000010028b570 Proto`+[PFRetryingCommandRunner runCommandAsync:inooperation:](self=,_cmd=,command=,operation=)在PFRetryingCommandRunner处+124。m:35
帧#8:0x000000010028be40协议`+[PFCachedCommandRunner runCommandAsync:inOperation:cachePolicy:maxCacheAge:(在PFCachedCommandRunner处的self=,_cmd=,command=,operation=,cachePolicy=,maxCacheAge=)+248。m:83
帧#9:0x00000001001ad038 Proto`uuu 48-[BFTask continueWithExecutor:withSuccessBlock:][U block_invoke(.block_描述符=0x0000000170446ea0,task=)+200 at BFTask.m:335
框架#