Skip to content

CALayerInvalidGeometry with iOS 26 and Pro Max Devices #2624

@kiancheong

Description

@kiancheong

Reopening this issue: #2617
We managed to reproduce the issue with iPhone 16 Pro Max and iPhone 17 Pro Max on both device and simulator.
However, the issue did not occur on iPhone 15 Pro Max.

Crash message

Fatal Exception: CALayerInvalidGeometry
CALayer position contains NaN: [nan 89.8333]. Layer: <CALayer:0x1290123a0; position = CGPoint (inf 89.8333); bounds = CGRect (0 0; inf 179.667); delegate = <TtGC6Lottie27SwiftUIMeasurementContainerCS_19LottieAnimationView: 0x1293a8a00; frame = (nan 0; inf 179.667); autoresize = W+H; layer = <CALayer: 0x1290123a0>>; sublayers = (<CALayer: 0x129010780>); opaque = YES; allowsGroupOpacity = YES; >

We are using Lottie 4.5.2

Here's the code we used for the LottieView

VStack(spacing: .zero) {
      LottieView(animation: .named(lottieFileName, bundle: .module))
        .resizable()
        .scaledToFill()
        .frame(
          width: Constants.lottieAnimationWidth,
          height: Constants.lottieAnimationHeight
        )
        .padding(.horizontal, 16)
        .padding(.bottom, 40)

      Text(someText)
        .foregroundStyle(Color.blue))
        .multilineTextAlignment(.center)
    }
    .frame(maxWidth: .infinity, maxHeight: .infinity)
    .padding(.horizontal, 16)
    .padding(.vertical, 16)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions