Crash with UITabBarController - ios

Sometimes I have strange crash when I switch from one tab to another:
0 libobjc.A.dylib 0x3857e636 objc_msgSend + 22
1 UIKit 0x3024ca89 -[UIResponder(Internal) _canBecomeFirstResponder] + 21
2 UIKit 0x3024c7a3 -[UIResponder becomeFirstResponder] + 207
3 UIKit 0x3024caff -[UIView(Hierarchy) becomeFirstResponder] + 107
4 UIKit 0x302c946b -[UITextField becomeFirstResponder] + 47
5 UIKit 0x302ca345 -[UIView(Hierarchy) deferredBecomeFirstResponder] + 57
6 UIKit 0x301cd441 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 165
7 Foundation 0x2e304d33 -[NSISEngine withBehaviors:performModifications:] + 211
8 UIKit 0x301cd291 -[UIView(Hierarchy) _postMovedFromSuperview:] + 297
9 UIKit 0x301da01d -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1413
10 UIKit 0x301d9a93 -[UIView(Hierarchy) addSubview:] + 31
11 UIKit 0x302bb563 -[UITransitionView transition:fromView:toView:removeFromView:] + 979
12 UIKit 0x302fb783 -[UITransitionView transition:fromView:toView:] + 31
13 UIKit 0x302fb759 -[UITransitionView transition:toView:] + 105
14 UIKit 0x302fa87b -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 1107
15 UIKit 0x302fa41f -[UITabBarController transitionFromViewController:toViewController:] + 39
16 UIKit 0x302fa2f7 -[UITabBarController _setSelectedViewController:] + 259
17 UIKit 0x303c45c9 -[UITabBarController _tabBarItemClicked:] + 273
18 UIKit 0x302036c7 -[UIApplication sendAction:to:from:forEvent:] + 91
19 UIKit 0x30203663 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 39
20 UIKit 0x303c447f -[UITabBar _sendAction:withEvent:] + 371
21 UIKit 0x302036c7 -[UIApplication sendAction:to:from:forEvent:] + 91
22 UIKit 0x30203663 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 39
23 UIKit 0x30203633 -[UIControl sendAction:to:forEvent:] + 47
24 UIKit 0x301eed7b -[UIControl _sendActionsForEvents:withEvent:] + 375
25 UIKit 0x303c41a7 -[UITabBar(Static) _buttonUp:] + 119
26 UIKit 0x302036c7 -[UIApplication sendAction:to:from:forEvent:] + 91
27 UIKit 0x30203663 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 39
28 UIKit 0x30203633 -[UIControl sendAction:to:forEvent:] + 47
29 UIKit 0x301eed7b -[UIControl _sendActionsForEvents:withEvent:] + 375
30 UIKit 0x3020307b -[UIControl touchesEnded:withEvent:] + 595
31 UIKit 0x30202d4d -[UIWindow _sendTouchesForEvent:] + 529
32 UIKit 0x301fdca7 -[UIWindow sendEvent:] + 759
33 UIKit 0x301d2e75 -[UIApplication sendEvent:] + 197
34 UIKit 0x301d1541 _UIApplicationHandleEventQueue + 7121
Maybe for someone this will look familiar and he could help to understand root of problem.

I got the same crash log.And my reason is the view controller is released but the UITextField.delegate is not setting nil. So you can set UITextField.delegate = nil in dealloc of the view controller.

Related

UITableView tableHeaderView crash using beginUpdates/endUpdates settings

