Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIApplication sendAction:to:from:forEvent: iOS7 no user code

I have a crash that is occurring on iOS7 only. The app is compiled against 6.1 sdk. I can not reproduce this myself but I can see from crash reports that it is occurring for some users. The problem is there is no user code in the stack trace so it is proving difficult to track down:

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

I have tried enabling zombies and performing various actions in the app but that didn't flag anything.

Update

I think this might have morphed in to [UIPickerView _updateSelectedRows], EXC_BAD_ACCESS under iOS 7.1 . I will investigate further.

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
like image 331
Imran Avatar asked Oct 22 '13 20:10

Imran


1 Answers

I had the almost identical crash log with our project we were able to track to an animation. The problem was that we animated a UIPickerView on and off the screen. If the ViewController that owned the UIPickerView was popped and dealloced during the animation. We solved this by removing the UIPickerView from the superview in the animation completion block. [UIView animateWithDuration:0.5f animations:^{ //Set the destination frame of the PickerView } completion:^(BOOL finished) { [self.pickerView removeFromSuperview]; }];

like image 106
BandoKal Avatar answered Oct 18 '22 21:10

BandoKal