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

Intermittent Crash CALayerInvalidGeometry on MGLMapView selectAnnotation #660

Open
kostiag opened this issue Sep 9, 2022 · 2 comments
Open
Labels

Comments

@kostiag
Copy link

kostiag commented Sep 9, 2022

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

@ZiZasaurus
Copy link
Contributor

@kostiag thank you for reporting, transferring to our v6 repo.

@ZiZasaurus ZiZasaurus transferred this issue from mapbox/mapbox-maps-ios Sep 12, 2022
@datwelk
Copy link

datwelk commented Oct 2, 2022

@ZiZasaurus is 'transferring issue to the v6 repo' the same as discarding it? There doesn't seem much activity there, despite Mapbox' promise to maintain the repo until April 2023.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants