Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Intermittent Crash CALayerInvalidGeometry on MGLMapView selectAnnotation #660

@kostiag

Description

@kostiag

Environment

  • Xcode version: 13.4.1
  • iOS version: 15.6.1
  • Devices affected: iPadPro/Simulator
  • Maps SDK Version:
    - Mapbox-iOS-SDK (6.4.1):
    - MapboxMobileEvents (~> 0.10.12)
    - MapboxMobileEvents (0.10.14)

Observed behavior and steps to reproduce

this works most of the time and so far we could not figure out under what circumstances this results in a crash. Any theories on what could try to avoid this or what could be the cause would be appreciated.

programmatically create pin
call
self.mapContainer.mapView.selectAnnotation(pin

Expected behavior

call out consistently shows without crashes

Notes / preliminary analysis

Fatal Exception: CALayerInvalidGeometry
CALayer position contains NaN: [nan 149]. Layer: <CALayer:0x28b3b4ec0; position = CGPoint (0 28.5); bounds = CGRect (0 0; 0 57); delegate = <MGLCompactCalloutView: 0x138259a80; frame = (0 0; 0 57); tintColor = UIExtendedSRGBColorSpace 0.602669 0.126759 0.283119 1; layer = <CALayer: 0x28b3b4ec0>>; sublayers = (<CALayer: 0x28b3b52c0>, <CALayer: 0x28b3b4f80>); allowsGroupOpacity = YES; backgroundColor = <CGColor 0x281084190> [<CGColorSpace 0x281783060> (kCGColorSpaceICCBased; kCGColorSpaceModelMonochrome; Generic Gray Gamma 2.2 Profile; extended range)] ( 0 0 )>

Fatal Exception: CALayerInvalidGeometry
CALayer position contains NaN: [nan 16]. Layer: <CALayer:0x28176da60; position = CGPoint (0 28.5); bounds = CGRect (0 0; 0 57); delegate = <MGLCompactCalloutView: 0x10f94f800; frame = (0 0; 0 57); tintColor = UIExtendedSRGBColorSpace 0.602669 0.126759 0.283119 1; layer = <CALayer: 0x28176da60>>; sublayers = (<CALayer: 0x28176d140>, <CALayer: 0x28176cb40>); allowsGroupOpacity = YES; backgroundColor = <CGColor 0x283de1130> [<CGColorSpace 0x283ad2b80> (kCGColorSpaceICCBased; kCGColorSpaceModelMonochrome; Generic Gray Gamma 2.2 Profile; extended range)] ( 0 0 )>

Fatal Exception: CALayerInvalidGeometry
CALayer position contains NaN: [nan 95.5]. Layer: <CALayer:0x287256d60; position = CGPoint (0 28.5); bounds = CGRect (0 0; 0 57); delegate = <MGLCompactCalloutView: 0x139394e60; frame = (0 0; 0 57); tintColor = UIExtendedSRGBColorSpace 0.602669 0.126759 0.283119 1; layer = <CALayer: 0x287256d60>>; sublayers = (<CALayer: 0x2872555a0>, <CALayer: 0x2872569e0>); allowsGroupOpacity = YES; backgroundColor = <CGColor 0x281122760> [<CGColorSpace 0x2816266a0> (kCGColorSpaceICCBased; kCGColorSpaceModelMonochrome; Generic Gray Gamma 2.2 Profile; extended range)] ( 0 0 )>

0
CoreFoundation
__exceptionPreprocess
6
UIKitCore
-[UIView(Geometry) setFrame:]
7
Mapbox
SMCalloutView.m - Line 401
-[MGLSMCalloutView presentCalloutFromRect:inLayer:ofView:constrainedToRect:animated:] + 401
8
Mapbox
SMCalloutView.m - Line 316
-[MGLSMCalloutView presentCalloutFromRect:inView:constrainedToRect:animated:] + 316
9
Mapbox
MGLMapView.mm - Line 5541
-[MGLMapView selectAnnotation:moveIntoView:animateSelection:calloutPositioningRect:completionHandler:] + 5541
10
Mapbox
MGLMapView.mm - Line 5360
-[MGLMapView selectAnnotation:moveIntoView:animateSelection:completionHandler:] + 5360

Additional links and references

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