-
Notifications
You must be signed in to change notification settings - Fork 1.3k
MapSnapshotter callback is not always invoked #11669
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
After re-introduction of a Example builds:
/cc @tobrun @tmpsantos |
I am also using snapshotter in kotlin for Android and it typically takes about 3 tries before I can get the callback to fire. No crash, no error emitted. |
We were able to boil this down to the Snapshotter object being garbage collected before returning the result, solution is to retain the snapshotter instance (eg. scope it to the hosting class). |
Platform: Android
Mapbox SDK version: 5.5.2, 6.0.0-beta.6
Steps to trigger behavior
There is a simple layout containing
button
andimageView
. Clicking onbutton
startsMapSnapshotter
.Expected behavior
After each press imageView displays either a map snapshot or it becomes red.
Actual behavior
Sometimes neither SnapshotReadyCallback nor ErrorHandler is called, so imageView remains blank.
The text was updated successfully, but these errors were encountered: