ios 崩溃后,使用bt 打印堆栈找不到自己代码错误的解决方法

首先确定是不是自己代码错误

在(11db) 处输入bt 回车

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x656565656565656d)
    frame #0: 0x000000018ae101b0 QuartzCore`CA::Layer::retain_parent(CA::Transaction*) const + 44
    frame #1: 0x000000018ae1edc0 QuartzCore`CALayerGetSuperlayer + 52
    frame #2: 0x00000001888b2e3c UIKitCore`-[UIView(UIKitManual) superview] + 48
    frame #3: 0x00000001887e6198 UIKitCore`-[UILayoutGuide _snipReferencingConstraints] + 424
    frame #4: 0x00000001887e54ac UIKitCore`-[UILayoutGuide _owningViewIsDeallocating] + 40
    frame #5: 0x000000018887af18 UIKitCore`-[UIView _layoutConstraintCleanup] + 212
    frame #6: 0x000000018887b108 UIKitCore`-[UIView dealloc] + 148
    frame #7: 0x00000001840dd40c libobjc.A.dylib`_object_remove_assocations + 352
    frame #8: 0x00000001840d9d88 libobjc.A.dylib`objc_destructInstance + 100
    frame #9: 0x00000001840e0db0 libobjc.A.dylib`_objc_rootDealloc + 48
    frame #10: 0x000000018ae05cd0 QuartzCore`-[CALayer dealloc] + 188
    frame #11: 0x000000018ad8f6bc QuartzCore`CA::release_objects(X::List<void const*>*) + 32
    frame #12: 0x000000018ad8f7cc QuartzCore`CA::release_root_if_unused(CA::Layer*, CA::Layer*, void*) + 52
    frame #13: 0x000000018ad15df0 QuartzCore`x_hash_table_remove_if + 84
    frame #14: 0x000000018ad8fb34 QuartzCore`CA::Transaction::commit() + 464
    frame #15: 0x000000018ad905fc QuartzCore`CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
    frame #16: 0x000000018431de68 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
    frame #17: 0x0000000184318d54 CoreFoundation`__CFRunLoopDoObservers + 416
    frame #18: 0x0000000184319320 CoreFoundation`__CFRunLoopRun + 1308
    frame #19: 0x0000000184318adc CoreFoundation`CFRunLoopRunSpecific + 464
    frame #20: 0x000000018e29e328 GraphicsServices`GSEventRunModal + 104
    frame #21: 0x0000000188413ae0 UIKitCore`UIApplicationMain + 1936
  * frame #22: 0x0000000104385580 Test`main(argc=1, argv=0x000000016ba93788) at main.m:19:12
    frame #23: 0x00000001841a2360 libdyld.dylib`start + 4


在这里可以看到,堆栈信息里是找不到自己的错误的(没有自己的类名出现)

我这里是因为不小心重写了系统的方法导致的

发布了31 篇原创文章 · 获赞 30 · 访问量 7378

猜你喜欢

转载自blog.csdn.net/qq_41586150/article/details/104328245
今日推荐