React-native-fast-image: Android app crashes after upgrade to 7.0.2 with Glide error

Created on 22 Jul 2019  路  3Comments  路  Source: DylanVann/react-native-fast-image

Describe the bug
After upgrading from "4.0.14" to 7.0.2 my app crashes randomly on app start with the following error:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.bumptech.glide.load.model.GlideUrl.toString()' on a null object reference
       at com.dylanvann.fastimage.FastImageViewManager.onDropViewInstance + 173(FastImageViewManager.java:173)
       at com.dylanvann.fastimage.FastImageViewManager.onDropViewInstance + 42(FastImageViewManager.java:42)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 622(NativeViewHierarchyManager.java:622)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView + 633(NativeViewHierarchyManager.java:633)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren + 491(NativeViewHierarchyManager.java:491)
       at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute + 228(UIViewOperationQueue.java:228)
       at com.facebook.react.uimanager.UIViewOperationQueue$1.run + 844(UIViewOperationQueue.java:844)
       at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches + 952(UIViewOperationQueue.java:952)
       at com.facebook.react.uimanager.UIViewOperationQueue.access$2200 + 44(UIViewOperationQueue.java:44)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded + 1012(UIViewOperationQueue.java:1012)
       at com.facebook.react.uimanager.GuardedFrameCallback.doFrame + 29(GuardedFrameCallback.java:29)
       at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame + 172(ReactChoreographer.java:172)
       at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame + 84(ChoreographerCompat.java:84)
       at android.view.Choreographer$CallbackRecord.run + 947(Choreographer.java:947)
       at android.view.Choreographer.doCallbacks + 761(Choreographer.java:761)
       at android.view.Choreographer.doFrame + 693(Choreographer.java:693)
       at android.view.Choreographer$FrameDisplayEventReceiver.run + 935(Choreographer.java:935)
       at android.os.Handler.handleCallback + 873(Handler.java:873)
       at android.os.Handler.dispatchMessage + 99(Handler.java:99)
       at android.os.Looper.loop + 193(Looper.java:193)
       at android.app.ActivityThread.main + 6718(ActivityThread.java:6718)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 493(RuntimeInit.java:493)
       at com.android.internal.os.ZygoteInit.main + 858(ZygoteInit.java:858)

Expected behavior
I would expect the app not to crash.

Dependency versions
"react-native-fast-image": "^7.0.2",

react-native info
System:
    OS: macOS 10.14.5
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 2.73 GB / 32.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 11.3.0 - /usr/local/bin/node
    Yarn: 1.12.3 - /usr/local/bin/yarn
    npm: 6.10.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    Android SDK:
      API Levels: 23, 26, 27, 28
      Build Tools: 23.0.1, 25.0.0, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3
      System Images: android-24 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react: ^16.8.6 => 16.8.6
    react-native: ^0.60.4 => 0.60.4
  npmGlobalPackages:
    eslint-plugin-react-native: 3.5.0
    react-native-cli: 2.0.1
    react-native-git-upgrade: 0.2.7
bug

All 3 comments

Same issue here

On average, how many times did you get this error in 10 times app openings?

Actually, I can't tell you anymore. 馃槄We have upgraded RN and also fast image and the crash doesn't show up anymore.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yeomann picture yeomann  路  4Comments

baba43 picture baba43  路  3Comments

StiffFy picture StiffFy  路  3Comments

mschipperheyn picture mschipperheyn  路  3Comments

kmilodenisglez picture kmilodenisglez  路  3Comments