Piasy / BigImageViewer

Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻
MIT License
3.98k stars 400 forks source link

Fatal Exception: java.lang.NullPointerException #207

Closed tom5079 closed 3 years ago

tom5079 commented 3 years ago

FrescoImageLoader with URI.EMPTY causes NPE Should show failureImage instead of the exception

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'android.net.Uri com.facebook.imagepipeline.request.ImageRequest.mSourceUri' on a null object reference
       at com.facebook.imagepipeline.request.ImageRequest.getSourceUri(ImageRequest.java:150)
       at com.facebook.imagepipeline.cache.DefaultCacheKeyFactory.getEncodedCacheKey(DefaultCacheKeyFactory.java:68)
       at com.github.piasy.biv.loader.fresco.FrescoImageLoader.getCacheFile(FrescoImageLoader.java:188)
       at com.github.piasy.biv.loader.fresco.FrescoImageLoader.loadImage(FrescoImageLoader.java:92)
       at com.github.piasy.biv.view.BigImageView.showImage(BigImageView.java:415)
       at com.github.piasy.biv.view.BigImageView.showImage(BigImageView.java:400)
       at com.github.piasy.biv.view.BigImageView.showImage(BigImageView.java:396)