-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.dylanvann.fastimage.FastImageSource.isResource()' on a null object reference #952
Comments
Hi! Same problem for me. Juste changed |
@thegdznet Thanks that works !!
@thegdznet Thanks!! That works |
Same issue here using a resource on defaultSource on prod build on Android. When source is null, I get the error. |
same issue here? |
Any news here? I'm facing the same issue. |
same issue |
null object makes app crash #973 is still open :/ |
To fix it in your code, make sure that you always pass to FastImage at least |
Thanx. Will check in ou code base. |
Describe the bug
The app crashed in release mode for android when run react-native-fast-image with defaultSouce, working well in debug mode.
Remark: iOS working well.
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.dylanvann.fastimage.FastImageSource.isResource()' on a null object reference at com.dylanvann.fastimage.FastImageViewConverter.getOptions(FastImageViewConverter.java:111) at com.dylanvann.fastimage.FastImageViewWithUrl.onAfterUpdate(FastImageViewWithUrl.java:143) at com.dylanvann.fastimage.FastImageViewManager.onAfterUpdateTransaction(FastImageViewManager.java:181) at com.dylanvann.fastimage.FastImageViewManager.onAfterUpdateTransaction(FastImageViewManager.java:33) at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:88) at com.facebook.react.uimanager.ViewManager.createViewInstance(ViewManager.java:188) at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:115) at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:281) at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:194) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1110) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1081) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1010) at android.view.Choreographer.doCallbacks(Choreographer.java:823) at android.view.Choreographer.doFrame(Choreographer.java:755) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:998) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6846) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:883)
To Reproduce
<FastImage defaultSource={require('./default-images/image-1.jpg')} source={{uri: 'https://pbs.twimg.com/profile_images/1455185376876826625/s1AjSxph_400x400.jpg'}} resizeMode={'cover'} style={{ height: 220, width: PRODUCT_CARD_WIDTH, borderTopLeftRadius: 10, borderTopRightRadius: 10, }} />
Expected behavior
Expected to show default picture from defaultSource if source image is unavailable.
Screenshots
App crashed directly when screen loaded.
Dependency versions
The text was updated successfully, but these errors were encountered: