null point at RotationOptions.disableRotation()
See original GitHub issueDescription
I get the NullPointException when disable rotation in loading a jpg file with rotation exif info. The error is below:
java.lang.NullPointerException: Attempt to invoke virtual method 'com.facebook.imageformat.ImageFormat com.facebook.imagepipeline.image.EncodedImage.getImageFormat()' on a null object reference
at com.facebook.imagepipeline.producers.ResizeAndRotateProducer$TransformingConsumer$1.run(ResizeAndRotateProducer.java:119)
at com.facebook.imagepipeline.producers.JobScheduler.doJob(JobScheduler.java:202)
at com.facebook.imagepipeline.producers.JobScheduler.access$000(JobScheduler.java:22)
at com.facebook.imagepipeline.producers.JobScheduler$1.run(JobScheduler.java:73)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
at java.lang.Thread.run(Thread.java:764)
Reproduction
The code is below:
val defaultImageRequest =
ImageRequestBuilder.newBuilderWithResourceId(R.drawable.image_ic_exif)
.setRotationOptions(RotationOptions.disableRotation())
.build()
image_fresco_rotation_default.controller =
Fresco.newDraweeControllerBuilder()
.setImageRequest(defaultImageRequest)
.build()
image_ic_exif is a jpg file with rotation info.
Additional Information
- Fresco version: v2.0.0
- Platform version: Android 9
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Vue Charts: Axes - AG Grid
A chart uses axes to plot data such as categories and values by converting them to screen coordinates. Since any point on the...
Read more >Changelog — Supervisor 4.2.4 documentation - Supervisord
Fixed a bug where searching for a relative command ignored changes to PATH made in environment=. Based on a patch by dongweiming. childutils....
Read more >FAQ | Frequently Asked Questions - PDF3D
Can I merge 3D point clouds and CAD models into a common 3D PDF view? PDF3D systems allow for merging multiple files at...
Read more >highcharts-rails - Versions diffs - 6.0.2 → 6.0.3 - Mend - Diffend
+ * Fixed #7369, scatter chart with series containing points with null and ... noop: function() { ... + * Set it to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please refer to this project: https://github.com/liujinchaoDS/FrescoRotation. In this code, I load the same drawable into two drawee, and the first with RotationOptions.disableRotation(), and the last with RotationOptions.autoRotate(). This will cause a NullPointException.But I change the call order, that is the first is autoRotate, the last is disableRotation. This will load success and without exception. Why?
Thanks for reporting and providing a sample app!