-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I am experiencing a crash on iOS when using apple_maps_flutter. The crash occurs on the main thread and seems related to the internal MKPuckAccuracyLayer updating its colors. The stack trace shows a failure in CFStringGetLength downstream of [_MKPuckAccuracyLayer _updateColors]. This appears to be a conflict or race condition when the plugin manually starts location updates while myLocationEnabled is also set to true.
To Reproduce
Steps to reproduce the behavior:
- Initialize
AppleMapwithmyLocationEnabled: true. - Run the application on a physical iOS device.
- Ensure location permissions are granted and the user location puck is visible.
- Stress test the UI by toggling system appearance (Dark/Light mode) or repeatedly backgrounding/foregrounding the app while moving.
- See error: App crashes with
EXC_BAD_ACCESSinCFStringGetLength.
Crashed: com.apple.main-thread
0 CoreFoundation 0x5650 CFStringGetLength + 8
...
6 MapKit 0x55e0c +[UIColor(MKAdditions) _mapkit_colorNamed:compatibleWithTraitCollection:] + 88
7 MapKit 0xf5fc -[_MKPuckAccuracyLayer _updateColors] + 628
Expected behavior
The application should not crash when displaying the user location, regardless of theme changes or location updates.
Screenshots
N/A
Smartphone (please complete the following information):
- Device: e.g. iPhone 14
- Version e.g. iOS 18.6.2
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.38.3, on macOS 15.7.3 24G419 darwin-arm64, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Connected device (5 available)
[✓] Network resources
• No issues found!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working