Skip to content

[Bug]: Crash with Fabric enabled on armeabi-v7a devices (React Native new architecture) #3913

@MykytaShchukin

Description

@MykytaShchukin

Mapbox Implementation

Mapbox

Mapbox Version

11.8.0

React Native Version

0.79.5

Platform

Android

@rnmapbox/maps version

10.1.40

Standalone component to reproduce

import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="idStreetLayer" shape={aLine}>
          <LineLayer id="idStreetLayer" />
        </ShapeSource>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

When using @rnmapbox/maps with the new React Native architecture (Fabric enabled), the app crashes on startup on devices with armeabi-v7a ABI.

This happens because Mapbox Fabric code assumes 64-bit ABI, leading to runtime crashes like SurfaceMountingManager.getViewState or CppException inside libmapbox-maps.so.

Steps to reproduce

  1. Enable the new architecture in your app (react-native.config.js, TurboModules/Fabric enabled)
  2. Build and install an APK that includes armeabi-v7a
  3. Launch the app on a real device or emulator with armeabi-v7a (e.g. realme C11 2021, Spreadtrum SC9863A)
  4. App crashes on start with native crash in libmapbox-maps.so

Crash stacktrace (Android)

Exception com.facebook.jni.CppException:
at com.facebook.react.fabric.mounting.SurfaceMountingManager.getViewState (SurfaceMountingManager.java:1103)
at com.facebook.react.fabric.mounting.SurfaceMountingManager.updateProps (SurfaceMountingManager.java:688)
...
Caused by: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
in libmapbox-maps.so

Expected behavior

No response

Notes / preliminary analysis

No response

Additional links and references

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions