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

IllegalArgument IP:null #28

Closed
lalith-b opened this issue Oct 18, 2013 · 7 comments
Closed

IllegalArgument IP:null #28

lalith-b opened this issue Oct 18, 2013 · 7 comments
Labels

Comments

@lalith-b
Copy link

Glide doesn't download few image urls and throws this exception but the image exists when I hit the url.

10-18 16:13:00.120: E/GLIDE(1938): IP: onImageLoadException model= http://d1zkqjnzjf7z4q.cloudfront.net/public/images/product_images/55905/medium/4652a87ce1a3f600a63c54ed7e59ec52.jpg
10-18 16:13:00.120: W/System.err(1938): java.lang.IllegalArgumentException: IP: null result, sampleSize=1
10-18 16:13:00.120: W/System.err(1938):     at com.bumptech.glide.resize.load.Downsampler.decodeStream(Downsampler.java:187)
10-18 16:13:00.120: W/System.err(1938):     at com.bumptech.glide.resize.load.Downsampler.downsampleWithSize(Downsampler.java:114)
10-18 16:13:00.120: W/System.err(1938):     at com.bumptech.glide.resize.load.Downsampler.downsample(Downsampler.java:98)
10-18 16:13:00.120: W/System.err(1938):     at com.bumptech.glide.resize.load.ImageResizer.load(ImageResizer.java:113)
10-18 16:13:00.120: W/System.err(1938):     at com.bumptech.glide.resize.ImageManager$ImageManagerRunner.resizeIfNotFound(ImageManager.java:573)
10-18 16:13:00.120: W/System.err(1938):     at com.bumptech.glide.resize.ImageManager$ImageManagerRunner.access$4(ImageManager.java:572)
10-18 16:13:00.120: W/System.err(1938):     at com.bumptech.glide.resize.ImageManager$ImageManagerRunner$1$1$1.run(ImageManager.java:554)
10-18 16:13:00.120: W/System.err(1938):     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
10-18 16:13:00.120: W/System.err(1938):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
10-18 16:13:00.120: W/System.err(1938):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
10-18 16:13:00.120: W/System.err(1938):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
10-18 16:13:00.120: W/System.err(1938):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
10-18 16:13:00.120: W/System.err(1938):     at java.lang.Thread.run(Thread.java:856)
@sjudd
Copy link
Collaborator

sjudd commented Oct 20, 2013

Thanks for the report and the test case! I'll look in to it. The null result exception is also probably not ideal...

@sjudd
Copy link
Collaborator

sjudd commented Oct 20, 2013

I just tried loading the image and was unable to reproduce this exception using the following snippet:

Glide.load("http://d1zkqjnzjf7z4q.cloudfront.net/public/images/product_images/55905/medium/4652a87ce1a3f600a63c54ed7e59ec52.jpg")
            .into((ImageView) findViewById(R.id.test_image_view));

where test_image_view is:

<ImageView
  android:id="@+id/test_image_view"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content" />

Can you still reproduce this? If so can you paste the Glide line you're using?

@lalith-b
Copy link
Author

When loading these images on a listview the images don't load. I will mail you a sample code if needed.

The best probable way to reproduce a lot of these bugs is to load images on a gridview from creating a list of images from onloadresouce in a webview.

@sjudd
Copy link
Collaborator

sjudd commented Nov 5, 2013

If you can send some sample code, I'm definitely curious. That exception will essentially only occur if BitmapFactory fails to decode a Bitmap from a given url, which should be pretty rare. It might be that the image has a huge or malformed header, but I'd expect that would be reproducible...

@leventepal
Copy link

I am using PullToRefresh + StaggeredGridView and Glide+Volley for image caching and everything works fine until I reach 100 image download. If I scroll back to top, I am getting the following error messages:

11-25 13:46:43.848: E/GLIDE(17027): IP: onImageLoadException model=
11-25 13:46:43.848: W/System.err(17027): java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
11-25 13:46:43.848: W/System.err(17027): at libcore.io.IoBridge.open(IoBridge.java:416)
11-25 13:46:43.848: W/System.err(17027): at java.io.FileInputStream.(FileInputStream.java:78)
11-25 13:46:43.848: W/System.err(17027): at java.io.FileInputStream.(FileInputStream.java:105)
11-25 13:46:43.848: W/System.err(17027): at android.content.ContentResolver.openInputStream(ContentResolver.java:447)
11-25 13:46:43.848: W/System.err(17027): at com.bumptech.glide.loader.stream.LocalUriLoader.loadStream(LocalUriLoader.java:38)
11-25 13:46:43.848: W/System.err(17027): at com.bumptech.glide.resize.ImageManager$ImageManagerRunner$1.run(ImageManager.java:568)
11-25 13:46:43.848: W/System.err(17027): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
11-25 13:46:43.848: W/System.err(17027): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
11-25 13:46:43.848: W/System.err(17027): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-25 13:46:43.848: W/System.err(17027): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
11-25 13:46:43.848: W/System.err(17027): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
11-25 13:46:43.853: W/System.err(17027): at java.lang.Thread.run(Thread.java:856)
11-25 13:46:43.853: W/System.err(17027): Caused by: libcore.io.ErrnoException: open failed: EISDIR (Is a directory)
11-25 13:46:43.853: W/System.err(17027): at libcore.io.IoBridge.open(IoBridge.java:405)
11-25 13:46:43.853: W/System.err(17027): ... 11 more

@sjudd
Copy link
Collaborator

sjudd commented Nov 25, 2013

@leventepal Thanks for reporting the problem, next time feel free to open a new issue if you're seeing an unrelated exception so we can keep the threads more or less on topic. That particular exception is because you're passing '/' as a path or a file uri to Glide. Make sure the uris or paths you pass in are valid files and it should work.

@sjudd
Copy link
Collaborator

sjudd commented Mar 20, 2014

I'm pretty sure this is a dupe of #23 and again I believe that is now fixed. Please do reopen if you still see an issue after pulling down f8a7681.

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

4 participants