mapbox / mapbox-gl-native-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
217 stars 118 forks source link

Android sometimes crashes while in background with a SIGSEGV error #701

Open reyalpsirc opened 3 years ago

reyalpsirc commented 3 years ago

Library version: 9.6.1

We have a launched application which uses the react-native version linked with the 9.6.1 version of this library and we have been seeing reports of Android crashes while the App was in use in background. Our App uses GPS while in background to track user exercises and so, it needs to keep updating the map in the background (to keep updating the user path).

After symbolicating the crash, this is what shows up on Bugsnag:

SIGSEGV Segmentation violation (invalid memory reference) 
    libmapbox-gl std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >::basic_string(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)
    libmapbox-gl mbgl::style::Source::getID() const
    libmapbox-gl _ZZN3jni16MakeNativeMethodIZNS_17NativeMethodMakerIMZNS_30NativePeerMemberFunctionMethodIMN4mbgl7android5LayerEFNS_6UniqueINS_6ObjectINS_9StringTagEEENS_17DefaultRefDeleterIXadL_ZN7_JNIEnv14DeleteLocalRefEP8_jobjectEEEEEERSB_EXadL_ZNS5_5getIdESG_EEEclIS5_S5_vEEDaRKNS_5FieldIT0_xEEEUlSG_RNS7_IS5_EEE_KFSF_SG_SR_EJEEclISS_EEDaPKcRKT_EUlPSB_PNS_7jobjectEE_EEDaSY_SY_S11_PNSt6__ndk19enable_ifIXsr3std8is_classISZ_EE5valueEvE4typeEENUlTyS12_DpT_E_8__invokeIJS14_EEEDaS12_S1C_

How can we fix this or bypass this?