使用UIAlertView随机崩溃

时间:2013-04-04 13:24:05

标签: ios crash uialertview

我收到UIAlertView的随机崩溃。崩溃并不总是发生,而且非常随机。任何帮助表示赞赏。

这是堆栈跟踪:

Thread 0 name:  Dispatch queue: com.apple.main-thread  
Thread 0 Crashed:  
0   libobjc.A.dylib                 0x398685b0 objc_msgSend + 16  
1   UIKit                           0x33b59c4c -[UIAlertView(Private) _buttonClicked:]  
2   UIKit                           0x33aed0c0 -[UIApplication sendAction:to:from:forEvent:]  
3   UIKit                           0x33aed072 -[UIApplication sendAction:toTarget:fromSender:forEvent:]  
4   UIKit                           0x33aed050 -[UIControl sendAction:to:forEvent:]  
5   UIKit                           0x33aec906 -[UIControl(Internal) _sendActionsForEvents:withEvent:]  
6   UIKit                           0x33aecdfc -[UIControl touchesEnded:withEvent:]  
7   UIKit                           0x33a155ec -[UIWindow _sendTouchesForEvent:]  
8   UIKit                           0x33a027fc -[UIApplication sendEvent:]  
9   UIKit                           0x33a02116 _UIApplicationHandleEvent  
10  GraphicsServices                0x356f25a0 _PurpleEventCallback  
11  GraphicsServices                0x356f21ce PurpleEventCallback  
12  CoreFoundation                  0x31bcf170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__  
13  CoreFoundation                  0x31bcf112 __CFRunLoopDoSource1  
14  CoreFoundation                  0x31bcdf94 __CFRunLoopRun  
15  CoreFoundation                  0x31b40eb8 CFRunLoopRunSpecific  
16  CoreFoundation                  0x31b40d44 CFRunLoopRunInMode  
17  GraphicsServices                0x356f12e6 GSEventRunModal  
18  UIKit                           0x33a562fc UIApplicationMain  

1 个答案:

答案 0 :(得分:0)

按钮按下之前,您的代表可能正在清理。如果视图或启动警报的视图不再显示在屏幕上,则会发生这种情况(例如)。尝试启用Zombie Objects(在Edit Scheme下 - > Run - > Diagnostics)。如果向已释放的对象发送了一条消息,您将在调试控制台中收到一条消息。

enter image description here