Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glide doesn't work on Archos 50 Platinum #231

Closed
RobertoArtiles opened this issue Nov 3, 2014 · 5 comments
Closed

Glide doesn't work on Archos 50 Platinum #231

RobertoArtiles opened this issue Nov 3, 2014 · 5 comments
Labels
Milestone

Comments

@RobertoArtiles
Copy link

Hi there,

I think I've spotted some interesting bug.
I get the exception when try to load the image from the filesystem or web with this code:

Glide.with(context)
                    .load(uri)
                    .asBitmap()
                    .centerCrop()
                    .skipMemoryCache(true)
                    .diskCacheStrategy(DiskCacheStrategy.RESULT)
                    .into(sideSize, sideSize)
                    .get();

and

Glide.with(context)
                            .load(url)
                            .centerCrop()
                            .override(avatarSize, avatarSize)
                            .diskCacheStrategy(DiskCacheStrategy.ALL)
                            .error(R.drawable.profile_placeholder)
                            .into(viewHolder.image);

Exception for loading from the disk:

ERROR failed to load image
    java.util.concurrent.ExecutionException: com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException: Mark has been invalidated
            at com.bumptech.glide.request.RequestFutureTarget.doGet(RequestFutureTarget.java:208)
            at com.bumptech.glide.request.RequestFutureTarget.get(RequestFutureTarget.java:110)

...

     Caused by: com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException: Mark has been invalidated
            at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.reset(RecyclableBufferedInputStream.java:339)
            at com.bumptech.glide.util.ExceptionCatchingInputStream.reset(ExceptionCatchingInputStream.java:94)
            at com.bumptech.glide.load.resource.bitmap.Downsampler.decodeStream(Downsampler.java:305)
            at com.bumptech.glide.load.resource.bitmap.Downsampler.getDimensions(Downsampler.java:285)
            at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:132)
            at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:49)
            at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:18)
            at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:38)
            at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:19)
            at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:176)
            at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:163)
            at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:114)
            at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:121)
            at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:100)
            at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:57)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
            at java.util.concurrent.FutureTask.run(FutureTask.java:137)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
            at java.lang.Thread.run(Thread.java:856)
            at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:52)

Exception for loading from the web:

11-03 15:16:41.459    2839-3598/ D/skia﹕ ------- reset threw an exception
11-03 15:16:41.469    2839-3598/ W/System.err﹕ com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException: Mark has been invalidated
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.reset(RecyclableBufferedInputStream.java:339)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.util.ExceptionCatchingInputStream.reset(ExceptionCatchingInputStream.java:94)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:532)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.bitmap.Downsampler.decodeStream(Downsampler.java:301)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.bitmap.Downsampler.getDimensions(Downsampler.java:285)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:132)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:49)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:18)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:38)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:19)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeBitmapWrapper(GifBitmapWrapperResourceDecoder.java:120)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(GifBitmapWrapperResourceDecoder.java:93)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:70)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:60)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:21)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperStreamResourceDecoder.decode(GifBitmapWrapperStreamResourceDecoder.java:24)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperStreamResourceDecoder.decode(GifBitmapWrapperStreamResourceDecoder.java:14)
11-03 15:16:41.469    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.file.FileToStreamDecoder.decode(FileToStreamDecoder.java:39)
11-03 15:16:41.519    2839-3597/ D/dalvikvm﹕ GC_FOR_ALLOC freed 67K, 12% free 11532K/12999K, paused 47ms, total 47ms
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.resource.file.FileToStreamDecoder.decode(FileToStreamDecoder.java:17)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.DecodeJob.loadFromCache(DecodeJob.java:208)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.DecodeJob.cacheAndDecodeSourceData(DecodeJob.java:193)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:173)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:163)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:114)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:121)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:100)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:57)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at java.lang.Thread.run(Thread.java:856)
11-03 15:16:41.519    2839-3598/ W/System.err﹕ at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:52)

Works fine on other devices.
Images are just regular JPEGs.

P.S. I use the latest sonatype snapshot, not the release one. It worked before and with some latest update it stopped.

@sjudd
Copy link
Collaborator

sjudd commented Nov 3, 2014

What version of Android does that device have?

Willing to bet it broke here: deef4ae (see the rather extensive comment).

I'll look in to a better fix. Thanks for reporting this!

@RobertoArtiles
Copy link
Author

Android 4.1.2.
Thanks!

@RobertoArtiles
Copy link
Author

I checked the commit before deef4ae. You are right. It broke in deef4ae

@sjudd sjudd added the bug label Nov 3, 2014
@sjudd sjudd added this to the 3.4 milestone Nov 3, 2014
@sjudd
Copy link
Collaborator

sjudd commented Nov 3, 2014

Thanks for checking!

@sjudd
Copy link
Collaborator

sjudd commented Nov 3, 2014

Reproduced on 4.1.1 as well, I'll revert that commit for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants