rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.26k stars 847 forks source link

EsxFramebufferObject::DetachAll Segfault Crash for Android 9 #1364

Closed SethArchambault closed 3 years ago

SethArchambault commented 3 years ago

So we're seeing this Segfault crash showing up in Google Play Console.

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
/vendor/lib64/egl/libGLESv2_adreno.so (EsxFramebufferObject::DetachAll(EsxContext*)+56

The crash happens inside libGLESv2_adreno which is a lib that does OpenGL for Embedded Systems running on an Adreno GPU which is a Qualcomm-only GPU.. It primarily affects Android 9 Devices with the Adreno GPU.

I don't know for certain that it's a mapbox issue, but our app primarily deals with mapping, and I also found this issue in mapbox library, which is nearly the same (except I can't find a repro): https://github.com/mapbox/mapbox-gl-native-android/issues/264

I was hoping upgrading packages and react native would solve the problem, but the crash remains, undisturbed by our upgrades.

Here's an example from a bug report on Sentry:


Architecture | arm64-v8a
Brand | lge
Kernel Version | 4.9.112-perf+
Name | Android
Version | 9(PKQ1.190202.001)

Model | LM-V405 (PKQ1.190202.001)
Model Id | PKQ1.190202.001
Name | LGE LM-V405

OS Version: Android 9 (PKQ1.190202.001)
Report Version: 104

Exception Type: Unknown (SIGSEGV)

Application Specific Information:
Segfault

Thread 0 Crashed:
0   libGLESv2_adreno.so             0x70ab1e44c4        EsxFramebufferObject::DetachAll
1   libGLESv2_adreno.so             0x70ab089784        EglContext::UnmakeCurrentEsx
2   libGLESv2_adreno.so             0x70ab23fdc8        EglContext::UnmakeCurrent
3   libGLESv2_adreno.so             0x70ab08a4c0        EglThreadList::SearchCurrentDisplayAndUnmake
4   libGLESv2_adreno.so             0x70ab089eac        EglDisplay::Terminate
5   libGLESv2_adreno.so             0x70ab083ac8        EglApi::Terminate
6   libEGL.so                       0x713ef60148        android::egl_display_t::terminate
7   libgui.so                       0x71421c2370        android::GLConsumer::EglImage::~EglImage
8   libgui.so                       0x71421c21b4        android::GLConsumer::abandonLocked
9   libgui.so                       0x71421b8498        android::ConsumerBase::onLastStrongRef
10  libandroid_runtime.so           0x71429feddc        <unknown> + 486449081820
11  boot-framework.oat              0x724542a0          <unknown> + 1917141664

Reproducible?
I've never experienced it personally, and haven't found a way to reproduce this because the only way we can tell this is an issue is because of Google Play Console and Sentry.. We haven't had a user report that the app is crashing in a reproducible way, but this bug is putting us over the Bad Behavior threshold with Google. We've got hundreds of users a month with this crash.

Screenshots
image image

Versions:
Platform: Andoid Platform OS: Android 9 Devices:

Emulator/ Simulator: no react-native-mapbox-gl: 8.1.0 (But has existed since we used ~7.0.0 and possibly lower) React Native Version: 0.63.4 (But has existed since we used 0.61.5 and possibly lower)

Additional context
Breakdown of android versions affected:

85.93% | Android 9 
4.53% | Android 8.1.0 
3.91% | Android 7.1.2 
2.62% | Android 10 
1.19% | Android 11 
0.81% | Android 7.1.1 
0.81% | Android 8.0.0 
0.14% | Android 7.0 
0.05% | Android 6.0.1 

Device + how many times it's occurred recently:

SM-G950U | 307
E6910 | 193
SM-G955U | 164
moto | 148
SM-G892A | 144
LGL722DL | 136
LM-G710VM | 119
E6810 | 76
LM-Q720 | 71
Nokia | 65
LM-Q710(FGN) | 55
SM-N950U | 55
LM-X420 | 51
SM-G960U | 39
...

Here's a full backtrace of an error from Google Play Console:

backtrace:
  #00  pc 000000000012b150  /vendor/lib64/egl/libGLESv2_adreno.so (EsxFramebufferObject::DetachAll(EsxContext*)+56)
  #00  pc 00000000001fdf64  /vendor/lib64/egl/libGLESv2_adreno.so (EglContext::UnmakeCurrentEsx()+308)
  #00  pc 00000000001fddd8  /vendor/lib64/egl/libGLESv2_adreno.so (EglContext::UnmakeCurrent()+128)
  #00  pc 00000000001feda0  /vendor/lib64/egl/libGLESv2_adreno.so (EglThreadList::SearchCurrentDisplayAndUnmake(EglDisplay*)+224)
  #00  pc 00000000001fe980  /vendor/lib64/egl/libGLESv2_adreno.so (EglDisplay::Terminate(int)+168)
  #00  pc 00000000001f4b3c  /vendor/lib64/egl/libGLESv2_adreno.so (EglApi::Terminate(void*)+84)
  #00  pc 0000000000011144  /system/lib64/libEGL.so (android::egl_display_t::terminate()+128)
  #00  pc 000000000006f3fc  /system/lib64/libgui.so (android::GLConsumer::EglImage::~EglImage()+80)
  #00  pc 000000000006f240  /system/lib64/libgui.so (android::GLConsumer::abandonLocked()+68)
  #00  pc 0000000000065524  /system/lib64/libgui.so (android::ConsumerBase::onLastStrongRef(void const*)+48)
  #00  pc 0000000000162224  /system/lib64/libandroid_runtime.so (android::SurfaceTexture_release(_JNIEnv*, _jobject*)+80)
  #00  pc 00000000003ed29c  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.graphics.Camera.nativeConstructor [DEDUPED]+124)
  #00  pc 0000000000816138  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.graphics.SurfaceTexture.release+40)
  #00  pc 0000000000d1efbc  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.TextureView.releaseSurfaceTexture+252)
  #00  pc 0000000000d1fad8  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.TextureView.onDetachedFromWindowInternal+248)
  #00  pc 0000000000c6cf10  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.View.dispatchDetachedFromWindow+192)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000d26e20  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
  #00  pc 0000000000c9e3b8  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewRootImpl.dispatchDetachedFromWindow+184)
  #00  pc 0000000000c9eac8  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewRootImpl.doDie+120)
  #00  pc 0000000000c9dde4  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewRootImpl.die+68)
  #00  pc 0000000000ba8214  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.WindowManagerGlobal.removeViewLocked+308)
  #00  pc 0000000000ba9a3c  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.WindowManagerGlobal.removeView+684)
  #00  pc 0000000000d32c24  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.WindowManagerImpl.removeViewImmediate+68)
  #00  pc 00000000008a3624  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.ActivityThread.handleDestroyActivity+324)
  #00  pc 0000000000aae958  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.servertransaction.DestroyActivityItem.execute+136)
  #00  pc 000000000079a4a0  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.servertransaction.TransactionExecutor.executeLifecycleState+416)
  #00  pc 000000000079ab30  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.servertransaction.TransactionExecutor.execute+304)
  #00  pc 000000000088ff14  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.ActivityThread$H.handleMessage+788)
  #00  pc 0000000000acdf14  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.os.Handler.dispatchMessage+180)
  #00  pc 0000000000ad1080  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.os.Looper.loop+1376)
  #00  pc 000000000089d3e8  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.ActivityThread.main+664)
  #00  pc 000000000055664c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
  #00  pc 00000000000cf714  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
  #00  pc 000000000045da80  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #00  pc 000000000045f4d4  /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
  #00  pc 00000000003ef3ec  /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
  #00  pc 000000000011e6d4  /system/framework/arm64/boot.oat (offset 0x114000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
  #00  pc 0000000000dedbb8  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136)
  #00  pc 0000000000df4784  /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (com.android.internal.os.ZygoteInit.main+2340)
  #00  pc 000000000055664c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
  #00  pc 00000000000cf714  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
  #00  pc 000000000045da80  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #00  pc 000000000045d6e0  /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424)
  #00  pc 00000000003623a0  /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652)
  #00  pc 00000000000b59ac  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116)
  #00  pc 00000000000b8430  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+752)
  #00  pc 000000000000251c  /system/bin/app_process64 (main+2000)
  #00  pc 00000000000cb194  /system/lib64/libc.so (__libc_init+88)

Here's some links to some similar issues: https://github.com/mapbox/mapbox-gl-native-android/issues/264 https://developer.qualcomm.com/forum/qdn-forums/maximize-hardware/mobile-gaming-graphics-adreno/28489 https://developer.qualcomm.com/forum/qdn-forums/software/adreno-gpu-sdk/67924

And I've posted on stack overflow, but no help so far: https://stackoverflow.com/questions/66793213/esxframebufferobjectdetachallesxcontext-segfault-crash-in-react-native-proj

Thanks!

zholmes1 commented 3 years ago

Could you post the JSX of the map that results in this error? My users are experiencing a similar crash sometimes, although I'm not 100% sure mine is caused by Mapbox. I'd like to see if there are any similarities between the ways we're using the component.

SethArchambault commented 3 years ago

@zholmes1 Sure! This is a deeply complex map, so I've inlined all the components, which strips out a lot of the stuff that makes it work (Added some comments to help out a bit), but should give you and idea for the overall structure:

<MapboxGL.MapView
  onLayout={...}
  attributionPosition={...}
  logoEnabled={...}
  onPress={...}
  onLongPress={...}
  onRegionDidChange={...}
  regionDidChangeDebounceTime={...}
  pitchEnabled={...}
  ref={...}
  rotateEnabled={...}
  compassEnabled={...}
  style={{ flex: 1, }}
  styleURL={...}
  testID="map"
>
    <MapboxGL.Camera
        ref={...}
        defaultSettings={{
        centerCoordinate: defaultCameraCenter, 
        heading:          0,
        zoomLevel:        DEFAULT_ZOOM,
        }}
        animationDuration={0}
        onUserTrackingModeChange={...}
        />
    {this.state.locationPermission && (
    <MapboxGL.UserLocation
      showsUserHeadingIndicator={true}
      renderMode={IS_IOS ? 'native' : 'normal'}
    />
    )}
    <ErrorBoundary>
        <MapboxGL.VectorSource
          id={this.props.layer.id}
          url={tileUrl}
          onPress={this.props.onPress}
        >
            /* could be a lot of layers! */
            <ErrorBoundary>
              <MapboxGL.FillLayer {...this.props} id={id} />
            </ErrorBoundary>
            <ErrorBoundary>
              <MapboxGL.FillLayer {...this.props} id={id} />
            </ErrorBoundary>
            <ErrorBoundary>
              <MapboxGL.FillLayer {...this.props} id={id} />
            </ErrorBoundary>

        </MapboxGL.VectorSource>
    </ErrorBoundary>

    <ErrorBoundary>
        <MapboxGL.VectorSource
          id={this.props.layer.id}
          url={tileUrl}
          onPress={this.props.onPress}
        >
            /* could be a lot of layers! */
            <ErrorBoundary>
              <MapboxGL.FillLayer {...this.props} id={id} />
            </ErrorBoundary>
            <ErrorBoundary>
              <MapboxGL.FillLayer {...this.props} id={id} />
            </ErrorBoundary>
            <ErrorBoundary>
              <MapboxGL.FillLayer {...this.props} id={id} />
            </ErrorBoundary>

        </MapboxGL.VectorSource>
    </ErrorBoundary>

    <VectorWrapper id={id} url={url}>
      <MapboxGL.LineLayer
        id=""
        sourceLayerID={id}
        style={{
          visibility:  visibility,
          lineColor:   ...,
          lineOpacity: [
            'interpolate',
            ['exponential', 1.5,],
            ['zoom',],
            ...[13, 0,],
            ...[15, 0.2,],
            ...[20, 1.0,],
          ],
          lineWidth: 2,
        }}
        minZoomLevel={13}
      />
    </VectorWrapper>

    <MapboxGL.ShapeSource
    id="..."
    shape={...}
    >
        /* could be a lot of layers! */
        <ErrorBoundary>
          <MapboxGL.FillLayer {...this.props} id={id} />
        </ErrorBoundary>
        <ErrorBoundary>
          <MapboxGL.FillLayer {...this.props} id={id} />
        </ErrorBoundary>
        <ErrorBoundary>
          <MapboxGL.FillLayer {...this.props} id={id} />
        </ErrorBoundary>

    </MapboxGL.ShapeSource>

      /* not always visible */
    <ErrorBoundary>
        <MapboxGL.VectorSource id={id} url={url}>
            <MapboxGL.SymbolLayer
            id="..."
            sourceLayerID="contour"
            style={{
              visibility:       visibleToString(visible),
              textField:        ['concat', ['to-string', ['get', 'ele',],], 'm',],
              textSize:         12,
              textColor:        '#e96749',
              textHaloColor:    '#ffffff',
              textHaloWidth:    3,
              textAllowOverlap: true,
            }}
            />
                <MapboxGL.LineLayer
                id="..."
                sourceLayerID={id}
                style={{
                  visibility: visibleToString(visible),
                  lineColor:  '#e96749',
                  lineWidth:  1,
                }}
                />
            </MapboxGL.SymbolLayer>
      </MapboxGL.VectorSource>
    </ErrorBoundary>

    <MapboxGL.ShapeSource
    id="..."
    shape={...}
    >
        /* could be a lot of layers! */
        <ErrorBoundary>
          <MapboxGL.FillLayer {...this.props} id={id} />
        </ErrorBoundary>
        <ErrorBoundary>
          <MapboxGL.FillLayer {...this.props} id={id} />
        </ErrorBoundary>
        <ErrorBoundary>
          <MapboxGL.FillLayer {...this.props} id={id} />
        </ErrorBoundary>

    </MapboxGL.ShapeSource>

    /* only shown if shape1 has features */
    <ErrorBoundary>
        <MapboxGL.ShapeSource id="..." shape={shape1}>
          <MapboxGL.LineLayer
            id="shape1Outlines"
            style={...}
          />
        </MapboxGL.ShapeSource>
    </ErrorBoundary>

      {this.props.outline && (
        <ErrorBoundary>
          <MapboxGL.ShapeSource
            id="outlineLayer"
            shape={this.props.outline}
          >
            <MapboxGL.LineLayer
              id="outlineLayerOutlines"
              style={mapStyles.outline}
            />
          </MapboxGL.ShapeSource>
        </ErrorBoundary>
      )}

        /* only shown if featureCollection is array and has items */
        <ErrorBoundary>
          <MapboxGL.ShapeSource id="..." shape={...}>
            <MapboxGL.LineLayer
              id="..."
              style={{
                lineColor:         '#e91e63',
                lineWidth:         2,
                circleOpacity:     0,
                circleRadius:      circleRadius,
                circleStrokeColor: '#e91e63',
                circleStrokeWidth: circleStrokeRadius,
              }}
            />
          </MapboxGL.ShapeSource>
        </ErrorBoundary>

    /* only shown if markerCenter exists */
    <ErrorBoundary>
        <MapboxGL.PointAnnotation
          id="markerLayer"
          coordinate={markerCenter}
          title="Point"
          anchor={{ x: 0.5, y: 0.85, }}
        />
    </ErrorBoundary>

</MapboxGL.MapView>

There's probably room to simplify this beast!

ferdicus commented 3 years ago

@SethArchambault, at this point, I don't think that there is much we can do from our side with this.
As you mentioned in your initial description, this seems to be deeply embedded in the native parts of the SDK and as there are no longer any meaningful updates on mapbox/mapbox-gl-native-android I think your best bet would be to check if they're tracking this same issue on the MapLibre side and open an issue over there for it.

SethArchambault commented 3 years ago

@ferdicus Can you say more about how mapbox/mapbox-gl-native-android ties into this? I had just mentioned that as an example of where I was able to find the same issue occurring online, but react-native-mapbox-gl/maps doesn't rely on that right?

Also, I did a search for MapLibre in the react-native-mapbox-gl/maps repo and found this: https://github.com/react-native-mapbox-gl/maps/blob/66343aa37505098b652617b432a897c278ee0135/android/install.md

Looks like it's saying I can manually override what mapbox uses on a low level for android.. Are you suggesting I do that?

I looked around at the maplibre repos and couldn't find anything relating to my issue, so doubt it's fixed there.. Also it freaks me out to customize mapbox in this way, since I imagine I'll run into new issues and then I'll have to try and debug mapbox with a non-standard setup, which sounds even harder..

Thanks for the help on this, appreciate you!

ferdicus commented 3 years ago

Maybe this helps as a mental model:

   react-native-mapbox-gl/maps
          \ wraps /
           \     /
    mapbox/mapbox-gl-native-ios
  mapbox/mapbox-gl-native-android
          \ wraps /
           \     /
   mapbox/mapbox-gl-native 

So underneath, this lib uses native mobile mapbox SDKs for iOS (mapbox/mapbox-gl-native-ios) and Android (mapbox/mapbox-gl-native-android), which in turn use an even "nativer" core library for all the fancy 3d stuff (mapbox/mapbox-gl-native). The modern world of programming is a world of abstractions....

After some drama with licensing and such, mapbox chose to close source some of their offerings.
MapLibre people took that opportunity to fork off from the then last open snapshot of Mapbox.

Therefore MapLibre is in the end a drop-in replacement for the previous mapbox SDKs.

Looks like it's saying I can manually override what mapbox uses on a low level for android.. Are you suggesting I do that?

Yes, that's the suggestion - no worries, it shouldn't be that hard, basically just pointing your androids dependency management to another source.

I looked around at the maplibre repos and couldn't find anything relating to my issue, so doubt it's fixed there.. Also it freaks me out to customize mapbox in this way, since I imagine I'll run into new issues and then I'll have to try and debug mapbox with a non-standard setup, which sounds even harder..

True, they might not have a fix for your current problem at hand. However, having said that, you can have a look at this ticket in our repo (https://github.com/react-native-mapbox-gl/maps/issues/1350) where someone is asking about an iOS crash which was not fixed in the mapbox repo, but fixed in the maplibre repo.

So your best chances of having a native issue/ bug/ crash fixed upstream are with maplibre, as mapbox is not really maintaining their mobile SDK that aren't the new v10 version.

Cheers

SethArchambault commented 3 years ago

Wow, awesome thanks so much! I'll at least do some testing around this..

The modern world of programming is a world of abstractions....

I'll add, "...to our peril"

Watch: The thirty-million line problem 😉

ferdicus commented 3 years ago

@SethArchambault, any update on this?

SethArchambault commented 3 years ago

@ferdicus So we didn't yet have a chance to switch this over to maplibre yet, but we did have something happen in this area: On June 17th 2021, Google Play Console ceased to record any more of these errors, or count them as a part of our crash rate.

So our crash rate graph took a dive, and is now under the bad behavior level: image

We use Sentry for bug tracking though, so we can see that the issue has not been solved, the exact same issue continues to be reported, via Sentry, it's just no longer showing up on Google Play Store.

I have no idea what the reason is for Google no longer showing this error... My best guess is that Google has determined it's impossible for app developers to address this low level gpu segfault, and so decided not to penalize us for it in the app store.

That's all I got there...

I'll also say, given that mapbox is about to get a major version update with Mapbox Mobile Maps SDK v10.0.0 on the horizon, switching to MapLibre may not be the move we choose, since it could be a deadend, assuming v10 features / performance are not able to be reproduced in the MapLibre version? Not sure how real that concern is..

But anyways! This isn't fixed for me yet but Google has reduced my incentive to address it has gone down a bit..

ferdicus commented 3 years ago

That's good to hear?!?! Let's say it's good :)

Concerning:

I'll also say, given that mapbox is about to get a major version update with Mapbox Mobile Maps SDK v10.0.0 on the horizon, switching to MapLibre may not be the move we choose, since it could be a deadend, assuming v10 features / performance are not able to be reproduced in the MapLibre version? Not sure how real that concern is..

v10 is a departure from the currently used API (that we are wrapping with this repo).
On top of that comes the dilemma of either supporting a commercial product (mapbox) or open-source (maplibre).

We're already spread too thin as is and I'm not sure we can support two SDKs of two projects that will get increasingly get dissimilar?!

SethArchambault commented 3 years ago

That's good to hear?!?! Let's say it's good :)

🤣 Yeah, I'll take it!

We're already spread too thin as is and I'm not sure we can support two SDKs of two projects that will get increasingly get dissimilar?!

Good to know and makes sense to me - thanks!

ferdicus commented 3 years ago

Closing this as "fixed" 😅