2015-09-05 76 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:但我也困惑,爲什麼在應用程序邏輯錯誤出現只有當一個選項卡切換...