ios6 – 堆栈跟踪方法名称已编辑

ios6 – 堆栈跟踪方法名称已编辑,第1张

概述当我的应用程序在其设备上崩溃时,我有用户向我发送堆栈跟踪.在iOS 6之前,他们看起来像这样: CRASH: NSInvalidArgumentException (*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil)TRACE: (0 CoreFoundation 0x355 当我的应用程序在其设备上崩溃时,我有用户向我发送堆栈跟踪.在iOS 6之前,他们看起来像这样:
CRASH: NSinvalidargumentexception (*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil)TRACE: (0  CoreFoundation                      0x355e58a7 __exceptionPreprocess + 1861  libobjc.A.dylib                     0x3798c259 objc_exception_throw + 322  CoreFoundation                      0x3553a1d7 -[__NSArrayM insertObject:atIndex:] + 1863  MYAPP                               0x0006c0f7 MYAPP + 1886634  MYAPP                               0x000652a3 MYAPP + 1604195  Foundation                          0x3512ac29 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 166  Foundation                          0x350826d9 -[NSURLConnectionInternalConnection invokeForDelegate:] + 287  Foundation                          0x350826a3 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 1988  Foundation                          0x350825c5 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 609  CFNetwork                           0x34de77f5 _ZN19URLConnectionClIEnt23_clIEntDIDFinishLoadingEPNS_26ClIEntConnectionEventQueueE + 19210  CFNetwork                          0x34ddc4a5 _ZN19URLConnectionClIEnt26ClIEntConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClIEntEvent18XClIEntEventParamsEl + 42411  CFNetwork                          0x34ddc1a3 _ZN19URLConnectionClIEnt13processEventsEv + 10612  CFNetwork                          0x34ddc0d9 _ZN17MultiplexerSource7performEv + 15613  CoreFoundation                     0x355b9ad3 __CFRUNLOOP_IS_CALliNG_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 1414  CoreFoundation                     0x355b929f __CFRunLoopDoSources0 + 21415  CoreFoundation                     0x355b8045 __CFRunLoopRun + 65216  CoreFoundation                     0x3553b4a5 CFRunLoopRunspecific + 30017  CoreFoundation                     0x3553b36d CFRunLoopRunInMode + 10418  GraphiCSServices                   0x371d7439 GSEventRunModal + 13619  UIKit                              0x33047cd5 UIApplicationMain + 108020  MYAPP                              0x0003fbcf MYAPP + 711921  MYAPP                              0x0003fb84 MYAPP + 7044)

从CoreFoundation等方法名称,并询问用户发生了什么,我可以得到一个很好的想法,在哪里崩溃发生.

但是,由于iOS 6已经发布,我的崩溃报告如下所示:

CRASH: NSRangeException (*** -[__NSArrayI objectAtIndex:]: index 2147483670 beyond bounds [0 .. 11])TRACE: (0  CoreFoundation                     0x3a3872bb <redacted> + 1861  libobjc.A.dylib                    0x32ca697f objc_exception_throw + 302  CoreFoundation                     0x3a2d1e8d <redacted> + 1643  MYAPP                              0x000ff721 MYAPP + 2148174  MYAPP                              0x000e8999 MYAPP + 1212415  UIKit                              0x372f60ad <redacted> + 726  UIKit                              0x372f605f <redacted> + 307  UIKit                              0x372f603d <redacted> + 448  UIKit                              0x372f58f3 <redacted> + 5029  UIKit                              0x372e1287 <redacted> + 52610  UIKit                             0x37373f3d <redacted> + 74811  UIKit                             0x3721e52b <redacted> + 31812  UIKit                             0x3720b809 <redacted> + 38013  UIKit                             0x3720b123 <redacted> + 615414  GraphiCSServices                  0x362085a3 <redacted> + 59015  GraphiCSServices                  0x362081d3 <redacted> + 3416  CoreFoundation                    0x3a35c173 <redacted> + 3417  CoreFoundation                    0x3a35c117 <redacted> + 13818  CoreFoundation                    0x3a35af99 <redacted> + 138419  CoreFoundation                    0x3a2cdebd CFRunLoopRunspecific + 35620  CoreFoundation                    0x3a2cdd49 CFRunLoopRunInMode + 10421  GraphiCSServices                  0x362072eb GSEventRunModal + 7422  UIKit                             0x3725f301 UIApplicationMain + 112023  MYAPP                             0x000ccbd3 MYAPP + 712324  MYAPP                             0x000ccb88 MYAPP + 7048)

我从这里获取堆栈跟踪,当应用程序重新打开时,用户被提示通过电子邮件发送:

voID uncaughtExceptionHandler(NSException *exception) {    //make a file name to write the data to using the documents directory:    Nsstring *filename = [Nsstring stringWithFormat:@"%@/crashlog.txt",documentsDirectory];    //create content - four lines of text    Nsstring *content = [Nsstring stringWithFormat:@"CRASH: %@ (%@)\n\nTRACE: %@",[exception name],[exception reason],[exception callStackSymbols]];    //save content to the documents directory    [content writetofile:filename atomically:NO enCoding:nsstringencodingConversionAllowLossy error:nil];}

没有方法名称,这比无用的更糟.有没有办法让这些方法名回到我的堆栈跟踪?这是一个发布配置,而不是调试.

编辑:

我按照this answer的指示.

我从.xcarchive包中提取.app和.dSYM文件,并运行atos -arch armv7 -o’MyApp.app’/’MyApp’

但是,我还没有从atos获取方法名称.

解决方法 偶尔有安装iOS 6 beta吗?我遇到了同样的问题.

这个question帮我了

总结

以上是内存溢出为你收集整理的ios6 – 堆栈跟踪方法名称已编辑全部内容,希望文章能够帮你解决ios6 – 堆栈跟踪方法名称已编辑所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1108855.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存