2015-09-05 117 views
-1

当我有两个选项卡的选项卡栏控制器和通常我可以在标签之间正常运行,但有一个点,其中我选择第二选项卡,并在TE日志应用程序崩溃它只显示LLDB如果我写bt它给了我下面的应用崩溃切换到标签

* thread #1: tid = 0x5dc59, 0x0061b0b2 libobjc.A.dylib`objc_msgSend + 14, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1000000c) 
frame #0: 0x0061b0b2 libobjc.A.dylib`objc_msgSend + 14 
frame #1: 0x0134e10c UIKit`-[UITabBarController _tabBarItemClicked:] + 102 
frame #2: 0x0061d7cd libobjc.A.dylib`-[NSObject performSelector:withObject:withObject:] + 84 
frame #3: 0x0119ba40 UIKit`-[UIApplication sendAction:to:from:forEvent:] + 99 
frame #4: 0x0119b9d2 UIKit`-[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64 
frame #5: 0x014f66fd UIKit`-[UITabBar _sendAction:withEvent:] + 466 
frame #6: 0x0061d7cd libobjc.A.dylib`-[NSObject performSelector:withObject:withObject:] + 84 
frame #7: 0x0119ba40 UIKit`-[UIApplication sendAction:to:from:forEvent:] + 99 
frame #8: 0x0119b9d2 UIKit`-[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64 
frame #9: 0x012dc13a UIKit`-[UIControl sendAction:to:forEvent:] + 69 
frame #10: 0x012dc557 UIKit`-[UIControl _sendActionsForEvents:withEvent:] + 598 
frame #11: 0x012dc172 UIKit`-[UIControl sendActionsForControlEvents:] + 48 
frame #12: 0x014fb690 UIKit`-[UITabBar(Static) _buttonUp:] + 123 
frame #13: 0x0061d7cd libobjc.A.dylib`-[NSObject performSelector:withObject:withObject:] + 84 
frame #14: 0x0119ba40 UIKit`-[UIApplication sendAction:to:from:forEvent:] + 99 
frame #15: 0x0119b9d2 UIKit`-[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64 
frame #16: 0x012dc13a UIKit`-[UIControl sendAction:to:forEvent:] + 69 
frame #17: 0x012dc557 UIKit`-[UIControl _sendActionsForEvents:withEvent:] + 598 
frame #18: 0x012db7c1 UIKit`-[UIControl touchesEnded:withEvent:] + 660 
frame #19: 0x011f3caa UIKit`-[UIWindow _sendTouchesForEvent:] + 874 
frame #20: 0x011f4786 UIKit`-[UIWindow sendEvent:] + 792 
frame #21: 0x011b2681 UIKit`-[UIApplication sendEvent:] + 242 
frame #22: 0x011c2ab8 UIKit`_UIApplicationHandleEventFromQueueEvent + 21484 
frame #23: 0x011962e7 UIKit`_UIApplicationHandleEventQueue + 2300 
frame #24: 0x008a006f CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 
frame #25: 0x00895b7d CoreFoundation`__CFRunLoopDoSources0 + 253 
frame #26: 0x008950d8 CoreFoundation`__CFRunLoopRun + 952 
frame #27: 0x00894a5b CoreFoundation`CFRunLoopRunSpecific + 443 
frame #28: 0x0089488b CoreFoundation`CFRunLoopRunInMode + 123 
frame #29: 0x04bab2c9 GraphicsServices`GSEventRunModal + 192 
frame #30: 0x04bab106 GraphicsServices`GSEventRun + 104 
frame #31: 0x0119a0b6 UIKit`UIApplicationMain + 1526 
* frame #32: 0x00072624 PIBA`main + 180 at AppDelegate.swift:12 
    frame #33: 0x03526ac9 libdyld.dylib`start + 1 

从我所了解的是,从选项卡,但为什么切换时,这的确是崩溃?

我启用NS植物大战僵尸和它印

*** -[PIBA.PreguntasViewController respondsToSelector:]: message sent to deallocated instance 0x7ae2dea0 

回答

1

没有这个现在有关切换选项卡,但这种释放的实例意味着一些您试图访问其没有在舞台上(内存)的实例,现在或它从内存地址中删除。所以肯定不能访问中不存在任何事情那边何在您是否在寻找希望,如果您有任何困惑问我

+0

如何调试呢?我如何知道它从内存中删除的位置和原因? – Zablah

+0

检查你调用这里的选择或响应者可以创建例外突破点检查这个 网址http://oramind.com/182-ios-5-xcode-backtrace/ –

+0

如果你明白告诉你,它为你工作请接受答案 –

0

我也有类似的情况下,你明白了。在我的情况下,这个消息是因为数组堆栈溢出而发生的。该解决方案帮我调试错误:

  1. 请确保您有这个选项“调试 - >调试工作流 - >总是显示拆卸”未选中
  2. 并允许这样的:产品 - >方案 - >编辑方案,运行 - >诊断 - >地址消毒剂。

之后它会在你的代码中显示溢出,你将能够解决这个问题。

P.S:但我也困惑,为什么在应用程序逻辑错误出现只有当一个选项卡切换...