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

NPE in ImageLoaderEngine, v1.8.3 #301

Closed
JesseBuesking opened this issue Jun 5, 2013 · 2 comments
Closed

NPE in ImageLoaderEngine, v1.8.3 #301

JesseBuesking opened this issue Jun 5, 2013 · 2 comments
Labels

Comments

@JesseBuesking
Copy link

I'm getting a NPE reported by Crittercism when using UIL:

0   java.lang.NullPointerException
1   at com.nostra13.universalimageloader.core.ImageLoaderEngine$1.run(ImageLoaderEngine.java:73)
2   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
3   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
4   at java.lang.Thread.run(Thread.java:856)

The issue is on this line. By looking over the source, it doesn't seem possible for a null task to be supplied, so it seems as though the view is being destroyed or the back button is being pressed before the executor runs, so the taskExecutorForCachedImages is null at this point.

I'm running v1.8.3 and the line I linked to is for that version as well. Also, this is all that Crittercism is reporting.

@guoyongxin
Copy link

You mean the task is not null, and the taskExecutorForCachedImages is null?
It's so wired...
I think after you init the ImageLoader, ther executors can't be null...

Is it possible for GC to reclaim the view when the task is accidentally running to the view.setImageXXX?

@nostra13
Copy link
Owner

nostra13 commented Jun 7, 2013

I think it could happen after ImageLoader.stop().

JesseBuesking pushed a commit to JesseBuesking/Android-Universal-Image-Loader that referenced this issue Jun 7, 2013
nostra13 added a commit that referenced this issue Jun 26, 2013
Not null executors, shutdown built-in executors on engine stop
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

3 participants