Closed dimitradg closed 1 year ago
@dimitradg are you using the examples app itself or code from the examples app? When running the examples app I am not experiencing any crashing.
Hello there, I am using code from the examples app. More specifically, I have a doAsync task, and inside the uiThread I call a function with the above mentioned code.
Hello there, I am using code from the examples app. More specifically, I have a doAsync task, and inside the uiThread I call a function with the above mentioned code.
That comment confuses me a bit. Can you please trying https://github.com/mapbox/mapbox-maps-android/blob/main/app/src/main/java/com/mapbox/maps/testapp/examples/OfflineActivity.kt exactly as is (without doAsync
etc)? If it will still crash - can you make sure that correct Mapbox token is passed here?
You are right, I rephrased my question so it is more understandable. As mentioned above, I am on my activity and I have a download button with an onClickListener. Once it is clicked, the above mentioned function gets called. However my app keeps crashing with the error
E/libc++abi: terminating with uncaught exception of type std::invalid_argument A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2623 (TileStoreFileSo), pid 31231 (app)
Yes I believe I am using the correct mapbox token, is the one I am already using to successfully load my maps, the android access token taken from my mapbox account.
I would like to post an update and close this issue:
It was my fault, I was setting minZoom two times, instead of minZoom and maxZoom:
val tilesetDescriptor = offlineManager.createTilesetDescriptor( TilesetDescriptorOptions.Builder() .styleURI(Style.OUTDOORS) .minZoom(tour.minZoom.toInt().toByte()) .minZoom(tour.maxZoom.toInt().toByte()) .build() )
Additionally, zoom range wasn't always correct.
Thank you for your time and support.
Environment
Observed behavior and steps to reproduce
I have an activity with a Download button, and once it is clicked, offline map region is downloaded.
However, whenever I run my app I get the following crash: E/libc++abi: terminating with uncaught exception of type std::invalid_argument A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 5109 (TileStoreFileSo), pid 3898 (app).
I think I may be using wrong my mapbox tokens, but I haven't figure out the solution yet.
Anyone ideas? Thank you.
Here is the code written:
Expected behavior
Offline maps should be downloaded