When I was setting UITableView tableHeaderView using beginUpdates&endUpdates,every day there will be dozens of crash in line 259
code:
[self.tableView beginUpdates];
self.tableView.tableHeaderView=self.topView;
[self.tableView endUpdates]; // line 259 crash
Below is the crash information:
13 UIKit 0x18fe43090 UIViewAlertForUnsatisfiableConstraints + 66
14 Foundation 0x18a0b94cc -[NSISEngine handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 464
15 Foundation 0x18a099df8 -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 384
16 Foundation 0x18a0959c4 -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 688
17 Foundation 0x18a0955cc -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 284
18 Foundation 0x18a0931e0 -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 272
19 UIKit 0x18f5ee400 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 396
20 Foundation 0x18a092d10 -[NSISEngine withBehaviors:performModifications:] + 168
21 UIKit 0x18f5ee20c __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 564
22 UIKit 0x18f4eab14 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 224
23 UIKit 0x18f5ee338 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 196
24 Foundation 0x18a092d10 -[NSISEngine withBehaviors:performModifications:] + 168
25 UIKit 0x18f5ee20c __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 564
26 UIKit 0x18f4eab14 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 224
27 UIKit 0x18f62bcf0 -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 460
28 UIKit 0x18f5eb334 -[UIView(AdditionalLayoutSupport) _layoutEngineCreateIfNecessary] + 64
29 UIKit 0x18f5eafc8 -[UIView(UIConstraintBasedLayout) _tryToAddConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 132
30 UIKit 0x18f5eed28 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 872
31 UIKit 0x18fe3f1f8 -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 116
32 UIKit 0x18f5f05a8 -[UIButton updateConstraints] + 3412
33 UIKit 0x18fe3de80 -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 192
34 UIKit 0x18fe3e1d0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 632
35 UIKit 0x18fe3e158 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 512
36 UIKit 0x18fe3e158 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 512
37 UIKit 0x18fe3e974 __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 84
38 UIKit 0x18fe3db30 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 136
39 UIKit 0x18fe3e580 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 164
40 UIKit 0x18fe3f58c -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 372
41 UIKit 0x18f500328 -[UIView(Hierarchy) layoutBelowIfNeeded] + 544
42 UIKit 0x18f4fc7dc +[UIView(Animation) performWithoutAnimation:] + 104
43 UIKit 0x18f821b2c __46-[UITableView _updateWithItems:updateSupport:]_block_invoke.996 + 1984
44 UIKit 0x18f5240f0 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 636
Just remove [self.tableView beginUpdates];and[self.tableView endUpdates];
how are you setting the constraints on self.topView ? Looking at the stacktrace, it seems like the system cannot satisfy all the constraints. I would look at topView and make sure that all the constraints are valid.

Foundation -[NSConcreteMapTable assign:key:value:isNew:] Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS at

I have a crash that happens only in IOS 7, I cannot reproduce it but it happens a lot. Does some one have an answer or at least have any idea where the problem can be.
I've allready removed all the warnings regarding ios7 and the crash still occurs.
Log is attached.
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x3b43c626 objc_msgSend + 5
1 Foundation 0x315a9681 -[NSConcreteMapTable assign:key:value:isNew:] + 68
2 Foundation 0x315a95fb -[NSConcreteMapTable setObject:forKey:] + 82
3 Foundation 0x315ecaf7 -[NSISEngine setRowWithHead:body:] + 30
4 Foundation 0x315ef5d1 -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 388
5 Foundation 0x315ed325 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 236
6 Foundation 0x315efd9f -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 226
7 Foundation 0x315eb5fd -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 692
8 Foundation 0x315eb23b -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 286
9 Foundation 0x315e8f6d -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 232
10 Foundation 0x315f47ed -[NSLayoutConstraint _addToEngine:] + 28
11 UIKit 0x33591c55 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 332
12 Foundation 0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
13 UIKit 0x33591ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
14 UIKit 0x3349e20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
15 UIKit 0x33591bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
16 Foundation 0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
17 UIKit 0x33591ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
18 UIKit 0x3349e20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
19 UIKit 0x33591bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
20 Foundation 0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
21 UIKit 0x33591ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
22 UIKit 0x3349e20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
23 UIKit 0x33591bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
24 Foundation 0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
25 UIKit 0x33591ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
26 UIKit 0x3349e20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
27 UIKit 0x3349de33 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 82
28 Foundation 0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
29 UIKit 0x3349dcd3 -[UIView(Hierarchy) _postMovedFromSuperview:] + 298
30 UIKit 0x334aaa4f -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1414
31 UIKit 0x334aa4bf -[UIView(Hierarchy) addSubview:] + 30
32 UIKit 0x3358bdb7 -[UITransitionView transition:fromView:toView:removeFromView:] + 978
33 UIKit 0x335cbf3f -[UITransitionView transition:fromView:toView:] + 30
34 UIKit 0x335cbf15 -[UITransitionView transition:toView:] + 104
35 UIKit 0x335cb03b -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 1106
36 UIKit 0x335cabdf -[UITabBarController transitionFromViewController:toViewController:] + 38
37 UIKit 0x335caab7 -[UITabBarController _setSelectedViewController:] + 258
38 UIKit 0x33694dd5 -[UITabBarController _tabBarItemClicked:] + 272
39 UIKit 0x334d4037 -[UIApplication sendAction:to:from:forEvent:] + 90
40 UIKit 0x334d3fd7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
41 UIKit 0x33694c8b -[UITabBar _sendAction:withEvent:] + 370
42 UIKit 0x334d4037 -[UIApplication sendAction:to:from:forEvent:] + 90
43 UIKit 0x334d3fd7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
44 UIKit 0x334d3fb1 -[UIControl sendAction:to:forEvent:] + 44
45 UIKit 0x334bf717 -[UIControl _sendActionsForEvents:withEvent:] + 374
46 UIKit 0x336949ab -[UITabBar(Static) _buttonUp:] + 118
47 UIKit 0x334d4037 -[UIApplication sendAction:to:from:forEvent:] + 90
48 UIKit 0x334d3fd7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
49 UIKit 0x334d3fb1 -[UIControl sendAction:to:forEvent:] + 44
50 UIKit 0x334bf717 -[UIControl _sendActionsForEvents:withEvent:] + 374
51 UIKit 0x334d3a2f -[UIControl touchesEnded:withEvent:] + 590
52 UIKit 0x334d3701 -[UIWindow _sendTouchesForEvent:] + 528
53 UIKit 0x334ce6cb -[UIWindow sendEvent:] + 758
54 UIKit 0x334a38cd -[UIApplication sendEvent:] + 196
55 UIKit 0x334a1f77 _UIApplicationHandleEventQueue + 7102
56 CoreFoundation 0x30c4d20b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
57 CoreFoundation 0x30c4c6db __CFRunLoopDoSources0 + 206
58 CoreFoundation 0x30c4aecf __CFRunLoopRun + 622
59 CoreFoundation 0x30bb5ebf CFRunLoopRunSpecific + 522
60 CoreFoundation 0x30bb5ca3 CFRunLoopRunInMode + 106
61 GraphicsServices 0x35abb663 GSEventRunModal + 138
62 UIKit 0x3350214d UIApplicationMain + 1136
I get the same issue. The strange thing is it only occurs in 3.5inch devices (ip4, ip4S), os7.x. works fine on ip5.
UPDATE: our team found the root cause. It's because we use this animation in code.
[UIView animateWithDuration:0.4f delay:0 usingSpringWithDamping:0.5f initialSpringVelocity:0.3f options:UIViewAnimationOptionCurveEaseOut animations:^{
self.transform = CGAffineTransformMakeScale(sx,sy);
} completion:^(BOOL finished) {
self.hidden = !visible;
}];
to fix the bug, we avoid to run the animation if iOS <8.0
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1) {
[UIView animateWithDuration:0.4f delay:0 usingSpringWithDamping:0.5f initialSpringVelocity:0.3f options:UIViewAnimationOptionCurveEaseOut animations:^{
self.transform = CGAffineTransformMakeScale(sx,sy);
} completion:^(BOOL finished) {
if (finished) {
self.hidden = !visible;
}
}];
} else {
self.transform = CGAffineTransformMakeScale(sx,sy);
self.hidden = !visible;
}
Hope this help!
Thanks for who ever responded.
I solved it by removing the keyboard (resignFirstResponder) before poping the view controller.
In that screen I had 2 textfields that one of them was connected to the keyboard(inpuAccessoryView)and the other just activated the first one (I was developing a chat), when poping the view controller something probably went wrong.
Hope this will help someone.
I had a similar crash, except it happened when I did removeFromSuperview on a UIView that was created while inside a network callback. [NSISEngine withBehaviors:performModifications:] was where it started to go wrong after removeFromSuperview
eg. inside handleReadStreamEvent
if (!CFReadStreamSetClient( inputStream, kCFStreamEventHasBytesAvailable | kCFStreamEventErrorOccurred | kCFStreamEventEndEncountered | kCFStreamEventOpenCompleted
, handleReadStreamEvent, &context ) )
It seems any view that was created while inside this callback, crashed when it was removed from the superview - most of the time.
I ended up using this whenever I was making any UIView changes when inside the callback.
- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay;
The same happened when inside a looptimer callback
CFRunLoopAddTimer( CFRunLoopGetMain(), timeoutTimer, kCFRunLoopCommonModes);

Crash on iOS 7: [NSConcreteMapTable assign:key:value:isNew:]

I get the next line on the crash log:
[NSConcreteMapTable assign:key:value:isNew:]
This crash happens on iOS 7, but not on iOS 8.
Somewhere before this line there are calls for NSLayoutConstraint:
-[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:]
-[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:]
-[NSLayoutConstraint _addToEngine:]
Do you guys think this crash has something to do with the Storyboard layout constraint I have set?
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x3b46d626 objc_msgSend + 5
1 Foundation 0x315da681 -[NSConcreteMapTable assign:key:value:isNew:] + 68
2 Foundation 0x315da5fb -[NSConcreteMapTable setObject:forKey:] + 82
3 Foundation 0x3161daf7 -[NSISEngine setRowWithHead:body:] + 30
4 Foundation 0x316205d1 -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 388
5 Foundation 0x3161e325 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 236
6 Foundation 0x31620d9f -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 226
7 Foundation 0x3161c5fd -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 692
8 Foundation 0x3161c23b -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 286
9 Foundation 0x31619f6d -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 232
10 Foundation 0x316257ed -[NSLayoutConstraint _addToEngine:] + 28
11 UIKit 0x335c2c55 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 332
12 Foundation 0x31619b2b -[NSISEngine withBehaviors:performModifications:] + 210
13 UIKit 0x335c2ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
14 UIKit 0x334cf20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
15 UIKit 0x335c2bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
16 Foundation 0x31619b2b -[NSISEngine withBehaviors:performModifications:] + 210
17 UIKit 0x335c2ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
18 UIKit 0x334cf20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
19 UIKit 0x335c2bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
20 Foundation 0x31619b2b -[NSISEngine withBehaviors:performModifications:] + 210
21 UIKit 0x335c2ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
22 UIKit 0x334cf20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
23 UIKit 0x335c2bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
24 Foundation 0x31619b2b -[NSISEngine withBehaviors:performModifications:] + 210
25 UIKit 0x335c2ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
26 UIKit 0x334cf20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
27 UIKit 0x334cee33 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 82
28 Foundation 0x31619b2b -[NSISEngine withBehaviors:performModifications:] + 210
29 UIKit 0x334cecd3 -[UIView(Hierarchy) _postMovedFromSuperview:] + 298
30 UIKit 0x334dba4f -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1414
31 UIKit 0x334db4bf -[UIView(Hierarchy) addSubview:] + 30
32 UIKit 0x335bcdb7 -[UITransitionView transition:fromView:toView:removeFromView:] + 978
33 UIKit 0x335fcf3f -[UITransitionView transition:fromView:toView:] + 30
34 UIKit 0x335fcf15 -[UITransitionView transition:toView:] + 104
35 UIKit 0x335fc03b -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 1106
36 UIKit 0x335fbbdf -[UITabBarController transitionFromViewController:toViewController:] + 38
37 UIKit 0x335fbab7 -[UITabBarController _setSelectedViewController:] + 258
38 UIKit 0x336c5dd5 -[UITabBarController _tabBarItemClicked:] + 272
39 UIKit 0x33505037 -[UIApplication sendAction:to:from:forEvent:] + 90
40 UIKit 0x33504fd7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
41 UIKit 0x336c5c8b -[UITabBar _sendAction:withEvent:] + 370
42 UIKit 0x33505037 -[UIApplication sendAction:to:from:forEvent:] + 90
43 UIKit 0x33504fd7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
44 UIKit 0x33504fb1 -[UIControl sendAction:to:forEvent:] + 44
45 UIKit 0x334f0717 -[UIControl _sendActionsForEvents:withEvent:] + 374
46 Foundation 0x31693163 __NSFireDelayedPerform + 414
47 CoreFoundation 0x30c7e167 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
48 CoreFoundation 0x30c7dd7f __CFRunLoopDoTimer + 782
49 CoreFoundation 0x30c7c11b __CFRunLoopRun + 1210
50 CoreFoundation 0x30be6ebf CFRunLoopRunSpecific + 522
51 CoreFoundation 0x30be6ca3 CFRunLoopRunInMode + 106
52 GraphicsServices 0x35aec663 GSEventRunModal + 138
53 UIKit 0x3353314d UIApplicationMain + 1136
seems like your using iOS 8 only constraints go to the storyboard open it on the top left corner you will see a little yellow icon with reading mark on it press on it and search for iOS8 only warnings, if you find any remove those constraints and rebuild your application.

SpriteKit crash on transitionWithView

I have several crash reports with Collection <__NSArrayM: 0x12345678> was mutated while being enumerated. However in my testing I cannot reproduce the error.
This seems be triggered via a chain of events when I transition to a different SKView.
[UIView transitionWithView:window
duration:0.8
options:UIViewAnimationOptionTransitionFlipFromBottom
animations:^{
[UIView setAnimationsEnabled:NO];
[fromView removeFromSuperview];
[window addSubview:toView];
window.rootViewController = nextViewController;
[UIView setAnimationsEnabled:YES];
}
completion:NULL];
I have read that this error can happen when you remove nodes from their parent during enumeration of child nodes but I don't believe I am doing this here, and the full stack trace below doesn't seem to indicate it either.
I don't know why [SKNode setPaused:] would cause child nodes to be added or removed, and there doesn't appear to be any indication of this happening in other threads either.
Full Stacktrace
0 CoreFoundation 0x2f896fd3 __exceptionPreprocess + 131
1 libobjc.A.dylib 0x3a37bccf objc_exception_throw + 36
2 CoreFoundation 0x2f896ad1 __NSFastEnumerationMutationHandler + 126
3 SpriteKit 0x31fb926b -[SKNode setPaused:] + 792
4 SpriteKit 0x31f95309 -[SKScene setPaused:] + 134
5 SpriteKit 0x31fa7b63 -[SKView renderCallback:] + 648
6 SpriteKit 0x31fa9301 -[SKView layoutSubviews] + 474
7 UIKit 0x320b2d79 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 378
8 QuartzCore 0x31d3062b -[CALayer layoutSublayers] + 140
9 QuartzCore 0x31d2be3b _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 348
10 QuartzCore 0x31d5acdd -[CALayer layoutIfNeeded] + 138
11 UIKit 0x3212f183 -[UIViewController window:setupWithInterfaceOrientation:] + 240
12 UIKit 0x3212d7a3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 3496
13 UIKit 0x3212c9f3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 44
14 UIKit 0x3212c97b -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 92
15 UIKit 0x3212c913 -[UIWindow _setRotatableViewOrientation:duration:force:] + 40
16 UIKit 0x32124f89 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 106
17 UIKit 0x320b9127 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 380
18 UIKit 0x3212c661 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 694
19 UIKit 0x3212c125 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 162
20 UIKit 0x320be065 -[UIWindow addRootViewControllerViewIfPossible] + 458
21 UIKit 0x32124133 -[UIWindow setRootViewController:] + 760
22 the-app 0x000baf0d 0x000b2000 + 36621
23 UIKit 0x320e83c5 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 494
24 UIKit 0x3234c3f9 +[UIView(UIViewAnimationWithBlocks) transitionWithView:duration:options:animations:completion:] + 58
25 the-app 0x000bae67 0x000b2000 + 36455
26 the-app 0x000bacf7 0x000b2000 + 36087
27 UIKit 0x320e8057 -[UIApplication sendAction:to:from:forEvent:] + 88
28 UIKit 0x320e7ff7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 28
29 UIKit 0x320e7fd1 -[UIControl sendAction:to:forEvent:] + 42
30 UIKit 0x320d3737 -[UIControl _sendActionsForEvents:withEvent:] + 372
31 UIKit 0x320e7a4f -[UIControl touchesEnded:withEvent:] + 588
32 UIKit 0x320e7721 -[UIWindow _sendTouchesForEvent:] + 526
33 UIKit 0x320e26eb -[UIWindow sendEvent:] + 756
34 UIKit 0x320b78ed -[UIApplication sendEvent:] + 194
35 UIKit 0x320b5f97 _UIApplicationHandleEventQueue + 7100
36 CoreFoundation 0x2f86225b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
37 CoreFoundation 0x2f86172b __CFRunLoopDoSources0 + 204
38 CoreFoundation 0x2f85ff1f __CFRunLoopRun + 620
39 CoreFoundation 0x2f7caf0f CFRunLoopRunSpecific + 520
40 CoreFoundation 0x2f7cacf3 CFRunLoopRunInMode + 104
41 GraphicsServices 0x346c4663 GSEventRunModal + 136
42 UIKit 0x3211616d UIApplicationMain + 1134
43 the-app 0x000b9267 0x000b2000 + 29287
44 libdyld.dylib 0x3a888ab7 start + 0

iOS Unknown Signal crash: Where to start?

I've received this crash report from TestFlight, but I've been unable to duplicate the crash in my own environment, and from the stack trace it doesn't seem to reference my own code at all. Any help in finding a jump off point for where to look would help, even if it's just advice on how to figure it out on my own.
Error: Unknown Signal
0 MyApp 0x000f3e96 testflight_backtrace + 142
1 MyApp 0x000f4a24 TFSignalHandler + 212
2 libsystem_c.dylib 0x36dbe7ec _sigtramp + 48
3 UIKit 0x32100f0e -[UIImageView(UIImageViewInternal) _canDrawContent] + 78
4 UIKit 0x320e530c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 940
5 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
6 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
7 UIKit 0x3210a8e2 -[UIScrollView _didMoveFromWindow:toWindow:] + 54
8 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
9 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
10 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
11 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
12 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
13 UIKit 0x320e4eec -[UIView(Hierarchy) _postMovedFromSuperview:] + 140
14 UIKit 0x320e59b4 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1168
15 UIKit 0x320e551e -[UIView(Hierarchy) addSubview:] + 30
16 UIKit 0x3217c1a4 -[UITransitionView transition:fromView:toView:] + 980
17 UIKit 0x3217bdc8 -[UITransitionView transition:toView:] + 104
18 UIKit 0x3217b994 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 524
19 UIKit 0x3217b782 -[UITabBarController transitionFromViewController:toViewController:] + 30
20 UIKit 0x3217b0bc -[UITabBarController _setSelectedViewController:] + 300
21 UIKit 0x322045d8 -[UITabBarController _tabBarItemClicked:] + 344
22 CoreFoundation 0x3501e3fc -[NSObject performSelector:withObject:withObject:] + 52
23 UIKit 0x320fdfae -[UIApplication sendAction:to:from:forEvent:] + 62
24 UIKit 0x320fdf6a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
25 UIKit 0x3220445c -[UITabBar _sendAction:withEvent:] + 352
26 CoreFoundation 0x3501e3fc -[NSObject performSelector:withObject:withObject:] + 52
27 UIKit 0x320fdfae -[UIApplication sendAction:to:from:forEvent:] + 62
28 UIKit 0x320fdf6a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
29 UIKit 0x320fdf48 -[UIControl sendAction:to:forEvent:] + 44
30 UIKit 0x320fdcb8 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
31 UIKit 0x322041ec -[UITabBar(Static) _buttonUp:] + 116
32 CoreFoundation 0x3501e3fc -[NSObject performSelector:withObject:withObject:] + 52
33 UIKit 0x320fdfae -[UIApplication sendAction:to:from:forEvent:] + 62
34 UIKit 0x320fdf6a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
35 UIKit 0x320fdf48 -[UIControl sendAction:to:forEvent:] + 44
36 UIKit 0x320fdcb8 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
37 UIKit 0x320fe5f0 -[UIControl touchesEnded:withEvent:] + 476
38 UIKit 0x320fcad2 -[UIWindow _sendTouchesForEvent:] + 318
39 UIKit 0x320fc4c0 -[UIWindow sendEvent:] + 380
40 UIKit 0x320e283c -[UIApplication sendEvent:] + 356
41 UIKit 0x320e20e2 _UIApplicationHandleEvent + 5826
42 GraphicsServices 0x3631722a PurpleEventCallback + 882
43 CoreFoundation 0x35098522 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
44 CoreFoundation 0x350984c4 __CFRunLoopDoSource1 + 140
45 CoreFoundation 0x35097312 __CFRunLoopRun + 1370
46 CoreFoundation 0x3501a4a4 CFRunLoopRunSpecific + 300
47 CoreFoundation 0x3501a36c CFRunLoopRunInMode + 104
48 GraphicsServices 0x36316438 GSEventRunModal + 136
49 UIKit 0x32110e7c UIApplicationMain + 1080
50 WiseLaw 0x0009365e main (main.m:14)
51 WiseLaw 0x00093617 start + 39
As a vague hint, it might be caused when selecting a tab in UITabViewController and subsequently drawing a UIImageView. Maybe you are referencing a zombie object somewhere.
The stack trace you have doesn't help a lot, try to get the original iOS crash report from the device. The crash could also have been triggered on another thread.
You might want to try a crash reporting solution based on the PLCrashReporter framework, which will show you all threads and also shows the Last Exception Backtrace, if the crash is actually caused by an exception and re-thrown into another runloop. The project page shows some open source and hosted solutions that are based on it: http://code.google.com/p/plcrashreporter/
These link might help in resolving the crash
http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1
http://www.raywenderlich.com/10505/my-app-crashed-now-what-part-2
Try to use DDLog instead of nslog ,It helps in tracking bugs
Link for DDLog sample code:=
https://github.com/robbiehanson/CocoaLumberjack

Resources