I'm using Crashlytics 3.6.0 and I've been getting a couple of crash reports lately that I can't read/understand. They seem to only happen on iOS 8 (can't confirm this 100% though).
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x197fcfbd0 objc_msgSend + 16
1 UIKit 0x18c035c60 -[UIControl _sendActionsForEvents:withEvent:] + 124
2 UIKit 0x18c293e7c -[UISwitch _handleLongPressNL:] + 424
3 UIKit 0x18c1af508 _UIGestureRecognizerSendActions + 276
4 UIKit 0x18c048050 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 580
5 UIKit 0x18c4b420c ___UIGestureRecognizerUpdate_block_invoke662 + 60
6 UIKit 0x18c00c530 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 292
7 UIKit 0x18c00a8dc _UIGestureRecognizerUpdate + 2504
8 UIKit 0x18c0461f8 -[UIWindow _sendGesturesForEvent:] + 1044
9 UIKit 0x18c045898 -[UIWindow sendEvent:] + 660
10 UIKit 0x18c018fa8 -[UIApplication sendEvent:] + 264
11 infinight 0x1003ebe00 -[IBGMethodSwizzler sendEvent:] (IBGMethodSwizzler.m:103)
12 UIKit 0x18c2b7f58 _UIApplicationHandleEventFromQueueEvent + 14992
13 UIKit 0x18c017510 _UIApplicationHandleEventQueue + 1616
14 CoreFoundation 0x18781e9ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
15 CoreFoundation 0x18781dc90 __CFRunLoopDoSources0 + 264
16 CoreFoundation 0x18781bd40 __CFRunLoopRun + 712
17 CoreFoundation 0x1877490a4 CFRunLoopRunSpecific + 396
18 GraphicsServices 0x1908eb5a4 GSEventRunModal + 168
19 UIKit 0x18c07e3c0 UIApplicationMain + 1488
20 infinight 0x10013af44 main (main.m:16)
21 libdyld.dylib 0x19862aa08 start + 4
Could anyone help me identify the error? I can't reproduce the error -- it doesn't happen on my device or on the simulator. But I've been getting a fair amount of crash reports like these in the last couple of days from test users.
This was an error that only occured on iOS 8. To reproduce the error, I downloaded the iOS 8.1 simulator and found the error. To get the exact error message, I went to Edit Scheme and Enabled Zombie Objects. That showed me the exact error message:
*** -[NamedUISwitch _sendActionsForEvents:withEvent:]: message sent to deallocated instance
Related
My app keeps being rejected by Apple Beta Review Team because of what they claim is a crash at boot. Point is the crash never happens on any simulator or device on my side.
The symbolicated crash log reports something like the following, but the line 74 reported in HomeViewController.swift (here I report an image of the code submitted to the Beta Review Team)
is simply referencing a UITableView IBOutlet coming from the storyboard, if I put a breakpoint here the tableView is instantiated. I am using swift, iOS 9.3.2 and Xcode 7.3.1.
EDIT: Line 87 is same, calling a function renderButton(btnOpened, selected: true) on a UIButton IBOutlet.
I tried setting zombies, address sanitizer, I keep not having the crash, they keep having it, I have no clue what possibly could fix this. Does anyone has any idea of what could be wrong?
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 Sportito 0x00000001000cee40 HomeViewController.viewDidLoad() -> () (HomeViewController.swift:74)
1 Sportito 0x00000001000ce990 HomeViewController.viewDidLoad() -> () (HomeViewController.swift:87)
2 Sportito 0x00000001000cee60 #objc HomeViewController.viewDidLoad() -> () (HomeViewController.swift:0)
3 UIKit 0x0000000186934c40 -[UIViewController loadViewIfRequired] + 996
4 UIKit 0x0000000186934844 -[UIViewController view] + 28
5 UIKit 0x0000000186cdaaec -[UINavigationController preferredContentSize] + 172
6 UIKit 0x0000000186b9adf4 -[UIViewController(UIPopoverController_Internal) _resolvedPreferredContentSize] + 68
7 UIKit 0x0000000186b9a858 -[UIPopoverController _transitionFromViewController:toViewController:animated:] + 152
8 UIKit 0x0000000186b9a48c -[UIPopoverController _initWithContentViewController:popoverControllerStyle:] + 836
9 UIKit 0x0000000186f5ac7c -[UISplitViewController _setupHiddenPopoverControllerWithViewController:] + 120
10 UIKit 0x0000000186f5aeec -[UISplitViewController _viewControllerHiding:] + 356
11 UIKit 0x0000000186f62b60 -[UISplitViewController viewWillAppear:] + 208
12 UIKit 0x000000018694d374 -[UIViewController _setViewAppearState:isAnimating:] + 628
13 UIKit 0x000000018694d0e8 -[UIViewController __viewWillAppear:] + 156
14 UIKit 0x000000018693cf14 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 596
15 UIKit 0x000000018693c13c -[UIView(Internal) _addSubview:positioned:relativeTo:] + 444
16 UIKit 0x000000018693b7e8 -[UIWindow addRootViewControllerViewIfPossible] + 664
17 UIKit 0x0000000186938a88 -[UIWindow _setHidden:forced:] + 252
18 UIKit 0x00000001869aefa4 -[UIWindow makeKeyAndVisible] + 48
19 UIKit 0x0000000186bda3ac -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3456
20 UIKit 0x0000000186bde5f0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1684
21 UIKit 0x0000000186bdb764 -[UIApplication workspaceDidEndTransaction:] + 168
22 FrontBoardServices 0x000000018317f7ac __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
23 FrontBoardServices 0x000000018317f618 -[FBSSerialQueue _performNext] + 168
24 FrontBoardServices 0x000000018317f9c8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
25 CoreFoundation 0x000000018179509c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
26 CoreFoundation 0x0000000181794b30 __CFRunLoopDoSources0 + 540
27 CoreFoundation 0x0000000181792830 __CFRunLoopRun + 724
28 CoreFoundation 0x00000001816bcc50 CFRunLoopRunSpecific + 384
29 UIKit 0x00000001869a394c -[UIApplication _run] + 460
30 UIKit 0x000000018699e088 UIApplicationMain + 204
31 Sportito 0x000000010002e860 main (AppDelegate.swift:42)
32 libdyld.dylib 0x000000018125a8b8 start + 4
Is the app set as universal? Could they be getting the crash on an iPad while you're testing on an iPhone, or vice-versa?
According to apple's guideline your app must not crash on iphone or ipad whether your app is universal or not.
If your app is iPhone only then it should run in small resolution on ipad but it must not crash in any situation, because from appstore user can download iphone only app from ipad also so, it shouldn't crash.
So, check in iPad also that your app is not crashing.
If your app is universal then there shouldn't problem of resolution in ipad or iphone both.
So, make sure which mistake you are doing.
hope this will help :)
I set gesture recognizer for my tableView:
let longPress = UILongPressGestureRecognizer(target: self, action: "longPressDetected:")
self.tableView.addGestureRecognizer(longPress)
and when I am trying it, it works fine. I've sent app to beta test and I have several times crash with this log:
Thread : Crashed: com.apple.main-thread
0 IamDJ 4295807340 specialized ProjectDetailViewController.longPressDetected(AnyObject) -> () (ProjectDetailViewController.swift)
1 IamDJ 4295765652 #objc ProjectDetailViewController.longPressDetected(AnyObject) -> () (ProjectDetailViewController.swift)
2 UIKit 6613447472 _UIGestureRecognizerSendTargetActions + 164
3 UIKit 6609423196 _UIGestureRecognizerSendActions + 172
4 UIKit 6607906908 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 784
5 UIKit 6613452556 ___UIGestureRecognizerUpdate_block_invoke898 + 72
6 UIKit 6607640760 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 372
7 UIKit 6607627836 _UIGestureRecognizerUpdate + 2404
8 UIKit 6607898316 -[UIWindow _sendGesturesForEvent:] + 1132
9 UIKit 6607895752 -[UIWindow sendEvent:] + 764
10 UIKit 6607701156 -[UIApplication sendEvent:] + 248
11 UIKit 6607693676 _UIApplicationHandleEventQueue + 5528
12 CoreFoundation 6517671236 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
13 CoreFoundation 6517669848 __CFRunLoopDoSources0 + 540
14 CoreFoundation 6517660888 __CFRunLoopRun + 724
15 CoreFoundation 6516804768 CFRunLoopRunSpecific + 384
16 GraphicsServices 6703693960 GSEventRunModal + 180
17 UIKit 6608130044 UIApplicationMain + 204
18 IamDJ 4296201300 main (AppDelegate.swift:15)
19 libdyld.dylib 6874491064 start + 4
How can I find where is the problem? What's wrong with that longPressDetected method? I've tried this method for last 2 hours and nothing crashed. I am using same device and same iOS version (iPhone 6, iOS 9.1). There is 5% free RAM in one of the logs. Could it be problem with releasing memory? Thanks for any help
Could you help me with this mysterious crash? It happens when I re-open the app after a few days, so it's practically impossible to debug it :/
Any clue or idea would be super helpful. I'm kinda lost here. Thank you!
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x0000000196a63bd0 objc_msgSend + 16
1 UIKit 0x000000018ab35418 -[UIApplication sendAction:to:from:forEvent:] + 96
2 UIKit 0x000000018ab1e52c -[UIControl _sendActionsForEvents:withEvent:] + 612
3 UIKit 0x000000018ab34db4 -[UIControl touchesEnded:withEvent:] + 592
4 UIKit 0x000000018ab34a40 -[UIWindow _sendTouchesForEvent:] + 700
5 UIKit 0x000000018ab2df94 -[UIWindow sendEvent:] + 684
6 UIKit 0x000000018ab0168c -[UIApplication sendEvent:] + 264
7 UIKit 0x000000018ada060c _UIApplicationHandleEventFromQueueEvent + 14992
8 UIKit 0x000000018aaffbf4 _UIApplicationHandleEventQueue + 1616
9 CoreFoundation 0x000000018630a9ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
10 CoreFoundation 0x0000000186309c90 __CFRunLoopDoSources0 + 264
11 CoreFoundation 0x0000000186307d40 __CFRunLoopRun + 712
12 CoreFoundation 0x00000001862350a4 CFRunLoopRunSpecific + 396
13 GraphicsServices 0x000000018f3d75a4 GSEventRunModal + 168
14 UIKit 0x000000018ab66aa4 UIApplicationMain + 1488
15 Wiretap 0x000000010012b604 main (main.m:16)
16 libdyld.dylib 0x00000001970bea08 start + 4
I ran into a very unusual problem.. i got a crash on UIKit.. first time i have faced something like this.. Please can anybody guide my in this..
This is the crash log that i got.
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x1161a18c
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x386fcb66 objc_msgSend + 5
1 UIKit 0x30b5dda3 -[UIApplication sendAction:to:from:forEvent:] + 90
2 UIKit 0x30cc5615 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 120
3 UIKit 0x30b5dda3 -[UIApplication sendAction:to:from:forEvent:] + 90
4 UIKit 0x30b5dd3f -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 38
5 UIKit 0x30b5dd13 -[UIControl sendAction:to:forEvent:] + 46
6 UIKit 0x30b49743 -[UIControl _sendActionsForEvents:withEvent:] + 374
7 UIKit 0x30b5d75b -[UIControl touchesEnded:withEvent:] + 594
8 UIKit 0x30b5d425 -[UIWindow _sendTouchesForEvent:] + 528
9 UIKit 0x30b58451 -[UIWindow sendEvent:] + 832
10 UIKit 0x30b2dd79 -[UIApplication sendEvent:] + 196
11 UIKit 0x30b2c569 _UIApplicationHandleEventQueue + 7116
12 CoreFoundation 0x2e36ff1f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
13 CoreFoundation 0x2e36f3e7 __CFRunLoopDoSources0 + 206
14 CoreFoundation 0x2e36dbd7 __CFRunLoopRun + 630
15 CoreFoundation 0x2e2d8471 CFRunLoopRunSpecific + 524
16 CoreFoundation 0x2e2d8253 CFRunLoopRunInMode + 106
17 GraphicsServices 0x330122eb GSEventRunModal + 138
18 UIKit 0x30b8d845 UIApplicationMain + 1136
19 TradeMate 0x0008f2bf main (main.m:16)
You are crashing in objc_msgSend. This means (as explained in this famous article) that the receiver has gone missing. In this case it appears that the user has tapped a button which sends an action message to a target, but the target object has gone out of existence.
Make sure the receiver or the object which receives the events is declared strong.
You may not even get the crash log to figure out what what went wrong :)
If you are getting something like above check if the object is declared strong. That should solve the issue
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
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];
}];
I don't know about other crash reporting tools, but Crashlytics includes the CLS_LOG() macro:
http://support.crashlytics.com/knowledgebase/articles/92519-how-do-i-use-logging
During development, it behaves as NSLog() but in the field, the log statements are included in crash reports. So I suggest replacing your debugging statements with CLS_LOG or start peppering the code in question with lots of statements that capture the user actions, then deploy a new version of your app.
(Old question, but I recently ran into something similar and would like to document this.)
All I just received a similar crash with a UIPicker. Turns out that I forgot to set the delegate to nil before deallocating it. The problem only presented when running with breakpoints enabled. Hope this helps someone else.
Try removing arm64 from:
Project > BuildSettings > Architectures> Valid Architectures
and rebuilding you app.
You might also need to set Build Active Architectures Only to NO for it to work.