Closed jliumo closed 2 months ago
Thank you for the detailed description of the issue. We've raised an internal ticket to fix it and will come back as soon as it is ready.
@jliumo @naftalibeder we introduced a fix for this bug in v11.7.0-rc.1 release of SDK.
Fix a crash when calling CameraAnimationsPlugin.easeTo() with empty camera options or CameraAnimationsPlugin.playAnimatorsSequentially() / CameraAnimationsPlugin.playAnimatorsTogether() with an empty array of animators. Fix ongoing animations being canceled when CameraAnimationsPlugin.flyTo() with empty camera options is called.
Test it and rise a ticket if you still have an issue.
Environment
Observed behavior and steps to reproduce
Calling com.mapbox.maps.plugin.animation.easeTo with empty CameraOptions crashes the application, because it tries to spread an empty array.
Expected behavior
The call shouldn't do anything.
Notes / preliminary analysis
This causes problems for us, because even asynchronous cameraForCoordinates called during layout changes sometimes returns empty cameraState causing whole application to crash, while it can be checked by com.mapbox.maps.util.isEmpty I think it would be more developer friendly if it didn't cause crash