我知道这个问题听起来很愚蠢,但我希望了解在Xcode中生成的崩溃报告中存在的问题。我不知道哪个视图控制器/页面或它崩溃的功能。如何研究崩溃报告?有人请帮忙..

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000ba1d8
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   myfirstapp                  0x00000001000ba1d8 0x1000b0000 + 41432
1   myfirstapp                  0x00000001000ba208 0x1000b0000 + 41480
2   UIKit                           0x0000000197b3e754 -[UIViewController _setViewAppearState:isAnimating:] + 624 (UIViewController.m:3801)
3   UIKit                           0x0000000197b3e4cc -[UIViewController __viewWillAppear:] + 156 (UIViewController.m:3911)
4   UIKit                           0x0000000197bdf760 -[UINavigationController _startTransition:fromViewController:toViewController:] + 784 (UINavigationController.m:4824)
5   UIKit                           0x0000000197bdef28 -[UINavigationController _startDeferredTransitionIfNeeded:] + 856 (UINavigationController.m:4971)
6   UIKit                           0x0000000197bdeadc -[UINavigationController __viewWillLayoutSubviews] + 64 (UINavigationController.m:5224)
7   UIKit                           0x0000000197bdea40 -[UILayoutContainerView layoutSubviews] + 188 (UILayoutContainerView.m:86)
8   UIKit                           0x0000000197b23a80 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1196 (UIView.m:14198)
9   QuartzCore                      0x0000000194fd19d8 -[CALayer layoutSublayers] + 148 (CALayer.mm:8926)
10  QuartzCore                      0x0000000194fc64cc CA::Layer::layout_if_needed(CA::Transaction*) + 292 (CALayer.mm:8806)
11  QuartzCore                      0x0000000194fc638c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32 (CALayer.mm:2345)
12  QuartzCore                      0x0000000194f433e0 CA::Context::commit_transaction(CA::Transaction*) + 252 (CAContextInternal.mm:1683)
13  QuartzCore                      0x0000000194f6aa68 CA::Transaction::commit() + 512 (CATransactionInternal.mm:419)
14  QuartzCore                      0x0000000194f6b488 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 120 (CATransactionInternal.mm:778)
15  CoreFoundation                  0x0000000191c1e0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1802)
16  CoreFoundation                  0x0000000191c1bcf0 __CFRunLoopDoObservers + 372 (CFRunLoop.c:1898)
17  CoreFoundation                  0x0000000191c1c180 __CFRunLoopRun + 1024 (CFRunLoop.c:2849)
18  CoreFoundation                  0x0000000191b4a2b8 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)
19  GraphicsServices                0x00000001935fe198 GSEventRunModal + 180 (GSEvent.c:2245)
20  UIKit                           0x0000000197b917fc -[UIApplication _run] + 684 (UIApplication.m:2650)
21  UIKit                           0x0000000197b8c534 UIApplicationMain + 208 (UIApplication.m:4092)
22  myfirstapp                  0x00000001000b7b54 0x1000b0000 + 31572
23  libdyld.dylib                   0x0000000190b2d5b8 start + 4

最佳答案

您可以在调试器控制台中使用“po”命令,也可以在XCode断点设置部分中添加异常断点。

关于ios - 如何在Xcode中调试EXC_BREAKPOINT(SIGTRAP),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44362154/

10-10 17:27