maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
228 stars 125 forks source link

[BUG] Google Play Console Crashes and ANR's Reported #515

Open Rossdex opened 1 month ago

Rossdex commented 1 month ago

Platforms

all

Version of flutter maplibre_gl

0.20.0

Bug Description

One of the main features of my app is interactable maps, I am using most of the features available to this package. Add Json Source, User Location, tappable nodes, linestrings and symbols.

My users have complained about consistent crashes even when they are not interacting with the maps.

Google have contacted me saying I am getting too many crashes and may end up being less discoverable on Google Play. These errors do not ocurr during debug and are not something I can catch within dart as the app crashes.

The main error I am getting is

[split_config.arm64_v8a.apk!libmaplibre.so] mbgl::LocalGlyphRasterizer::~LocalGlyphRasterizer()

and this is an example of the stack trace in the Google play console.


          *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 23459 >>> my_app <<<

backtrace:
  #00  pc 0x000000000044c520  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (mbgl::LocalGlyphRasterizer::~LocalGlyphRasterizer()+60) (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #01  pc 0x0000000000781db0  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #02  pc 0x0000000000626a90  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #03  pc 0x00000000006207ec  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #04  pc 0x000000000063b7ec  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #05  pc 0x000000000047a3fc  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (mbgl::android::MapRenderer::~MapRenderer()+328) (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #06  pc 0x000000000047a548  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (mbgl::android::MapRenderer::~MapRenderer()+16) (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #07  pc 0x000000000047e8cc  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (auto jni::NativeMethodMaker<void (jni::NativePeerHelper<mbgl::android::MapRenderer, mbgl::android::MapRenderer, std::__ndk1::unique_ptr<mbgl::android::MapRenderer, std::__ndk1::default_delete<mbgl::android::MapRenderer> > (_JNIEnv&, jni::Object<mbgl::android::MapRenderer> const&, float, jni::Object<jni::StringTag> const&)>::MakeFinalizer(jni::Field<mbgl::android::MapRenderer, long> const&, char const*) const::'lambda'(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&)::*)(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&) const>::operator()<jni::NativePeerHelper<mbgl::android::MapRenderer, mbgl::android::MapRenderer, std::__ndk1::unique_ptr<mbgl::android::MapRenderer, std::__ndk1::default_delete<mbgl::android::MapRenderer> > (_JNIEnv&, jni::Object<mbgl::android::MapRenderer> const&, float, jni::Object<jni::StringTag> const&)>::MakeFinalizer(jni::Field<mbgl::android::MapRenderer, long> const&, char const*) const::'lambda'(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&)>(char const*, jni::NativePeerHelper<mbgl::android::MapRenderer, mbgl::android::MapRenderer, std::__ndk1::unique_ptr<mbgl::android::MapRenderer, std::__ndk1::default_delete<mbgl::android::MapRenderer> > (_JNIEnv&, jni::Object<mbgl::android::MapRenderer> const&, float, jni::Object<jni::StringTag> const&)>::MakeFinalizer(jni::Field<mbgl::android::MapRenderer, long> const&, char const*) const::'lambda'(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&) const&)::'lambda'(_JNIEnv*, jni::jobject*)::__invoke(_JNIEnv*, jni::jobject*)+52) (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #08  pc 0x000000000047ea40  /data/app/~~DAADVAYRjGaN0G4wo7C-7g==/my_app-sZus-X7gvXs9QoGBUYRRQA==/split_config.arm64_v8a.apk!libmaplibre.so (auto auto jni::MakeNativeMethod<auto jni::NativeMethodMaker<void (jni::NativePeerHelper<mbgl::android::MapRenderer, mbgl::android::MapRenderer, std::__ndk1::unique_ptr<mbgl::android::MapRenderer, std::__ndk1::default_delete<mbgl::android::MapRenderer> > (_JNIEnv&, jni::Object<mbgl::android::MapRenderer> const&, float, jni::Object<jni::StringTag> const&)>::MakeFinalizer(jni::Field<mbgl::android::MapRenderer, long> const&, char const*) const::'lambda'(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&)::*)(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&) const>::operator()<jni::NativePeerHelper<mbgl::android::MapRenderer, mbgl::android::MapRenderer, std::__ndk1::unique_ptr<mbgl::android::MapRenderer, std::__ndk1::default_delete<mbgl::android::MapRenderer> > (_JNIEnv&, jni::Object<mbgl::android::MapRenderer> const&, float, jni::Object<jni::StringTag> const&)>::MakeFinalizer(jni::Field<mbgl::android::MapRenderer, long> const&, char const*) const::'lambda'(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&)>(char const*, jni::NativePeerHelper<mbgl::android::MapRenderer, mbgl::android::MapRenderer, std::__ndk1::unique_ptr<mbgl::android::MapRenderer, std::__ndk1::default_delete<mbgl::android::MapRenderer> > (_JNIEnv&, jni::Object<mbgl::android::MapRenderer> const&, float, jni::Object<jni::StringTag> const&)>::MakeFinalizer(jni::Field<mbgl::android::MapRenderer, long> const&, char const*) const::'lambda'(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&) const&)::'lambda'(_JNIEnv*, jni::jobject*)>(char const*, char const*, jni::NativePeerHelper<mbgl::android::MapRenderer, mbgl::android::MapRenderer, std::__ndk1::unique_ptr<mbgl::android::MapRenderer, std::__ndk1::default_delete<mbgl::android::MapRenderer> > (_JNIEnv&, jni::Object<mbgl::android::MapRenderer> const&, float, jni::Object<jni::StringTag> const&)>::MakeFinalizer(jni::Field<mbgl::android::MapRenderer, long> const&, char const*) const::'lambda'(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&) const&, std::__ndk1::enable_if<std::is_class<jni::NativePeerHelper<mbgl::android::MapRenderer, mbgl::android::MapRenderer, std::__ndk1::unique_ptr<mbgl::android::MapRenderer, std::__ndk1::default_delete<mbgl::android::MapRenderer> > (_JNIEnv&, jni::Object<mbgl::android::MapRenderer> const&, float, jni::Object<jni::StringTag> const&)>::MakeFinalizer(jni::Field<mbgl::android::MapRenderer, long> const&, char const*) const::'lambda'(_JNIEnv&, jni::Object<mbgl::android::MapRenderer>&)>::value, void>::type*)::'lambda'(_JNIEnv*, auto...)::__invoke<jni::jobject*>(_JNIEnv*, auto...)+44) (BuildId: 545887988105fea909ce11acfe599ad1e7db51a4)
  #09  pc 0x00000000003343c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #10  pc 0x00000000005c2730  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$FinalizerDaemon.doFinalize+256)
  #11  pc 0x00000000005c2a4c  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$FinalizerDaemon.processReference+476)
  #12  pc 0x00000000005c2bd4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$FinalizerDaemon.runInternal+324)
  #13  pc 0x000000000059aa24  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$Daemon.run+116)
  #14  pc 0x000000000040f510  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #15  pc 0x0000000000362774  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #16  pc 0x000000000034def0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #17  pc 0x0000000000943e28  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #18  pc 0x000000000063ebd4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #19  pc 0x000000000063e684  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #20  pc 0x00000000000f75d8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
  #21  pc 0x00000000000940f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Steps to Reproduce

Load a fully featured map with location enabled on Android.

Expected Results

No crashes

Actual Results

Crashes

Code Sample


A```