0
通常,當我嘗試修復BAD_ACCESS錯誤時,打開Xcode樂器並測試以查找導致錯誤的殭屍。XCode樂器沒有用BAD_ACCESS檢測殭屍
我用iPhone 5.0模擬器運行我的應用程序。它以BAD_ACCESS結束,但樂器不會標記任何殭屍。
當我使用iPhone 4.3模擬器運行應用程序時,行爲完全不同。在這種情況下,應用程序運行良好,沒有任何BAD_ACCESS。
我使用的是XCode 4.2。
可能是什麼回事?
這裏的回溯:
(gdb) bt
#0 0x0167209b in objc_msgSend()
#1 0x00002ff2 in -[BSViewController viewDidAppear:] (self=0x1, _cmd=0x12ddd81, animated=1 '\001') at BSViewController.m:42
#2 0x012616f8 in __CFStringAppendFormatCore()
#3 0x011acb6c in _CFStringCreateWithFormatAndArgumentsAux()
#4 0x0122bce8 in _CFLogvEx()
#5 0x00b26b63 in NSLogv()
#6 0x00b26ad5 in NSLog()
#7 0x00009ffc in -[BSCTView buildFrames] (self=0x6a55f80, _cmd=0xd541) at BSCTView.m:96
#8 0x0000a5da in -[BSCTView layoutSubviews] (self=0x6a55f80, _cmd=0x66a6c4) at BSCTView.m:124
#9 0x001ff301 in -[UIView(CALayerDelegate) layoutSublayersOfLayer:]()
#10 0x01284e72 in -[NSObject performSelector:withObject:]()
#11 0x0283592d in -[CALayer layoutSublayers]()
#12 0x0283f827 in CA::Layer::layout_if_needed()
#13 0x027c5fa7 in CA::Context::commit_transaction()
#14 0x027c7ea6 in CA::Transaction::commit()
#15 0x0285330c in +[CATransaction flush]()
#16 0x001bf4c6 in -[UIApplication _reportAppLaunchFinished]()
#17 0x001bfbd6 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:]()
#18 0x001ce743 in -[UIApplication handleEvent:withNewEvent:]()
#19 0x001cf1f8 in -[UIApplication sendEvent:]()
#20 0x001c2aa9 in _UIApplicationHandleEvent()
#21 0x01748fa9 in PurpleEventCallback()
#22 0x012571c5 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__()
#23 0x011bc022 in __CFRunLoopDoSource1()
#24 0x011ba90a in __CFRunLoopRun()
#25 0x011b9db4 in CFRunLoopRunSpecific()
#26 0x011b9ccb in CFRunLoopRunInMode()
#27 0x001bf2a7 in -[UIApplication _run]()
#28 0x001c0a9b in UIApplicationMain()
#29 0x000027a0 in main (argc=1, argv=0xbffff578) at main.m:16
'EXC_BAD_ACCESS'可能是由不同可能的錯誤造成的,其中只有一個是殭屍對象。沒有任何代碼,這是不可能的。發生錯誤時的堆棧跟蹤是什麼? –
是的,我知道沒有代碼很難說,但代碼是非常大的複製在這裏,BAD_ACCESS發生在不說太多的地方。我正在編輯添加回溯的問題。 – javsmo
哇,'self = 0x1'是一個非常壞的狀態(re:第1行)。 – Richard