Mapbox-gl-native: Call to mapView.onDestroy freezes at nativeDestroy

Created on 8 Feb 2018  路  2Comments  路  Source: mapbox/mapbox-gl-native

NativeDestroy freezes and never completes

Platform:
Android SDK 24
Mapbox SDK version:
v5.4.0

Steps to trigger behavior

  1. Get a MapboxMapView
  2. Switch to another activity, resulting in a call to onDestroy of the map
  3. The call to nativeDestroy never completes

Expected behavior

mapView.onDestroy() completes without issue

Actual behavior

Call to destroy freezes thread, if another thread is used it causes a native crash later in the process.

Android

Most helpful comment

Thank you for reaching out. Are you using a fragment? If not, can you add some sample code? We haven't seen this issue on our end only when calling Mapview#onDestroy from Fragment#onDestroy while it should be hooked in from Fragment#onDestroyView

All 2 comments

Thank you for reaching out. Are you using a fragment? If not, can you add some sample code? We haven't seen this issue on our end only when calling Mapview#onDestroy from Fragment#onDestroy while it should be hooked in from Fragment#onDestroyView

@tobrun ah yep. Fragment#onDestroyView was the key. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LukasPaczos picture LukasPaczos  路  3Comments

melihcolpan picture melihcolpan  路  3Comments

brunoabinader picture brunoabinader  路  4Comments

cmxyzx picture cmxyzx  路  3Comments

friedbunny picture friedbunny  路  3Comments