Viewer icon indicating copy to clipboard operation
Viewer copied to clipboard

Crash on orientation change

Open vincentneo opened this issue 4 years ago • 1 comments

Describe the bug Example app crashes in certain circumstances with orientation change, but believe is not regarding example code.

To Reproduce Steps to reproduce the behavior:

  1. Run app in landscape mode
  2. Click on an image
  3. Rotate (tested in Simulator) to another orientation
  4. See error

iOS Version (please complete the following information):

  • iOS 14.5

Additional context *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 195]. Layer: <CALayer:0x600000c37600; position = CGPoint (1266 195); bounds = CGRect (0 0; 844 390); delegate = <UIImageView: 0x7ffe08322d70; frame = (844 0; 844 390); opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x6000003996e0>; layer = <CALayer: 0x600000c37600>>; allowsGroupOpacity = YES; backgroundColor = <CGColor 0x600002f9e5d0> [<CGColorSpace 0x600002894d20> (kCGColorSpaceICCBased; kCGColorSpaceModelMonochrome; Generic Gray Gamma 2.2 Profile; extended range)] ( 0 0 )>'

Occurs at imageView.frame = CGRect(origin: CGPoint.zero, size: realImageViewSize) of ViewableController

vincentneo avatar Mar 01 '21 16:03 vincentneo

Interestingly doesn't seem to occur when app initial orientation is portrait...

vincentneo avatar Mar 01 '21 16:03 vincentneo