Presence of UITextField and Pixate Freestyle Crashes on iOS 9 - ios

All of my view controllers that contain UITextField objects crash with the following on iOS 9 in the Simulator:
-[UITextField preventStyling]: unrecognized selector sent to instance 0x7fa8b96d6330
Failed to set (styleClass) user defined inspected property on (UITextField): -[UITextField preventStyling]: unrecognized selector sent to instance 0x7fa8b96d6330
Anyone else running into this with Pixate Freestyle? Any ideas? I logged an issue on the GitHub repo, but it doesn't appear anyone is monitoring those: https://github.com/Pixate/pixate-freestyle-ios/issues/186
Below is the full stack trace:
0 CoreFoundation 0x000000010749cf65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106f14deb objc_exception_throw + 48
2 CoreFoundation 0x00000001074a558d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001073f2d97 ___forwarding___ + 487
4 CoreFoundation 0x00000001073f2b28 _CF_forwarding_prep_0 + 120
5 PilotPro 0x000000010438a3c0 -[PXVirtualStyleableControl preventStyling] + 85
6 PilotPro 0x000000010436a0fc +[PXStyleUtils updateStyleForStyleable:] + 83
7 PilotPro 0x00000001043812d8 -[UIView(PXStyling) updateStyles] + 317
8 CoreFoundation 0x000000010738b85c __invoking___ + 140
9 CoreFoundation 0x000000010749df49 -[NSInvocation invokeUsingIMP:] + 217
10 UIKit 0x0000000105d0d773 __workaround10030904InvokeWithTarget_block_invoke + 84
11 UIKit 0x00000001056b5fe1 +[UIView _performSystemAppearanceModifications:] + 66
12 UIKit 0x0000000105d0d70d workaround10030904InvokeWithTarget + 1053
13 UIKit 0x0000000105d07995 applyInvocationsToTarget + 1864
14 UIKit 0x0000000105d06aac +[_UIAppearance _applyInvocationsTo:window:matchingSelector:onlySystemInvocations:] + 1888
15 UIKit 0x00000001056d8a36 __88-[UIView(Internal) _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:]_block_invoke + 64
16 UIKit 0x00000001056d89c0 -[UIView(Internal) _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:] + 189
17 UIKit 0x00000001056d88d6 -[UIView(Internal) _didChangeFromIdiomOnScreen:traverseHierarchy:] + 182
18 UIKit 0x00000001056d7ea3 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1743
19 UIKit 0x0000000105792b41 -[UIControl _didMoveFromWindow:toWindow:] + 68
20 UIKit 0x00000001056d7b32 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 862
21 UIKit 0x00000001056d7b32 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 862
22 UIKit 0x00000001056ec7d0 -[UIScrollView _didMoveFromWindow:toWindow:] + 85
23 UIKit 0x00000001056d7b32 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 862
24 UIKit 0x00000001056d7b32 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 862
25 UIKit 0x00000001056ec7d0 -[UIScrollView _didMoveFromWindow:toWindow:] + 85
26 UIKit 0x00000001056d7b32 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 862
27 UIKit 0x00000001056d7b32 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 862
28 UIKit 0x00000001056cd106 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 155
29 UIKit 0x00000001056cd005 -[UIView(Hierarchy) _postMovedFromSuperview:] + 544
30 UIKit 0x00000001056daac3 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1967
31 UIKit 0x0000000105a83212 -[UINavigationTransitionView transition:fromView:toView:] + 672
32 UIKit 0x00000001057fd27d -[UINavigationController _startTransition:fromViewController:toViewController:] + 3262
33 UIKit 0x00000001057fd879 -[UINavigationController _startDeferredTransitionIfNeeded:] + 890
34 UIKit 0x00000001057fe67d -[UINavigationController __viewWillLayoutSubviews] + 57
35 UIKit 0x000000010599663d -[UILayoutContainerView layoutSubviews] + 248
36 PilotPro 0x00000001043a6825 callSuper0 + 55
37 PilotPro 0x000000010438b259 -[PXUIView layoutSubviews] + 47
38 UIKit 0x00000001056de11c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
39 QuartzCore 0x00000001053ab36a -[CALayer layoutSublayers] + 146
40 QuartzCore 0x000000010539fbd0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
41 QuartzCore 0x000000010539fa4e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
42 QuartzCore 0x00000001053941d5 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
43 QuartzCore 0x00000001053c19f0 _ZN2CA11Transaction6commitEv + 508
44 QuartzCore 0x00000001053c2154 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
45 CoreFoundation 0x00000001073c89d7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
46 CoreFoundation 0x00000001073c8947 __CFRunLoopDoObservers + 391
47 CoreFoundation 0x00000001073bdebc CFRunLoopRunSpecific + 524
48 UIKit 0x000000010562898d -[UIApplication _run] + 402
49 UIKit 0x000000010562d676 UIApplicationMain + 171
50 PilotPro 0x000000010417cf84 main + 132
51 libdyld.dylib 0x000000010798892d start + 1

