Using 2.6.0-SNAPSHOT on Android 6.0.1 I am getting the following Exception when trying to load local files:
W/ExifInterface: Invalid image.
java.io.IOException: Invalid marker: 89
at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1600)
at android.media.ExifInterface.loadAttributes(ExifInterface.java:1339)
at android.media.ExifInterface.<init>(ExifInterface.java:1057)
at com.squareup.picasso.FileRequestHandler.getFileExifRotation(FileRequestHandler.java:43)
at com.squareup.picasso.FileRequestHandler.load(FileRequestHandler.java:39)
at com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:217)
at com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:170)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Seems like an Android bug then. What makes you think it's a Picasso problem?
Just tried with Android N and the error disappeared 🙌
@eygraber it's still there, are you sure N fixed that?
Using an emulator with N fixed it for me. I know there was a lot of work with ExifInterface in N. Are you using the 2.6.0-SNAPSHOT?
@eygraber Yes I'm using the snapshot and I have a device with N on it ( 7.0.1)
¯_(ツ)_/¯
Hello,
I'm sorry to ask that here but could somebody explain me what this "marker" designate ?
I have a similar exception :
java.io.IOException: Invalid marker: ef
at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1635)
at android.media.ExifInterface.loadAttributes(ExifInterface.java:1344)
at android.media.ExifInterface.<init>(ExifInterface.java:1062)
at com.squareup.picasso.FileRequestHandler.getFileExifRotation(FileRequestHandler.java:46)
....
and I don't know where to start.
I've tried to compile Picasso using the android support library for ExifInterface and it seems to fix the issue
For instance, I've added "com.android.support:exifinterface:25.3.1"
to the build.gradle and edited every ExifInterface call to use android.support.media.ExifInterface instead of the native android.media.ExifInterface
Most helpful comment
I've tried to compile Picasso using the android support library for ExifInterface and it seems to fix the issue
For instance, I've added
"com.android.support:exifinterface:25.3.1"to the build.gradle and edited every ExifInterface call to use
android.support.media.ExifInterfaceinstead of the nativeandroid.media.ExifInterface