本文介绍了iPhone:如何查找不常见的设备崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的源代码项目很少发生崩溃.尽管我已经尝试了很多次,但是我无法找到确切的可重复步骤.在设备上执行dubug期间,很难复制它,因为它发生在某个地方,有时甚至发生.在iPhone Xcode开发中,是否有任何日志在打印时导致设备崩溃(或其他任何工具/方式)以找出可能发生的确切位置?

I am getting infrequent crashes from my source code project. I couldn't find out the exact reproducible steps though i have tried to reproduce so many times. During dubug on the device is becoming very hard to reproduce it, because it happens somewhere and sometimes. Is there any logs printing while crashing the device (or) any other tools/way to find out exactly where could it happen, in iPhone Xcode development?

感谢并感谢您的帮助.

这是我的应用最新崩溃:有人可以找到任何原因吗?

Here is my app latest crash: Can someone find any reason?

事件标识符:96E3C178-967C-4054-8470-A8628D77EDE1CrashReporter密钥:0e061dbe05ca13005016137051a2c0ef819425e9流程:myapplication [4472]路径:/var/mobile/Applications/A8483A85-E5A5-46CF-B9B8-4D99F5C951F9/myapplication.app/myapplication标识符:myapplication版本: ???(???)代码类型:ARM(本机)父流程:已启动[1]

Incident Identifier: 96E3C178-967C-4054-8470-A8628D77EDE1CrashReporter Key: 0e061dbe05ca13005016137051a2c0ef819425e9Process: myapplication [4472]Path: /var/mobile/Applications/A8483A85-E5A5-46CF-B9B8-4D99F5C951F9/myapplication.app/myapplicationIdentifier: myapplicationVersion: ??? (???)Code Type: ARM (Native)Parent Process: launchd [1]

日期/时间:2009-11-17 17:27:49.366 +0530作业系统版本:iPhone OS 3.0(7A341)报告版本:104

Date/Time: 2009-11-17 17:27:49.366 +0530OS Version: iPhone OS 3.0 (7A341)Report Version: 104

异常类型:00000020异常代码:0x8badf00d突出显示的线程:0

Exception Type: 00000020Exception Codes: 0x8badf00dHighlighted Thread: 0

特定于应用程序的信息:com.mycompany.my应用程序无法及时启动经过的总CPU时间(秒):3.630(用户1.430,系统2.200),CPU占18%应用程序经过的CPU时间(秒):1.050,5%CPU

Application Specific Information:com.mycompany.myapplication failed to launch in time elapsed total CPU time (seconds): 3.630 (user 1.430, system 2.200), 18% CPU elapsed application CPU time (seconds): 1.050, 5% CPU

线程0:0 libSystem.B.dylib 0x31d47158 mach_msg_trap + 201个libSystem.B.dylib 0x31d49ed8 mach_msg + 602 CoreFoundation 0x3025454e CFRunLoopRunSpecific + 9823 CoreFoundation 0x30254164 CFRunLoopRunInMode + 444 UIKit 0x308f034c-[UIApplication _run] + 5125 UIKit 0x308eea8c UIApplicationMain + 9606 myapplication 0x00002090主要(main.m:14)7 myapplication 0x0000202c开始+ 44

Thread 0:0 libSystem.B.dylib 0x31d47158 mach_msg_trap + 201 libSystem.B.dylib 0x31d49ed8 mach_msg + 602 CoreFoundation 0x3025454e CFRunLoopRunSpecific + 9823 CoreFoundation 0x30254164 CFRunLoopRunInMode + 444 UIKit 0x308f034c -[UIApplication _run] + 5125 UIKit 0x308eea8c UIApplicationMain + 9606 myapplication 0x00002090 main (main.m:14)7 myapplication 0x0000202c start + 44

线程1:0 libSystem.B.dylib 0x31d47158 mach_msg_trap + 201个libSystem.B.dylib 0x31d49ed8 mach_msg + 602 CoreFoundation 0x3025454e CFRunLoopRunSpecific + 9823 CoreFoundation 0x30254164 CFRunLoopRunInMode + 444 WebCore 0x3588dbc8 __ZL12RunWebThreadPv + 4125 libSystem.B.dylib 0x31d705a0 _pthread_body + 20

