react-native-maps: Android AirMapMarker.getIcon crash

Bug

Our users have been experiencing an occasional but disruptive crash when returning to our app’s main map screen on Android:

java.lang.RuntimeException: Could not allocate dup blob fd.

Here’s the full stacktrace:

android.graphics.Bitmap.nativeCreateFromParcel Bitmap.java
android.graphics.Bitmap.-wrap0
android.graphics.Bitmap$1.createFromParcel Bitmap.java:1779
android.graphics.Bitmap$1.createFromParcel Bitmap.java:1772
cn.a :com.google.android.gms.dynamite_mapsdynamite@20104048@20.1.04 (040400-0):5
com.google.android.gms.maps.model.internal.a.a :com.google.android.gms.dynamite_mapsdynamite@20104048@20.1.04 (040400-0):6
cm.onTransact :com.google.android.gms.dynamite_mapsdynamite@20104048@20.1.04 (040400-0):5
android.os.Binder.transact Binder.java:608
com.google.android.gms.internal.maps.zza.zza
com.google.android.gms.internal.maps.zzg.zza
com.google.android.gms.maps.model.BitmapDescriptorFactory.fromBitmap
com.airbnb.android.react.maps.AirMapMarker.getIcon AirMapMarker.java:469
com.airbnb.android.react.maps.AirMapMarker.updateMarkerIcon AirMapMarker.java:297
com.airbnb.android.react.maps.AirMapMarker.updateCustomForTracking AirMapMarker.java:284
com.airbnb.android.react.maps.ViewChangesTracker.update ViewChangesTracker.java:63
com.airbnb.android.react.maps.ViewChangesTracker$1.run ViewChangesTracker.java:23
android.os.Handler.handleCallback Handler.java:789
android.os.Handler.dispatchMessage Handler.java:98
android.os.Looper.loop Looper.java:164
android.app.ActivityThread.main ActivityThread.java:6709
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.Zygote$MethodAndArgsCaller.run Zygote.java:240
com.android.internal.os.ZygoteInit.main ZygoteInit.java:769

Environment info

React native info output:

  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.6 => 0.60.6 
  npmGlobalPackages:
    react-native-animatable: 1.3.3

Library version: 0.26.1

Steps To Reproduce

We haven’t been able to reproduce this directly but were hoping to see if anyone else has encountered this issue. It’s most common for devices running Android 8.0, with a few 6.1.1 instances.

We’re rendering approximately 25 markers on the mapview with three different animated map marker images. According to crash reports users seem to be experiencing it upon a navigation return to the mapview.

Reproducible sample code

Approximately for MapView:

        <MapView
          initialRegion={this.props.initialRegion}
          loadingEnabled={false}
          moveOnMarkerPress={false}
          showsMyLocationButton={false}
          showsUserLocation
          userLocationAnnotationTitle=''
        >
          {this.state.showMarkers && this.getMarkers()}
        </MapView>

Markers:

      <Marker
        coordinate={this.props.location}
        onPress={this.onMarkerPress}
        zIndex={1}
      >
        <Animatable.Image
          animation={'bounceInDown'}
          delay={this.state.delay}
          duration={this.state.duration}
          iterationCount={1}
          onAnimationEnd={this.onAnimationEnd}
          useNativeDriver
          source={this.getMarkerImage()} />
      </Marker>

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 23

Most upvoted comments

+1 to this. I’m also facing the same issue.

Just to confirm I also get the same issue, suggest the issue is re opened?

i’m facing this problem too, is there any workarounds for this ??