[英]iPhone app crash logs — How can I use them to debug my app?
I'm not an expert in programming in general. 我一般不是编程专家。 I can find my way around Objective-C and Xcode and build working apps with no huge problems but when BUGs arise I'm often lost as to where to begin.
我可以在Objective-C和Xcode周围找到自己的方式,并构建没有大问题的可运行应用程序,但是当出现BUG时,我通常会迷失从哪里开始。
My app works fine on the sim but more often-than-is-comfortable it crashes on the device. 我的应用程序在SIM卡上运行正常,但比正常情况下崩溃的原因是它在设备上崩溃了。 I looked at the crash log to see if there was any clue to start from, but, the stuff is way over my head.
我查看了崩溃日志,以查看是否有任何线索可以开始,但是这些东西已经超出了我的脑海。 How can I start making use of THIS and future crash logs in debugging?
如何在调试中开始使用THIS和将来的崩溃日志? (crash log below)
(下面的崩溃日志)
Incident Identifier: D7E575E3-8447C2B30BD4
CrashReporter Key: 8b86c9231c06465f682da95e93b4542
Process: ETFanClub [176]
Path: /var/mobile/Applications/A9FA8-8E24E292AC9/ETFanClub.app/ETFanClub
Identifier: ETFanClub
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2010-02-07 12:11:10.813 +0900
OS Version: iPhone OS 3.1.3 (7E18)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 Crashed:
0 libSystem.B.dylib 0x33b3db2c 0x33aad000 + 592684
1 libSystem.B.dylib 0x33b3db1a 0x33aad000 + 592666
2 libSystem.B.dylib 0x33b3db0e 0x33aad000 + 592654
3 libSystem.B.dylib 0x33b54e34 0x33aad000 + 687668
4 libstdc++.6.dylib 0x33c5c390 0x33bf6000 + 418704
5 libobjc.A.dylib 0x31391898 0x31389000 + 34968
6 libstdc++.6.dylib 0x33c59a84 0x33bf6000 + 408196
7 libstdc++.6.dylib 0x33c59afc 0x33bf6000 + 408316
8 libstdc++.6.dylib 0x33c59c24 0x33bf6000 + 408612
9 libobjc.A.dylib 0x3138fe54 0x31389000 + 28244
10 CoreFoundation 0x32433bf6 0x3239e000 + 613366
11 CoreFoundation 0x323b8b12 0x3239e000 + 109330
12 CoreFoundation 0x323af838 0x3239e000 + 71736
13 ETFanClub 0x00012648 0x1000 + 71240
14 Foundation 0x3370fe76 0x336de000 + 204406
15 Foundation 0x3370fdb4 0x336de000 + 204212
16 CFNetwork 0x308d6276 0x30882000 + 344694
17 CFNetwork 0x3088ca38 0x30882000 + 43576
18 CFNetwork 0x3088c8c8 0x30882000 + 43208
19 CFNetwork 0x3088c872 0x30882000 + 43122
20 CFNetwork 0x3088c7f2 0x30882000 + 42994
21 CFNetwork 0x3088c792 0x30882000 + 42898
22 CoreFoundation 0x323f53a0 0x3239e000 + 357280
23 CoreFoundation 0x323f4c18 0x3239e000 + 355352
24 GraphicsServices 0x335051c0 0x33501000 + 16832
25 UIKit 0x324a6c28 0x324a3000 + 15400
26 UIKit 0x324a5228 0x324a3000 + 8744
27 ETFanClub 0x00002df6 0x1000 + 7670
28 ETFanClub 0x00002d8c 0x1000 + 7564
Thread 1:
0 libSystem.B.dylib 0x33aae488 0x33aad000 + 5256
1 libSystem.B.dylib 0x33ab1064 0x33aad000 + 16484
2 CoreFoundation 0x323f5002 0x3239e000 + 356354
3 CoreFoundation 0x323f4c18 0x3239e000 + 355352
4 WebCore 0x3018c1d4 0x30108000 + 541140
5 libSystem.B.dylib 0x33ad8780 0x33aad000 + 178048
Thread 2:
0 libSystem.B.dylib 0x33aae488 0x33aad000 + 5256
1 libSystem.B.dylib 0x33ab1064 0x33aad000 + 16484
2 CoreFoundation 0x323f5002 0x3239e000 + 356354
3 CoreFoundation 0x323f4c18 0x3239e000 + 355352
4 Foundation 0x33738998 0x336de000 + 371096
5 Foundation 0x33731ac6 0x336de000 + 342726
6 Foundation 0x336dfd0e 0x336de000 + 7438
7 libSystem.B.dylib 0x33ad8780 0x33aad000 + 178048
Thread 3:
0 libSystem.B.dylib 0x33ad32c0 0x33aad000 + 156352
1 CoreFoundation 0x323be7e2 0x3239e000 + 133090
2 libSystem.B.dylib 0x33ad8780 0x33aad000 + 178048
Thread 4:
0 libSystem.B.dylib 0x33b3e6f0 0x33aad000 + 595696
1 libSystem.B.dylib 0x33ae04a8 0x33aad000 + 210088
2 libSystem.B.dylib 0x33adfc6c 0x33aad000 + 207980
3 JavaScriptCore 0x332c21c4 0x332bb000 + 29124
4 WebCore 0x306c80dc 0x30108000 + 6029532
5 libSystem.B.dylib 0x33ad8780 0x33aad000 + 178048
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x384e83cc
r4: 0x00000006 r5: 0x05f0e63c r6: 0x2ffff0b8 r7: 0x2ffff0c8
r8: 0x383855c4 r9: 0x0000000a r10: 0x000181c0 r11: 0x00000000
ip: 0x00000025 sp: 0x2ffff0c8 lr: 0x33b3db21 pc: 0x33b3db2c
cpsr: 0x000f0010
Binary Images:
0x1000 - 0x1cfff +ETFanClub armv6 <a5a4adec19f32b2a6b24066a3282be75> /var/mobile/Applications/BD8A9FA8-0D00-4B40-8339-E8E24E292AC9/ETFanClub.app/ETFanClub
0x89000 - 0x8afff dns.so armv6 <957f94410f77a351749ac39d2b4b4abe> /usr/lib/info/dns.so
0x2fe00000 - 0x2fe26fff dyld armv6 <544395a4b5546114b878d5131a84fd7f> /usr/lib/dyld
0x30005000 - 0x3000ffff DataDetectorsUI armv6 <f84ebef0dfbdd719da4b52b5732e895f> /System/Library/PrivateFrameworks/DataDetectorsUI.framework/DataDetectorsUI
0x30010000 - 0x30104fff libiconv.2.dylib armv6 <f3c5cdf74fe386e4169664a48028bb85> /usr/lib/libiconv.2.dylib
0x30108000 - 0x3085bfff WebCore armv6 <65181be01889192c1252e2535531c99c> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x3087d000 - 0x30881fff IOSurface armv6 <f19a15d8311b851caeba68c1fef33e11> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x30882000 - 0x308effff CFNetwork armv6 <58e56341b7a2a491c727a385b871f7b8> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x308f0000 - 0x3092efff CoreText armv6 <fe5639949094efc4d973a1f6457a4e5c> /System/Library/PrivateFrameworks/CoreText.framework/CoreText
0x3092f000 - 0x309dcfff ImageIO armv6 <572f72dbfb19a2fd37666bb1d58b13cb> /System/Library/PrivateFrameworks/ImageIO.framework/ImageIO
0x309f9000 - 0x30a03fff libkxld.dylib armv6 <33215da7e582cbc93ad25bf1cdb8ea62> /usr/lib/system/libkxld.dylib
0x30a05000 - 0x30a40fff CoreTelephony armv6 <98b8ac66b4615a56958655929505c985> /System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephony
0x30a66000 - 0x30a76fff libbsm.0.dylib armv6 <722065615a92c5d0c57395f0aa624b8d> /usr/lib/libbsm.0.dylib
0x30e1a000 - 0x30e20fff MBX2D armv6 <5246c74334f4daf6c0b876605134baa1> /System/Library/PrivateFrameworks/MBX2D.framework/MBX2D
0x30f72000 - 0x31073fff libicucore.A.dylib armv6 <a99c2e5d034344c7447a7420db2b36b1> /usr/lib/libicucore.A.dylib
0x3107e000 - 0x3109cfff libresolv.9.dylib armv6 <c25b840bd418c833ab6c31a29389445a> /usr/lib/libresolv.9.dylib
0x3110c000 - 0x3110dfff IOMobileFramebuffer armv6 <89abbd5846018f4b74250e8cb09eaf4c> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x3110e000 - 0x311bbfff WebKit armv6 <2bf8152a62e6cbc8a219d80489acb0e7> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x311bd000 - 0x31267fff QuartzCore armv6 <5cab4e700e90abef71c1b2b695bd897a> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x31389000 - 0x3142cfff libobjc.A.dylib armv6 <54f0ebeeb9747bf5075f93e2a5043b5e> /usr/lib/libobjc.A.dylib
0x3142f000 - 0x31463fff Security armv6 <fb2124d1711c8931a7df711d126193d0> /System/Library/Frameworks/Security.framework/Security
0x31464000 - 0x314b1fff IOKit armv6 <521cb10d7c6fb9ce21936db07a2587bb> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x314b8000 - 0x314f5fff libCGFreetype.A.dylib armv6 <b299c486f638e82d10939b7c496b7d78> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib
0x316c0000 - 0x316c8fff AVFoundation armv6 <9626256280a896e5a1101dc0b8cb21ac> /System/Library/Frameworks/AVFoundation.framework/AVFoundation
0x318d5000 - 0x318f3fff AddressBook armv6 <80bdcada8d61624b2bb0796b7155f570> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x318f4000 - 0x3192efff libvDSP.dylib armv6 <cf9cc6079374718dce29cba9de48b993> /System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x31e7f000 - 0x31e95fff libJapaneseConverter.dylib armv6 <10a062c64d5827c6e0f0486fc210c889> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib
0x31fb6000 - 0x31fddfff AppSupport armv6 <db69446acd77981f1d9c968846e4c868> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x32020000 - 0x32027fff WebUI armv6 <bb2e1be75e3a51511bf16d54af1fa774> /System/Library/PrivateFrameworks/WebUI.framework/WebUI
0x32028000 - 0x32052fff MobileQuickLook armv6 <accf1f4b9ad21f4873767c8556f6b48b> /System/Library/PrivateFrameworks/MobileQuickLook.framework/MobileQuickLook
0x3209f000 - 0x320a5fff liblockdown.dylib armv6 <f18aa1ca3cc98cda954fd821ff88a3ac> /usr/lib/liblockdown.dylib
0x320c7000 - 0x320eafff libRIP.A.dylib armv6 <a53df8fe2c05c16f671e2502d0d21f60> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib
0x320eb000 - 0x320ebfff vecLib armv6 <c8a08b45effd5eb35a476a969628e52d> /System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x322e7000 - 0x3231bfff SystemConfiguration armv6 <4b1e9c323f8c973bac2737cdccec8de3> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x3234d000 - 0x32364fff OpenGLES armv6 <8d075dd39e978efae59c70eeedfd858a> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x3239e000 - 0x3244afff CoreFoundation armv6 <26d25c2c53c05db6e9adc24d5befaa2c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x3244b000 - 0x3244bfff Accelerate armv6 <21e1dc9fad96f0d51afbeb7f7e006aaf> /System/Library/PrivateFrameworks/Accelerate.framework/Accelerate
0x324a3000 - 0x33294fff UIKit armv6 <4e881f8351712fd798c335af748b5b5f> /System/Library/Frameworks/UIKit.framework/UIKit
0x332bb000 - 0x333b8fff JavaScriptCore armv6 <41bc769b8c046770bac84eed2b08ff42> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
0x333e6000 - 0x334dcfff libxml2.2.dylib armv6 <a2f276df14b4ded9650dea857293b4e9> /usr/lib/libxml2.2.dylib
0x33501000 - 0x3350cfff GraphicsServices armv6 <3a4ec1bf23242cddae5f606f0ed38930> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x3350d000 - 0x33661fff AudioToolbox armv6 <31bb7db82eece25ac6742672e3afbe02> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x336a9000 - 0x336b5fff CoreVideo armv6 <63d65206a8853262b597f97b3d949f31> /System/Library/PrivateFrameworks/CoreVideo.framework/CoreVideo
0x336de000 - 0x337d6fff Foundation armv6 <a3612d56db60ccfc998caee19d9805d7> /System/Library/Frameworks/Foundation.framework/Foundation
0x338d0000 - 0x33a8afff CoreGraphics armv6 <41796502b08a751095dcd2b105d1931c> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x33a92000 - 0x33a9afff libgcc_s.1.dylib armv6 <6673f222acee5f3a208169712387862a> /usr/lib/libgcc_s.1.dylib
0x33aa2000 - 0x33aacfff MobileCoreServices armv6 <805d82b950722ad728d87e0c24089c4b> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x33aad000 - 0x33bd3fff libSystem.B.dylib armv6 <0373fd64e915a17160732b29d343f95f> /usr/lib/libSystem.B.dylib
0x33bf6000 - 0x33c60fff libstdc++.6.dylib armv6 <a35cfd59eee09893fbab57794ad7cbaf> /usr/lib/libstdc++.6.dylib
0x33c61000 - 0x33c6dfff DataDetectorsCore armv6 <fd18ffc95012b76c319875bedd99eb43> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/DataDetectorsCore
0x33da7000 - 0x33e01fff libsqlite3.dylib armv6 <61513660cb3e21b47ccbf5407e0efae5> /usr/lib/libsqlite3.dylib
0x33f83000 - 0x34096fff libmecab_em.dylib armv6 <a3c3e3dc97dc2aebad18b5a3c9673df0> /usr/lib/libmecab_em.dylib
0x340e2000 - 0x3413dfff CoreAudio armv6 <71fb4de4976308c0a3f86d127e46472b> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x3430e000 - 0x3431cfff libz.1.dylib armv6 <7a06dbf4af39c5b548306c7fb8ffcf0b> /usr/lib/libz.1.dylib
0x3439e000 - 0x343a7fff SpringBoardServices armv6 <f13747f4598b0f4b1442877adc75de5a> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
0x343a8000 - 0x343a9fff liblangid.dylib armv6 <f8f20663988ec129b14a4e5a06e1ab0d> /usr/lib/liblangid.dylib
0x343ab000 - 0x343acfff CoreSurface armv6 <f27efe4047d6b4319bc01edb9007a789> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
When apps crash on the device, the device isn't aware of the codebase, and the identifiers you used (variable names, method names, etc). 当应用在设备上崩溃时,设备将不知道代码库以及您使用的标识符(变量名,方法名等)。 So, instead of giving you friendly-looking method names and line numbers that crashes occured on, it can only give you the relevant memory addresses.
因此,与其给您看似友好的方法名称和发生崩溃的行号,不如给您提供相关的内存地址。
I believe there are tools to help you reverse the memory addresses to something recognizable. 我相信有一些工具可以帮助您将内存地址反转为可识别的地址。 See this Google search from a similar question .
看到类似问题的 Google搜索 。
If you have the very same build still available, run it under GDB and set a breakpoint at 0x00012648, which is the last bit of "your" code in the backtrace. 如果仍具有相同的生成,请在GDB下运行它,并将断点设置为0x00012648,这是回溯中“您的”代码的最后一位。
Then run it, find out where in the source that address is, and puzzle out ways it could possibly crash from there. 然后运行它,找出该地址在源中的位置,并想出可能从那里崩溃的方式。 Given that it's crashing in CoreFoundation, you're probably passing an invalid pointer to a CF routine.
鉴于它在CoreFoundation中崩溃,您可能正在将无效的指针传递给CF例程。 Chances are that it's already been freed, or never allocated.
可能是它已经被释放,或者从未分配过。
View your crash log using Organizer and it should not look nearly so mysterious. 使用管理器查看您的崩溃日志,它看起来似乎并不神秘。 There are tools to interpret the crash logs from other people running on other devices, but you don't need to jump through hoops to decode ones on your own device when your app crashes.
有一些工具可以从运行在其他设备上的其他人解释崩溃日志,但是当您的应用崩溃时,您无需跳动即可解码自己设备上的崩溃日志。
You need to be running the most recently compiled version of your application on your device in order for XCode to be able to decode the symbols for you. 您需要在设备上运行应用程序的最新编译版本,以便XCode能够为您解码符号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.