This is a Copy & paste of my solution: https://github.com/Pixate/pixate-freestyle-ios/issues/192
Hi folks,
Like other people, i had several problems with PixateFreestyle framework when i upgraded to Xcode to 7 and Mac OS X El capitan.
After some days researching, i decided to compile my own version of PixateFreestyle framework in order to avoid this problems.
You have my version here: https://www.dropbox.com/s/9cz035h67y9x7fd/PixateFreestyle.framework.zip?dl=0
If you add this framework to your project, when you execute Simulator or create an archive with bitcode enabled all will works like a charm.
If you want to build your own PixateFreestyle framework from source code, follow this steps:
Download the project from github
Fix the callSuper1v issue: #186
Build a universal framework with a custom script
Add bitcode support in build process [optional]
Add resulting framework to your project
Regards.

I have also run into this problem and my solution, far from perfect, is working :D
From this post, I have been able to fix three problems: The preventStyling, playsNicelyWithGestures and _isInteractiveTextSelectionDisabled selector errors. Moreover, I had to add one more function: requiresKeyEvents.
With this, problem solved :D
Thank you :)

While Pixate is no longer supported, a new framework named StylingKit is. StylingKit uses all of Pixate's code in the background so all of your methods should still work and it will not run into any iOS 9 issues.
The exception to this rule is any Pixate static methods like [PixateFreestyle updateStylesForAllViews]. In this case, you can create accessor methods in the StylingKit.m and StylingKit.h files to use the hidden PixateFreestyle functions.
For example if your project relies on updating CSS themes through [PixateFreestyle updateStylesForAllViews], you can create a new method declaration in StylingKit.h like:
#interface StylingKit : NSObject
-(void)PixateUpdateStylesForAllViews;
-(void)OtherHiddenPixateMethod;
Then implement those methods in the StylingKit.m file.
#implementation StylingKit
-(void)PixateUpdate
{
[PixateFreestyle updateStylesForAllViews];
}
-(void)OtherHiddenPixateMethod
{
//Your PixateFreeStyle code here
}
Finally you can call these methods from your project with
[[StylingKit sharedKit] PixateUpdate];
[[StylingKit sharedKit] OtherHiddenPixateMethod];

Related

App crashes with "Could not instantiate class named _UIScrollViewLayoutGuide" on iOS 10 and older

