question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

null point at RotationOptions.disableRotation()

See original GitHub issue

Description

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:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Charles-ljccommented, Jul 18, 2019

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?

0reactions
defHLTcommented, Jul 30, 2019

Thanks for reporting and providing a sample app!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found