mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
466 stars 131 forks source link

MapboxStyleException for correctly configured SymbolLayer style #1822

Closed wen-kai closed 1 year ago

wen-kai commented 1 year ago

Environment

Observed behavior and steps to reproduce

Exception com.mapbox.maps.MapboxStyleException:
  at com.mapbox.maps.extension.style.layers.Layer.updateProperty (Layer.kt:143)
  at com.mapbox.maps.extension.style.layers.Layer.setProperty$extension_style_release (Layer.kt:132)
  at com.mapbox.maps.extension.style.layers.generated.SymbolLayer.iconImage (SymbolLayer.kt:379)
  at com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory.setIconImage (RCTMGLStyleFactory.java:1340)
  at com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory$3.onAllImagesLoaded (RCTMGLStyleFactory.java:246)
  at com.mapbox.rctmgl.utils.DownloadMapImageTask.onPostExecute (DownloadMapImageTask.kt:128)
  at com.mapbox.rctmgl.utils.DownloadMapImageTask.onPostExecute (DownloadMapImageTask.kt:30)
  at android.os.AsyncTask.finish (AsyncTask.java:771)
  at android.os.AsyncTask.access$900 (AsyncTask.java:199)
  at android.os.AsyncTask$InternalHandler.handleMessage (AsyncTask.java:788)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8663)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:567)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135)

We are receiving frequent crashes in production with the above exception. It's very hard to reproduce and seems to be inconsistent. Our symbol layers use .png images and they are static styles.

Expected behavior

The above exception should not occur if a .png is used in the style.

Notes / preliminary analysis

Unfortunately this is quite inconsistent but is very much a bug and affecting our production vitals significantly.

Additional links and references

Possibly related: https://github.com/mapbox/mapbox-maps-android/issues/1727

ZiZasaurus commented 1 year ago

Thank you for reporting. To better assist you, can you please provide us with some information regarding what's happening in the application? When are you updating the symbol layers? How many symbols are being updated?

ZiZasaurus commented 1 year ago

Closing this ticket, but please feel free to reopen with the information requested above if you continue to experience this behavior.