I have been getting the below error and none of the existing Stack Overflow answers helped. I am poor at finding the exact location where error is formed by looking console results.
This is the error I get when I run in older devices (works fine in newer devices). What things can I try to determine the problem?
2019-12-30 16:52:04.784 Hospital[7075:164758] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIScrollViewLayoutGuide'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ad9fb0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010a804141 objc_exception_throw + 48
2 CoreFoundation 0x000000010ae08625 +[NSException raise:format:] + 197
3 UIKit 0x000000010c15368d UINibDecoderDecodeObjectForValue + 323
4 UIKit 0x000000010c15353f -[UINibDecoder decodeObjectForKey:] + 89
5 Foundation 0x0000000109b0e417 -[NSLayoutConstraint initWithCoder:] + 757
6 UIKit 0x000000010c1537ff UINibDecoderDecodeObjectForValue + 693
7 UIKit 0x000000010c15399d UINibDecoderDecodeObjectForValue + 1107
8 UIKit 0x000000010c15353f -[UINibDecoder decodeObjectForKey:] + 89
9 UIKit 0x000000010bbee9de -[UIView initWithCoder:] + 2209
10 UIKit 0x000000010bc29687 -[UIScrollView initWithCoder:] + 71
11 UIKit 0x000000010c1537ff UINibDecoderDecodeObjectForValue + 693
12 UIKit 0x000000010c15399d UINibDecoderDecodeObjectForValue + 1107
13 UIKit 0x000000010c15353f -[UINibDecoder decodeObjectForKey:] + 89
14 UIKit 0x000000010bbee4ed -[UIView initWithCoder:] + 944
15 UIKit 0x000000010c1537ff UINibDecoderDecodeObjectForValue + 693
16 UIKit 0x000000010c15353f -[UINibDecoder decodeObjectForKey:] + 89
17 UIKit 0x000000010bf62f70 -[UIRuntimeConnection initWithCoder:] + 178
18 UIKit 0x000000010c1537ff UINibDecoderDecodeObjectForValue + 693
19 UIKit 0x000000010c15399d UINibDecoderDecodeObjectForValue + 1107
20 UIKit 0x000000010c15353f -[UINibDecoder a:] + 89
21 UIKit 0x000000010bf6216d -[UINib instantiateWithOwner:options:] + 1262
22 UIKit 0x000000010bcfcfc3 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
23 UIKit 0x000000010bcfd8d9 -[UIViewController loadView] + 177
24 UIKit 0x000000010bcfdc0a -[UIViewController loadViewIfRequired] + 195
25 UIKit 0x000000010bcfe45a -[UIViewController view] + 27
26 Hospital 0x00000001086ecb00 $s15_Hospital15PagerScrollViewC03setcdE010toParentVC05pagesI0ySo16UIViewControllerC_SayAHGSgtF + 1152
27 Hospital 0x00000001086f6b85 $s15_Hospital22HomeMainViewControllerC11viewDidLoadyyF + 3861
28 Hospital 0x00000001086f6e9b $s15_Hospital22HomeMainViewControllerC11viewDidLoadyyFTo + 43
29 UIKit 0x000000010bcfe01a -[UIViewController loadViewIfRequired] + 1235
30 UIKit 0x000000010bd3ce6c -[UINavigationController _layoutViewController:] + 56
31 UIKit 0x000000010bd3d74a -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 466
32 UIKit 0x000000010bd3d8bb -[UINavigationController _startTransition:fromViewController:toViewController:] + 127
33 UIKit 0x000000010bd3ea03 -[UINavigationController _startDeferredTransitionIfNeeded:] + 843
34 UIKit 0x000000010bd3fb41 -[UINavigationController __viewWillLayoutSubviews] + 58
35 UIKit 0x000000010bf3160c -[UILayoutContainerView layoutSubviews] + 231
36 UIKit 0x000000010bc1e55b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
37 QuartzCore 0x000000010a572904 -[CALayer layoutSublayers] + 146
38 QuartzCore 0x000000010a566526 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 370
39 QuartzCore 0x000000010a5663a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
40 QuartzCore 0x000000010a4f5e92 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
41 QuartzCore 0x000000010a522130 _ZN2CA11Transaction6commitEv + 468
42 QuartzCore 0x000000010a522b37 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 115
43 CoreFoundation 0x000000010ad45717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
44 CoreFoundation 0x000000010ad45687 __CFRunLoopDoObservers + 391
45 CoreFoundation 0x000000010ad2a038 CFRunLoopRunSpecific + 440
46 UIKit 0x000000010bb5508f -[UIApplication _run] + 468
47 UIKit 0x000000010bb5b134 UIApplicationMain + 159
48 Hospital 0x000000010872773b main + 75
49 libdyld.dylib 0x000000010e5d965d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I had the same issue (using Xcode11 and running iOS 10.3.1).
Unchecking Content Layout Guides from the Scroll View worked for me.
image
Thanks to #Luke's answer I've found the exact reason of the problem: it is caused by constraints between any item and scroll view's Content Layout Guide.
So to find where the problem one needs to:
check the log to find out which view controller participates in the problem. According to the log shown by #Jaseel.Dev it is "Alexis_Hospital"
In that view controller in Interface Builder check all scroll views and their Content Layout Guides or Frame Layout Guides
There 2 ways to fix:
a) click on the scroll view, there Uncheck [ ] Content Layout Guides and check them again (Interface Builder will reassign the "layout guide" edges to "superview")
b) click on the Content Autolayout Guide and check if there any constraints pointing to them. Get rid of those constraints.
The main idea is to remove these constrains, which would crash on iOS 10 and earlier.
Please check following things in your source code:
Check if your Xib or Storyboard file has warnings with IBOutlet or
IBAction connection.
It looks like the error should be in your Xib or Storyboard since the error log backtraces shows error at UINibDecoder.
UILayoutGuide is available from iOS 9.0+, so check your app's deployment target which should be iOS 9 or above.
Also you have mentioned that you are seeing this issue only in older devices which may run with less than iOS 9.
Uncheck "Use Safe Area Layout Guides" option in the File Inspector in Xcode.
Finally check your previous working version of source code and compare the recent changes with error codebase to determine the reason for crash.

