Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes initializing map with MapView(frame: .infinite) #2250

Open
teradyl opened this issue Oct 7, 2024 · 2 comments
Open

App crashes initializing map with MapView(frame: .infinite) #2250

teradyl opened this issue Oct 7, 2024 · 2 comments
Labels
bug 🪲 Something is broken!

Comments

@teradyl
Copy link

teradyl commented Oct 7, 2024

Environment

  • Xcode version: 16.0
  • iOS version: iOS 18.0 & iOS 17.5 (seems only on simulator)
  • Devices affected: Simulator. Tested iPhone 16 Pro (iOS 18) & iphone 15 Pro (iOS 17.5)
  • Maps SDK Version: 11.7.0

Observed behavior and steps to reproduce

running MapView(frame: .infinite) crashes the app.

Expected behavior

I can create a map with infinite frame, or if not it doesn't crash!

Notes / preliminary analysis

I didn't have an iOS 18 device to test on yet, but my iOS 17.5.1 device did NOT crash on this. Here is the stacktrace of the crash on the simulator, however:

*** Terminating app due to uncaught exception 'failed to resize: size is empty', reason: 'failed to resize: size is empty'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007ff80049928d __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007ff800063894 objc_exception_throw + 48
	2   CoreFoundation                      0x00007ff80049916b -[NSException initWithCoder:] + 0
	3   MapboxCoreMaps                      0x0000000106d193c3 -[MBMMap initWithClient:mapOptions:] + 1411
	4   MapboxMaps                          0x00000001082c416a $sSo6MBMMapC6client10mapOptionsABSo0A6Client_p_So0aD0CtcfcTO + 42
	5   MapboxMaps                          0x00000001082bd24a $sSo6MBMMapC6client10mapOptionsABSo0A6Client_p_So0aD0CtcfC + 58
	6   MapboxMaps                          0x00000001082bd1a2 $s10MapboxMaps7MapViewC04makeaC0014_70E33D7C53C03G17B318C1EBAA9D6836ELL08resolvedC11InitOptionsAA0aC0CAA0coP0C_tF + 290
	7   MapboxMaps                          0x00000001082bc8e5 $s10MapboxMaps7MapViewC10commonInit014_70E33D7C53C03H17B318C1EBAA9D6836ELL03mapF7Options18overridingStyleURIyAA0cfP0C_10Foundation3URLVSgtF + 517
	8   MapboxMaps                          0x00000001082b8d8f $s10MapboxMaps7MapViewC5frame14mapInitOptionsACSo6CGRectV_AA0cgH0Ctcfc + 3279
	9   MapboxMaps                          0x00000001082b80b2 $s10MapboxMaps7MapViewC5frame14mapInitOptionsACSo6CGRectV_AA0cgH0CtcfC + 82
	10 -15 my app code 
	16  UIKitCore                           0x00007ff8054f2dd1 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 71
	17  UIKitCore                           0x00007ff8054fc7bf _UIGestureRecognizerSendTargetActions + 100
	18  UIKitCore                           0x00007ff8054f9519 _UIGestureRecognizerSendActions + 303
	19  UIKitCore                           0x00007ff8054f88c6 -[UIGestureRecognizer _updateGestureForActiveEvents] + 685
	20  UIKitCore                           0x00007ff8054e61e1 _UIGestureEnvironmentUpdate + 3935
	21  UIKitCore                           0x00007ff8054e4e1d -[UIGestureEnvironment _updateForEvent:window:] + 892
	22  UIKitCore                           0x00007ff805bbbc3e -[UIWindow sendEvent:] + 5262
	23  UIKitCore                           0x00007ff805b90e6c -[UIApplication sendEvent:] + 772
	24  UIKit                               0x00007ff8450e1fdf -[UIApplicationAccessibility sendEvent:] + 85
	25  UIKitCore                           0x00007ff805c3db99 __dispatchPreprocessedEventFromEventQueue + 8406
	26  UIKitCore                           0x00007ff805c40455 __processEventQueue + 8414
	27  UIKitCore                           0x00007ff805c3680f __eventQueueSourceCallback + 74
	28  CoreFoundation                      0x00007ff8003f5d0f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	29  CoreFoundation                      0x00007ff8003f5c51 __CFRunLoopDoSource0 + 157
	30  CoreFoundation                      0x00007ff8003f544e __CFRunLoopDoSources0 + 215
	31  CoreFoundation                      0x00007ff8003efb83 __CFRunLoopRun + 919
	32  CoreFoundation                      0x00007ff8003ef409 CFRunLoopRunSpecific + 557
	33  GraphicsServices                    0x00007ff80fcdd187 GSEventRunModal + 137
	34  UIKitCore                           0x00007ff805b703a2 -[UIApplication _run] + 972
	35  UIKitCore                           0x00007ff805b74e10 UIApplicationMain + 123
	36  UIKitCore                           0x00007ff804c1fe03 __swift_destroy_boxed_opaque_existential_1Tm + 12707
)
libc++abi: terminating due to uncaught exception of type NSException
@teradyl teradyl added the bug 🪲 Something is broken! label Oct 7, 2024
@pjleonard37
Copy link
Contributor

Thanks for reporting this @teradyl. I've been able to replicate this issue on my side. I'm taking this back for discussion with the broader team.

@pjleonard37
Copy link
Contributor

Hi @teradyl --

Can you share a bit more about your use case here? Why are you setting an .infinite frame?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something is broken!
Projects
None yet
Development

No branches or pull requests

2 participants