Yermo / nativescript-mapbox

:statue_of_liberty: :tokyo_tower: :mount_fuji: Native OpenGL powered Maps, by Mapbox
MIT License
194 stars 94 forks source link

App creashed on navigating back to page with mapbox on android #327

Open wendt88 opened 5 years ago

wendt88 commented 5 years ago

create a new vue app with tns create test --vue and add nativescript-mapbox. Created a second component and add a Mapbox to the first. with this.$navigateTo navigate to the second component. Everything works fine until here. by navigating back (backbutton on android) the app crashes without useful error: ActivityManager: Process dev.framework2.maptest (pid 30711) has died

PhilippS93 commented 5 years ago

Seems related to #271 .

See also

Plugin version 4.4.0 may crash on Android when pausing and resuming the app. If this affects you, pin your version to "4.3.1" for now. So in package.json do "nativescript-mapbox": "4.3.1" (without the ~ / ^ version prefix).

dmytro-gokun commented 5 years ago

I also would like to note that this plugin does not really work well with multiple map instances as you can gather from the source code, e.g.:

https://github.com/EddyVerbruggen/nativescript-mapbox/blob/716086bd1077757a8651cc48900edc9d84606520/src/mapbox.android.ts#L99

GrEg00z commented 4 years ago

Problem still present on version 4.4.0 and 4.4.1. Is it sheduled a fix for this ?

Yermo commented 4 years ago

It's a bug in NativeScript core and is not related to this plugin. https://github.com/NativeScript/NativeScript/issues/7954#issuecomment-573071912