EXC_BREAKPOINT on different versions of iOS

My app keeps crashing in 2 different places in any version that is lower than iOS 11.
One of the crashes is an EXC_BREAKPOINT that breaks on the appDelegate class defining line - class AppDelegate: UIResponder, UIApplicationDelegate {}
While the other crashes with EXC_BREAKPOINT on a simple segmentedControl?.removeAllSegments() (and yes I checked if the segmentedControl is empty; its not).
Whats interesting is that I never had this issue so much as 2/3 weeks ago, and I know for a fact that I changed no line of code from those 2 places.
The debugger just says this : "-[UILayoutGuide nsli_superitem]: message sent to deallocated instance 0x600000386db0"
Here is the stack trace:
0 0x000000010a79c92e _T09 30SegmentedControlViewControllerC05setupcD0yyF + 126
1 0x000000010a79c6df _T0930SegmentedControlViewControllerC05setupE0yyF + 511
2 0x000000010a5dba30 _T0929MasterStockInfoViewControllerC11viewDidLoadyyF + 624
3 0x000000010a5dbb04 _T0929MasterStockInfoViewControllerC11viewDidLoadyyFTo + 36
4 UIKit 0x000000010bec101a -[UIViewController loadViewIfRequired] + 1235
5 UIKit 0x000000010bec73a6 -[UIViewController viewWillAppear:] + 118
6 UIKit 0x000000010bef13c8 -[UINavigationController _startCustomTransition:] + 1305
7 UIKit 0x000000010bf01967 -[UINavigationController _startDeferredTransitionIfNeeded:] + 687
8 UIKit 0x000000010bf02b41 -[UINavigationController __viewWillLayoutSubviews] + 58
9 UIKit 0x000000010c0f460c -[UILayoutContainerView layoutSubviews] + 231
10 UIKit 0x000000010bde155b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
11 QuartzCore 0x000000010ec60904 -[CALayer layoutSublayers] + 146
12 QuartzCore 0x000000010ec54526 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 370
13 QuartzCore 0x000000010ec543a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
14 QuartzCore 0x000000010ebe3e92 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
15 QuartzCore 0x000000010ec10130 _ZN2CA11Transaction6commitEv + 468
16 QuartzCore 0x000000010ec10b37 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 115
17 CoreFoundation 0x000000010e00a717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
18 CoreFoundation 0x000000010e00a687 __CFRunLoopDoObservers + 391
19 CoreFoundation 0x000000010dfef720 __CFRunLoopRun + 1200
20 CoreFoundation 0x000000010dfef016 CFRunLoopRunSpecific + 406
21 GraphicsServices 0x00000001117bba24 GSEventRunModal + 62
22 UIKit 0x000000010bd1e134 UIApplicationMain + 159
23 0x000000010a7c2257 main + 55
24 libdyld.dylib 0x000000010f6bd65d start + 1
Any information on this would be helpful, currently exploring all options. If you need more information on this, post a comment and I will get back to you instantly.
Thanks
Stupid, but I was finally able to figure it out.
I found that in my Interface Builder Document in storyboard, my deployment target was set at 11.0 for the pages I was trying to load.
I hope this helps someone :)