Thread 1:0 libSystem.B.dylib 0x31d47158 mach_msg_trap + 201 libSystem.B.dylib 0x31d49ed8 mach_msg + 602 CoreFoundation 0x3025454e CFRunLoopRunSpecific + 9823 CoreFoundation 0x30254164 CFRunLoopRunInMode + 444 WebCore 0x3588dbc8 __ZL12RunWebThreadPv + 4125 libSystem.B.dylib 0x31d705a0 _pthread_body + 20

未知线程崩溃,具有未知味道:5,状态计数:1

Unknown thread crashed with unknown flavor: 5, state_count: 1

二进制图像:0x1000-0xbfff + myapplication armv6/var/mobile/Applications/A8483A85-E5A5-46CF-B9B8-4D99F5C951F9/myapplication.app/myapplication0x1f000-0x22fff + MobileSubstrate.dylib armv6/库/MobileSubstrate/MobileSubstrate.dylib0x4d000-0x4efff dns.so armv6< 7943354b648b9518f46a835d5359e45a>/usr/lib/info/dns.so0x51000-0x51fff + SimulatedKeyEvents.dylib手臂/Library/MobileSubstrate/DynamicLibraries/SimulatedKeyEvents.dylib0x2fe00000-0x2fe26fff dyld armv6< 384bf84ebe2b822c3cb75fce3e8647d6>/usr/lib/dyld0x30000000-0x30008fff libgcc_s.1.dylib armv6/usr/lib/libgcc_s.1.dylib0x3000c000-0x3015bfff libobjc.A.dylib armv6< 92636cf8b8e8f3c10721667c48ca182b>/usr/lib/libobjc.A.dylib0x301ca000-0x301d8fff libz.1.dylib armv6/usr/lib/libz.1.dylib0x301fd000-0x302a8fff CoreFoundation armv6< 3e02f5628a56bce4c9eb1c5e49c863d4>/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation0x30501000-0x305f5fff Foundation armv6/System/Library/Frameworks/Foundation.framework/Foundation0x3071d000-0x30729fff CoreVideo armv6< 5404da375ad190f3e1404e5e8a70f764>/System/Library/PrivateFrameworks/CoreVideo.framework/CoreVideo0x3073a000-0x30760fff AppSupport armv6< 1baa1e22eb94eb405d724a2f6b219f53>/System/Library/PrivateFrameworks/AppSupport.framework/AppSupport0x30778000-0x3077dfff liblockdown.dylib armv6/usr/lib/liblockdown.dylib0x308ed000-0x31521fff UIKit armv6< 73cf70d65e1afef2a6ae94fb81bf2fe4>/System/Library/Frameworks/UIKit.framework/UIKit0x31885000-0x318d1fff IOKit armv6< 56ba629c062ac21a045914430412c5f4>/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit0x318e9000-0x31aa2fff CoreGraphics armv6< 80bccae4ab17a49f7fc3a66bb2def894>/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics0x31af1000-0x31b58fff CFNetwork armv6< 863076d9b768c76272e3f0f686ca355d>/System/Library/Frameworks/CFNetwork.framework/CFNetwork0x31bb2000-0x31bc8fff OpenGLES armv6< 2c30348868df45d3b8e0e398e0e4f727>/System/Library/Frameworks/OpenGLES.framework/OpenGLES0x31bcf000-0x31cccfff JavaScriptCore armv6< 619918c7282aa5b53ac3ad32c320b7a5>/System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore0x31d46000-0x31e69fff libSystem.B.dylib armv6/usr/lib/libSystem.B.dylib0x31ea9000-0x31feffff AudioToolbox armv6/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox0x32041000-0x3204bfff GraphicsServices armv6< 99b0baa68c257ca5d2fed21bd409ea20>/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices0x3209b000-0x320cefff安全性armv6< 34c21a865d91e9a13477e9395c516f8c>/System/Library/Frameworks/Security.framework/Security0x320e8000-0x32194fff ImageIO armv6< 44921d26b2b796c2c707c87c68026b16>/System/Library/PrivateFrameworks/ImageIO.framework/ImageIO0x32369000-0x3239cfff SystemConfiguration armv6/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration0x324c6000-0x32521fff CoreAudio armv6/系统/库/框架/CoreAudio.framework/CoreAudio0x325b2000-0x325cefff地址簿armv6< 3023a336aec321324b5a310ee66687f1>/System/Library/Frameworks/AddressBook.framework/AddressBook0x3291c000-0x329c4fff QuartzCore armv6< 1cf2a12e661e1a49f90553b013283b29>/System/Library/Frameworks/QuartzCore.framework/QuartzCore0x32a16000-0x32a16fff CoreSurface armv6< 2c60135f696b1a787443c4a68e1aced2>/System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface0x32a1b000-0x32a1cfff IOMobileFramebuffer armv6< 05aa0565d0f6813003dc5dc175af6048>/System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer0x32e0c000-0x32f0dfff libicucore.A.dylib armv6< 3f78cbbe6b5b7d3b4c5753627fcebdee>/usr/lib/libicucore.A.dylib0x3311e000-0x33213fff libxml2.2.dylib armv6< 3398aecf5ef07d7bbe6673fc9ab570fb>/usr/lib/libxml2.2.dylib0x332c9000-0x33372fff WebKit armv6/System/Library/PrivateFrameworks/WebKit.framework/WebKit0x3415c000-0x34165fff SpringBoardServices armv6< 4997adf422af4a9eecf25aa9bcaf8fc9>/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices0x347f5000-0x34812fff libresolv.9.dylib armv6< 7e34a4dd5c5b0400d10b01e998d5b2de>/usr/lib/libresolv.9.dylib0x34c0e000-0x34c14fff MBX2D armv6< 6815ceba8853af0095f160b6d3c88937>/System/Library/PrivateFrameworks/MBX2D.framework/MBX2D0x3553e000-0x3557bfff CoreText armv6/System/Library/PrivateFrameworks/CoreText.framework/CoreText0x355c8000-0x355ccfff IOSurface armv6/系统/库/PrivateFrameworks/IOSurface.framework/IOSurface0x3580b000-0x35f5afff WebCore armv6< 98f065e46e4c230bf091abaf6da60c16>/System/Library/PrivateFrameworks/WebCore.framework/WebCore0x36422000-0x3647cfff libsqlite3.dylib armv6< 456f75f502443d281147f36f6ed4c3d3>/usr/lib/libsqlite3.dylib0x3648a000-0x36493fff libkxld.dylib armv6< 2528ee7a4fd041090850f1845c393b84>/usr/lib/system/libkxld.dylib0x36496000-0x364a6fff libbsm.0.dylib armv6< 44ee6b2c59cd5aa70d59f7d0d0d3b0b2>/usr/lib/libbsm.0.dylib0x37124000-0x3712efff MobileCoreServices armv6< 9adf227705e932c47e703f73ca1d87c2>/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices0x3748a000-0x374f3fff libstdc ++.6.dylib armv6< 44d54be7409eedbf35157cc538ea660b>/usr/lib/libstdc++.6.dylib0x37c74000-0x37c74fff加速armv6/System/Library/PrivateFrameworks/Accelerate.framework/Accelerate0x37cc8000-0x37d0bfff libvDSP.dylib armv6< 5632d3e7799c5c90540157938bce4b95>/System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib0x37d12000-0x37d12fff vecLib armv6/System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib

