picasso: Exception: java.io.IOException: Cannot reset
Hi Square team!
We are having an issue in an app, when in a listview, images on some rows load but some of them are blank. I tried to trace it and collect as much information as I can.
Exception
Picasso:Error:ImageLoadFailed:Uri http://store.indemand.com/shared/ovs/prodimages/movies/t/troublewiththecurve_ID0360906/troublewiththecurveBM_ID0360906.jpg
Picasso:Error:ImageLoadFailed:Exception java.io.IOException: Cannot reset
Picasso:Error:ImageLoadFailed:StackTrace
[
com.squareup.picasso.MarkableInputStream.reset(MarkableInputStream.java:94),
com.squareup.picasso.NetworkBitmapHunter.decodeStream(NetworkBitmapHunter.java:91),
com.squareup.picasso.NetworkBitmapHunter.decode(NetworkBitmapHunter.java:60),
com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:111),
com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:82),
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390),
java.util.concurrent.FutureTask.run(FutureTask.java:234),
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080),
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573),
java.lang.Thread.run(Thread.java:856),
com.squareup.picasso.Utils$PicassoThread.run(Utils.java:218)
]
Responsible code (under getView())
pBuilder.build().load(URL).fit().into(ImageView);
By the way, I don’t know if it matters but airplane mode is on, but wifi is connected. I added this because with every row loading, I am seeing this in logs:
W/Settings(4289): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
Also the app crashed with this, after scrolling through the list up and down many times;
A/Looper(4289): Could not create wake pipe. errno=24
A/libc(4289): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 5091 (Picasso-Dispatc)
A/libc(4289): Unable to open connection to debuggerd: Too many open files
The app doesn’t seem to crash and I also didn’t see the W/Settings airplane message if I switch to
Picasso.with(_context).load(URL).fit().into(imageView);
style instead of Picasso.Builder.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 72 (12 by maintainers)
Links to this issue
Commits related to this issue
- increase buffer for checking jpeg bounds temporary. see https://github.com/square/picasso/issues/364 — committed to youandmeconcierge/picasso by deleted user 10 years ago
- Changed version of Picasso back to 2.4.0 since 2.5.2 is buggy with resizing the image. See https://github.com/square/picasso/issues/364 — committed to chrjsorg/imgur-android by chrjsorg 9 years ago
- Update BitmapHunter.java — committed to francescopedronomnys/picasso by francescopedronomnys 9 years ago
- Upgrade to Picasso snapshot to fix bug square/picasso#364 — committed to ZeusWPI/hydra-android by niknetniko 7 years ago
3.0.0 is next
On Mon, Jan 9, 2017 at 2:15 PM Etienne Lawlor notifications@github.com wrote:
It’ll happen eventually.
On Mon, Apr 25, 2016 at 6:00 PM dimsuz notifications@github.com wrote:
Upgrading to 2.5.3-SNAPSHOT fixes the issue. Thanks!
The metadata for every image format is present in the first 1024 bytes of the image. The images on which Android decides to read a ton of data on a metadata-only decode contain the relevant data in the first 1024 bytes. Something is causing the native decoding libraries to read much more data than they need to fulfill the metadata decode we are requesting.
@yayaa looking into the commit history #1280 with the fix is included in
2.71828
. Changes comparison for the reference: https://github.com/square/picasso/compare/picasso-parent-2.5.2...2.71828If there is already a snapshot for 2.5.3 then does that mean v2.5.3 is coming in a few months from now?
@martygeek @Maragues cannot found 2.5.3-SNAPSHOT , @JakeWharton When will the 3.0.0 come out?
Could someone publish whatever code is in 2.5.3-SNAPSHOT as a release version please?
Same problem on Moto G(6.0) with Picasso version 2.5.2, but it works well with 2.6.0-SNAPSHOT. Picasso release is needed.
Pull requests are welcome.
On Tue, Nov 10, 2015 at 12:59 PM Anil Sharma notifications@github.com wrote: