UIApplication sendAction:to:from:forEvent:iOS7没有用户代码

前端之家收集整理的这篇文章主要介绍了UIApplication sendAction:to:from:forEvent:iOS7没有用户代码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在iOS7上发生崩溃.该应用程序是针对6.1 sdk编译的.我无法自己复制,但是我可以从崩溃报告中看到,这是一些用户发生的.问题是堆栈跟踪中没有用户代码,因此难以追踪:
Exception Type: EXC_BAD_ACCESS Code: KERN_INVALID_ADDRESS at 0x13
0    libobjc.A.dylib     objc_msgSend + 5
1    UIKit   -[UIApplication sendAction:to:from:forEvent:] + 90
2    UIKit   -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
3    UIKit   -[UIControl sendAction:to:forEvent:] + 44
4    UIKit   -[UIControl _sendActionsForEvents:withEvent:] + 374
5    UIKit   -[UIControl touchesEnded:withEvent:] + 590
6    UIKit   -[UIWindow _sendTouchesForEvent:] + 528
7    UIKit   -[UIWindow sendEvent:] + 832
8    UIKit   -[UIApplication sendEvent:] + 196
9    UIKit   _UIApplicationHandleEventQueue + 7096
10 ...   CoreFoundation  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
16   UIKit   UIApplicationMain + 1136

我尝试启用僵尸并在应用程序中执行各种操作,但没有标记任何内容.

更新

我认为这可能已经演变成iOS 7.1下的[UIPickerView _updateSelectedRows],EXC_BAD_ACCESS.我会进一步调查.

Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x39576626 objc_msgSend + 5
1  UIKit                          0x3187b12f -[UIPickerView _updateSelectedRows] + 54
2  UIKit                          0x3187b26f -[UIPickerView didMoveToWindow] + 78
3  UIKit                          0x3160ad37 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1358
4  UIKit                          0x3160aaa5 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 700
5  UIKit                          0x3160a40d __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 112
6  UIKit                          0x3160a263 -[UIView(Hierarchy) _postMovedFromSuperview:] + 250
7  UIKit                          0x318a2a27 __UIViewWasRemovedFromSuperview + 218
8  UIKit                          0x31609187 -[UIView(Hierarchy) removeFromSuperview] + 270
9  UIKit                          0x316cf26f -[UIPeripheralHost(UIKitInternal) adjustHostViewForTransitionCompletion:] + 310
10 UIKit                          0x31a6ca8b __53-[UIPeripheralHost(UIKitInternal) executeTransition:]_block_invoke1364 + 318
11 UIKit                          0x3164378d -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 284
12 UIKit                          0x316433d7 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 178
13 UIKit                          0x316432ef -[UIViewAnimationState animationDidStop:finished:] + 66
14 QuartzCore                     0x3128de0b CA::Layer::run_animation_callbacks(void*) + 234
15 libdispatch.dylib              0x39a55d3f _dispatch_client_callout + 22
16 libdispatch.dylib              0x39a586c3 _dispatch_main_queue_callback_4CF + 278
17 CoreFoundation                 0x2eda6679 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
18 CoreFoundation                 0x2eda4f45 __CFRunLoopRun + 1308
19 CoreFoundation                 0x2ed0f7a9 CFRunLoopRunSpecific + 524
20 CoreFoundation                 0x2ed0f58b CFRunLoopRunInMode + 106
21 GraphicsServices               0x33c6c6d3 GSEventRunModal + 138
22 UIKit                          0x3166e891 UIApplicationMain + 1136

解决方法

我有几乎相同的崩溃日志与我们的项目,我们能够跟踪一个动画.
问题是我们在屏幕上和屏幕上动画了一个UIPickerView.如果在动画过程中弹出并处理了拥有UIPickerView的ViewController.我们通过从动画完成块中的超级视图中删除UIPickerView来解决这个问题.

[UIView animateWithDuration:0.5f动画:^ {//设置PickerView的目标帧}完成:^(BOOL完成){[self.pickerView removeFromSuperview];}];

猜你在找的iOS相关文章