iOS 13 Beta Crash At Launch

I've got a crash at App Launch in iOS 13 Beta Device. I can't able to launch my App [Release] in iOS 13 beta but it is working fine in iOS 12. I'm not getting an Exception pointer as well. Please help me understand this crash.


Will be get fixed in the next iOS 13 beta release? or Do we need to fix something in the App side? if yes, your suggestions are welcome.


Crash Info:

Fatal Exception: CALayerInvalidGeometry
CALayer position contains NaN: [207 nan]. Layer: <CALayer:0x280387420; position = CGPoint (207 44.1667); bounds = CGRect (0 0; 414 0.333333); delegate = <UIImageView: 0x1026245e0; frame = (0 44; 414 0.333333); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x280387420>>; allowsGroupOpacity = YES; backgroundColor = (null)>


Raw Text

0

CoreFoundation

__exceptionPreprocess

1

libobjc.A.dylib

objc_exception_throw

2

CoreFoundation

-[NSCache init]

3


QuartzCore

CA::Layer::set_position(CA::Vec2<double> const&, bool

29


UIKitCore

UIApplicationMain

30

My App

main.m line 52

main + 52


Thanks in Advance.

Replies

I'm seeing the exact same thing. Only happening on iOS 13.


Fatal Exception: CALayerInvalidGeometry
CALayer position contains NaN: [207 nan]. Layer: <CALayer:0x2803bbaa0; position = CGPoint (207 0); bounds = CGRect (0 0; 414 0); delegate = <UIImageView: 0x10b035e40; frame = (0 0; 414 0); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x2803bbaa0>>; allowsGroupOpacity = YES; >


Fatal Exception: CALayerInvalidGeometry

0 CoreFoundation 0x1a182a9f0 __exceptionPreprocess

1 libobjc.A.dylib 0x1a1d374fc objc_exception_throw

2 CoreFoundation 0x1a1721280 -[NSCache init]

3 QuartzCore 0x1a41f8054 CA::Layer::set_position(CA::Vec2<double> const&, bool)

4 QuartzCore 0x1a41e9148 -[CALayer setPosition:]

5 QuartzCore 0x1a41e978c -[CALayer setFrame:]

6 UIKitCore 0x1a98cb76c -[UIView(Geometry) setFrame:]

7 UIKitCore 0x1a9899600 -[UIImageView _setViewGeometry:forMetric:]

8 UIKitCore 0x1a8b6f5e4 -[_UIBarBackground layoutSubviews]

9 UIKitCore 0x1a98e7a94 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]

10 QuartzCore 0x1a41ee818 -[CALayer layoutSublayers]

11 QuartzCore 0x1a41f303c CA::Layer::layout_if_needed(CA::Transaction*)

Keep us posted. if you got any solution

We have the same error occured.


We discovered that we had some Nav Controller Nav Bar's Shadow set to an alloc but not initialised UIImage, eg just [UIImage alloc].

This code was being fired as part of the initial view construction on app launch.


Whenever we had UIImages defined this way, the app would crash.

The fix was to also init the image, [[UIImage alloc] init]


Hope this helps.

- Greg

Keep us posted. if you got any solution

I had same exception ... CALayer position contains NaN: [207 nan] when setting a frame value to the base view controller's view, where the frame value is definitely not Nan.


****** Setting Optimization Level to None somehow fixed this error. ******

Can anyone explain this?


I'm using Xcode 11.2.1