iOS uncaught exception adding subview crash

In my iOS app, I am using both Swift and Obj-c with an external library but for some reason I am getting a crash when the library adds a subview.
[view addSubview:self];
The stacktrace is as follows, which is quite hard to track the error as its not near the top(i think).
*** Terminating app due to uncaught exception 'NSRangeException', reason:
'*** -[__NSArrayM objectAtIndex:]: index 4 beyond bounds [0 .. 1]'
*** First throw call stack:
(
0 CoreFoundation 0x000000010913ac65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108dd3bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000109024093 -[__NSArrayM objectAtIndex:] + 227
3 UIKit 0x0000000106fa1881 _UIViewTopDownSubtreeTraversal + 193
4 UIKit 0x00000001075c2fa3 -[UIView(UIConstraintBasedLayout_EngineDelegate) _invalidateSystemLayoutSizeFittingSizeAtEngineDelegateLevel] + 141
5 Foundation 0x00000001065e4d6f -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 915
6 Foundation 0x000000010676f1e8 -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 275
7 Foundation 0x00000001065d949a -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 220
8 UIKit 0x00000001075bfa34 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 474
9 Foundation 0x00000001065e71be -[NSISEngine withBehaviors:performModifications:] + 155
10 UIKit 0x00000001075bf83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
11 UIKit 0x00000001075bf64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
12 UIKit 0x00000001075bf933 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 217
13 Foundation 0x00000001065e71be -[NSISEngine withBehaviors:performModifications:] + 155
14 UIKit 0x00000001075bf83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
15 UIKit 0x00000001075bf64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
16 UIKit 0x00000001075bf2de -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 404
17 UIKit 0x00000001075b426e -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange] + 126
18 UIKit 0x0000000106fbf561 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 209
19 UIKit 0x0000000106fb7ecf __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 125
20 UIKit 0x0000000106fb7e43 -[UIView(Hierarchy) _postMovedFromSuperview:] + 437
21 UIKit 0x0000000106fc1f48 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1660
22 UIKit 0x0000000106f3765a -[_UIParallaxDimmingView didMoveToWindow] + 123
23 UIKit 0x0000000106fbfa68 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1496
24 UIKit 0x0000000106fbf74a -[UIView(Internal) _didMoveFromWindow:toWindow:] + 698
25 UIKit 0x0000000106fb7ecf __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 125
26 UIKit 0x0000000106fb7e43 -[UIView(Hierarchy) _postMovedFromSuperview:] + 437
27 UIKit 0x0000000106fc1f48 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1660
28 UIKit 0x0000000106f33f08 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 2101
29 UIKit 0x0000000106fbc68e +[UIView(Animation) performWithoutAnimation:] + 65
30 UIKit 0x0000000106f33342 -[_UINavigationParallaxTransition animateTransition:] + 1225
31 UIKit 0x000000010709abfc -[UINavigationController _startCustomTransition:] + 3038
32 UIKit 0x00000001070a63bf -[UINavigationController _startDeferredTransitionIfNeeded:] + 386
33 UIKit 0x00000001070a6f0e -[UINavigationController __viewWillLayoutSubviews] + 43
34 UIKit 0x00000001071f1715 -[UILayoutContainerView layoutSubviews] + 202
35 UIKit 0x0000000106fc4a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
36 QuartzCore 0x00000001087e3ec2 -[CALayer layoutSublayers] + 146
37 QuartzCore 0x00000001087d86d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
38 QuartzCore 0x00000001087d8546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
39 QuartzCore 0x0000000108744886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
40 QuartzCore 0x0000000108745a3a _ZN2CA11Transaction6commitEv + 462
41 QuartzCore 0x00000001087460eb _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
42 CoreFoundation 0x000000010906dca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
43 CoreFoundation 0x000000010906dc00 __CFRunLoopDoObservers + 368
44 CoreFoundation 0x0000000109063a33 __CFRunLoopRun + 1123
45 CoreFoundation 0x0000000109063366 CFRunLoopRunSpecific + 470
46 GraphicsServices 0x000000010b1bfa3e GSEventRunModal + 161
47 UIKit 0x0000000106f44900 UIApplicationMain + 1282
48 HedgeEm 0x0000000104f1cfdf main + 111
49 libdyld.dylib 0x0000000109cff145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
My first thoughts were to look for anything that was using an array, but in my code there wasnt anything, I think its related to iOS adding the subview but failing.
Further investigation, the same implementation works in ios 7, I know its related to a possible constraint issue - maybe the compile time constraints that get added. I guess this serves me right for using an old library.
I was using the EAIntroView library EAIntroView - GitHub
It turns out that there is a problem with the library and the latest version causes a crash in iOS 8, GitHub - crash discussion So the solution is to downgrade to 2.6 and it works fine.