Binary Images: 0x1000 - 0xbfff +myapplication armv6 /var/mobile/Applications/A8483A85-E5A5-46CF-B9B8-4D99F5C951F9/myapplication.app/myapplication 0x1f000 - 0x22fff +MobileSubstrate.dylib armv6 /Library/MobileSubstrate/MobileSubstrate.dylib 0x4d000 - 0x4efff dns.so armv6 <7943354b648b9518f46a835d5359e45a> /usr/lib/info/dns.so 0x51000 - 0x51fff +SimulatedKeyEvents.dylib arm /Library/MobileSubstrate/DynamicLibraries/SimulatedKeyEvents.dylib0x2fe00000 - 0x2fe26fff dyld armv6 <384bf84ebe2b822c3cb75fce3e8647d6> /usr/lib/dyld0x30000000 - 0x30008fff libgcc_s.1.dylib armv6 /usr/lib/libgcc_s.1.dylib0x3000c000 - 0x3015bfff libobjc.A.dylib armv6 <92636cf8b8e8f3c10721667c48ca182b> /usr/lib/libobjc.A.dylib0x301ca000 - 0x301d8fff libz.1.dylib armv6 /usr/lib/libz.1.dylib0x301fd000 - 0x302a8fff CoreFoundation armv6 <3e02f5628a56bce4c9eb1c5e49c863d4> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation0x30501000 - 0x305f5fff Foundation armv6 /System/Library/Frameworks/Foundation.framework/Foundation0x3071d000 - 0x30729fff CoreVideo armv6 <5404da375ad190f3e1404e5e8a70f764> /System/Library/PrivateFrameworks/CoreVideo.framework/CoreVideo0x3073a000 - 0x30760fff AppSupport armv6 <1baa1e22eb94eb405d724a2f6b219f53> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport0x30778000 - 0x3077dfff liblockdown.dylib armv6 /usr/lib/liblockdown.dylib0x308ed000 - 0x31521fff UIKit armv6 <73cf70d65e1afef2a6ae94fb81bf2fe4> /System/Library/Frameworks/UIKit.framework/UIKit0x31885000 - 0x318d1fff IOKit armv6 <56ba629c062ac21a045914430412c5f4> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit0x318e9000 - 0x31aa2fff CoreGraphics armv6 <80bccae4ab17a49f7fc3a66bb2def894> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics0x31af1000 - 0x31b58fff CFNetwork armv6 <863076d9b768c76272e3f0f686ca355d> /System/Library/Frameworks/CFNetwork.framework/CFNetwork0x31bb2000 - 0x31bc8fff OpenGLES armv6 <2c30348868df45d3b8e0e398e0e4f727> /System/Library/Frameworks/OpenGLES.framework/OpenGLES0x31bcf000 - 0x31cccfff JavaScriptCore armv6 <619918c7282aa5b53ac3ad32c320b7a5> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore0x31d46000 - 0x31e69fff libSystem.B.dylib armv6 /usr/lib/libSystem.B.dylib0x31ea9000 - 0x31feffff AudioToolbox armv6 /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox0x32041000 - 0x3204bfff GraphicsServices armv6 <99b0baa68c257ca5d2fed21bd409ea20> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices0x3209b000 - 0x320cefff Security armv6 <34c21a865d91e9a13477e9395c516f8c> /System/Library/Frameworks/Security.framework/Security0x320e8000 - 0x32194fff ImageIO armv6 <44921d26b2b796c2c707c87c68026b16> /System/Library/PrivateFrameworks/ImageIO.framework/ImageIO0x32369000 - 0x3239cfff SystemConfiguration armv6 /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration0x324c6000 - 0x32521fff CoreAudio armv6 /System/Library/Frameworks/CoreAudio.framework/CoreAudio0x325b2000 - 0x325cefff AddressBook armv6 <3023a336aec321324b5a310ee66687f1> /System/Library/Frameworks/AddressBook.framework/AddressBook0x3291c000 - 0x329c4fff QuartzCore armv6 <1cf2a12e661e1a49f90553b013283b29> /System/Library/Frameworks/QuartzCore.framework/QuartzCore0x32a16000 - 0x32a16fff CoreSurface armv6 <2c60135f696b1a787443c4a68e1aced2> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface0x32a1b000 - 0x32a1cfff IOMobileFramebuffer armv6 <05aa0565d0f6813003dc5dc175af6048> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer0x32e0c000 - 0x32f0dfff libicucore.A.dylib armv6 <3f78cbbe6b5b7d3b4c5753627fcebdee> /usr/lib/libicucore.A.dylib0x3311e000 - 0x33213fff libxml2.2.dylib armv6 <3398aecf5ef07d7bbe6673fc9ab570fb> /usr/lib/libxml2.2.dylib0x332c9000 - 0x33372fff WebKit armv6 /System/Library/PrivateFrameworks/WebKit.framework/WebKit0x3415c000 - 0x34165fff SpringBoardServices armv6 <4997adf422af4a9eecf25aa9bcaf8fc9> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices0x347f5000 - 0x34812fff libresolv.9.dylib armv6 <7e34a4dd5c5b0400d10b01e998d5b2de> /usr/lib/libresolv.9.dylib0x34c0e000 - 0x34c14fff MBX2D armv6 <6815ceba8853af0095f160b6d3c88937> /System/Library/PrivateFrameworks/MBX2D.framework/MBX2D0x3553e000 - 0x3557bfff CoreText armv6 /System/Library/PrivateFrameworks/CoreText.framework/CoreText0x355c8000 - 0x355ccfff IOSurface armv6 /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface0x3580b000 - 0x35f5afff WebCore armv6 <98f065e46e4c230bf091abaf6da60c16> /System/Library/PrivateFrameworks/WebCore.framework/WebCore0x36422000 - 0x3647cfff libsqlite3.dylib armv6 <456f75f502443d281147f36f6ed4c3d3> /usr/lib/libsqlite3.dylib0x3648a000 - 0x36493fff libkxld.dylib armv6 <2528ee7a4fd041090850f1845c393b84> /usr/lib/system/libkxld.dylib0x36496000 - 0x364a6fff libbsm.0.dylib armv6 <44ee6b2c59cd5aa70d59f7d0d0d3b0b2> /usr/lib/libbsm.0.dylib0x37124000 - 0x3712efff MobileCoreServices armv6 <9adf227705e932c47e703f73ca1d87c2> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices0x3748a000 - 0x374f3fff libstdc++.6.dylib armv6 <44d54be7409eedbf35157cc538ea660b> /usr/lib/libstdc++.6.dylib0x37c74000 - 0x37c74fff Accelerate armv6 /System/Library/PrivateFrameworks/Accelerate.framework/Accelerate0x37cc8000 - 0x37d0bfff libvDSP.dylib armv6 <5632d3e7799c5c90540157938bce4b95> /System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib0x37d12000 - 0x37d12fff vecLib armv6 /System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib

推荐答案

您应该能够获得崩溃日志.

在崩溃日志中,您将具有堆栈跟踪该应用程序崩溃了.

In the crash log, you'll have a stack trace of what was happening when the application crashed.

在堆栈跟踪中浏览您所做的最后一件事.跟踪中的最后一件事可能是在您调用的框架方法内,因此将调用追溯到您的代码并将其用作起点.

Look through the stack trace for the last thing you were doing. The last thing in the trace will likely be within a framework method that you call, so trace the call back to your code and use that as the starting point.

一旦您知道崩溃在代码中的何处发生,请尝试考虑可能导致崩溃的原因.如果您在查看可能导致崩溃的原因时遇到问题,请在此处发布导致崩溃的行(以及环绕代码),我们可能会对导致崩溃的原因有一些了解.

Once you know where in your code the crash occurred, try to think of what might have caused the crash. If you're having trouble seeing what might have caused the crash, post the line that lead to the crash (along with the surround code) here and we might have some insight as to what caused it.

如果您还在寻找Xcode必须提供的调试资源,请阅读 Xcode调试指南.

If you're also looking for resources on what Xcode has to offer to debug, have a read of the Xcode Debugging Guide.

这篇关于iPhone:如何查找不常见的设备崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 20:10