Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

App crashes when downloading offline region after upgrading to 5.3.2 #11048

Closed
nijs9 opened this issue Jan 25, 2018 · 1 comment
Closed

App crashes when downloading offline region after upgrading to 5.3.2 #11048

nijs9 opened this issue Jan 25, 2018 · 1 comment
Labels
Android Mapbox Maps SDK for Android

Comments

@nijs9
Copy link

nijs9 commented Jan 25, 2018

**Platform:Android
**Mapbox SDK version:5.3.2

Steps to trigger behavior

  1. Define OfflineRegion
  2. Download OfflineRegion

Expected behavior

Region downloading

Actual behavior

I upgraded from version 5.1.5 tot 5.3.2. Code for downloading offline region is not working anymore after this upgrade. I'm using the demo code (https://github.com/mapbox/mapbox-android-demo/blob/master/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/offline/OfflineManagerActivity.java).

The app crashes after calling offlineManager.createOfflineRegion, and I see this error:

A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: JNI GetMethodID called with pending exception java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() A/art: art/runtime/java_vm_ext.cc:470] at void android.os.Handler.<init>(android.os.Handler$Callback, boolean) (Handler.java:200) A/art: art/runtime/java_vm_ext.cc:470] at void android.os.Handler.<init>() (Handler.java:114) A/art: art/runtime/java_vm_ext.cc:470] at void com.mapbox.mapboxsdk.offline.OfflineRegion.<init>(long, com.mapbox.mapboxsdk.storage.FileSource, long, com.mapbox.mapboxsdk.offline.OfflineRegionDefinition, byte[]) (OfflineRegion.java:54)

@tobrun
Copy link
Member

tobrun commented Jan 25, 2018

@nijs9 thank you for the report, this is fixed with #11021. As workaround for now you can use 5.3.1 until 5.3.3 lands.

@tobrun tobrun closed this as completed Jan 25, 2018
@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jan 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

2 participants