Is crash report related to auto layout mismanagement in iOS

I have a crash report in my iOS app which I am not able to understand root cause. But from stack trace I see there is something wrong happening in my auto layout which I couldn't understand. Can some one help me in finding the cause of the issue?
CoreFoundation 0x342c22a3 __exceptionPreprocess + 163
libobjc.A.dylib 0x3bfa697f objc_exception_throw + 31
CoreFoundation 0x342c1d85 -[NSException name] + 1
Foundation 0x34c7319d -[NSISEngine substituteOutAllOccurencesOfBodyVar:withExpression:] + 425
Foundation 0x34c7356b -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:] + 299
Foundation 0x34c7412b -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 203
Foundation 0x34c75fa3 -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 243
Foundation 0x34c76de9 -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 501
Foundation 0x34c7fbbf -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 395
UIKit 0x365033c1 -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 129
UIKit 0x365044a9 -[UIView(UIConstraintBasedLayout) _constraints_didChangeAutoresizingConstraintsArrayForContainedView:] + 197
UIKit 0x3650475f -[UIView(UIConstraintBasedLayout) _invalidateAutoresizingConstraints] + 79
UIKit 0x36504575 -[UIView(UIConstraintBasedLayout) _constraints_subviewDidChangeSuperview:] + 133
UIKit 0x360cc8b7 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1519
UIKit 0x360e9af7 -[UIScrollView(UIScrollViewInternal) _addContentSubview:atBack:] + 71
UIKit 0x360e993f -[UITableView(_UITableViewPrivate) _addContentSubview:atBack:] + 131
UIKit 0x360fc0a5 -[UITableView(_UITableViewPrivate) _updateVisibleHeadersAndFootersNow:] + 1701
UIKit 0x360fa50b -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1815
UIKit 0x361117cf -[UITableView layoutSubviews] + 207
UIKit 0x360cd803 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 259
QuartzCore 0x35e77d8b -[CALayer layoutSublayers] + 215
QuartzCore 0x35e77929 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 461
QuartzCore 0x35e7885d _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 17
QuartzCore 0x35e78243 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 239
QuartzCore 0x35e78051 _ZN2CA11Transaction6commitEv + 317
QuartzCore 0x35e77eb1 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 61
CoreFoundation 0x342976cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 21
CoreFoundation 0x342959c1 __CFRunLoopDoObservers + 277
CoreFoundation 0x34295d17 __CFRunLoopRun + 743
CoreFoundation 0x34208ebd CFRunLoopRunSpecific + 357
CoreFoundation 0x34208d49 CFRunLoopRunInMode + 105
GraphicsServices 0x37dd02eb GSEventRunModal + 75
UIKit 0x3611e301 UIApplicationMain + 1121
MyApp 0x00061a57 0x0005f000 + 10839
libdyld.dylib 0x3c3ddb20 start + 0
It says
NSGenericException
*** Collection <__NSSetM: 0x1e514ee0> was mutated while being enumerated.
Thanks
It appears this could be an error in Apple's code. NSISEngine is apparently mutating an NSSet while enumerating it, and you are not directly doing that.
Having said that, though, this could certainly be a bad side-effect of a bug in your code or xib(s) that is expressing itself in a confusing way.
Report the issue to Apple and send them a reproducible test case if possible. Create a new Xcode project, or send them a reduced copy of your current project, and explain how to make this happen.
Suggestion: Make sure you're calling the UIView methods on the main queue.
I met this issue due to this reason.

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