xunice / libs-for-android

Automatically exported from code.google.com/p/libs-for-android
Apache License 2.0
0 stars 0 forks source link

NullPointer #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When binding to multiple ImageViews within a BaseAdapter, ImageLoader will 
throw a NullPointerException if another activity is loaded over the current one 
when async bind requests are still pending.  

What steps will reproduce the problem?
1. Request to bind a number of remote images to ImageViews within a BaseAdapter
2. Load another activity on top before all requested images have finished 
loading
3. Boom goes the dynamite

What is the expected output? What do you see instead?
A different activity loaded on top of the previous one, which was utilizing 
ImageLoader on a ListView.  Instead, get a NullPointer of app-death.  

What version of the product are you using? On what operating system?
SDK Tools 11, targeting 1.6.  Not sure which version of ImageLoader, but it was 
the most recent version no earlier than a month ago.  

Please provide any additional information below.

Thread [<1> main] (Suspended (exception NullPointerException))  
    ListView.layoutChildren() line: 1662    
    ListView(AbsListView).onLayout(boolean, int, int, int, int) line: 1147  
    ListView(View).layout(int, int, int, int) line: 7035    
    FrameLayout.onLayout(boolean, int, int, int, int) line: 333 
    FrameLayout(View).layout(int, int, int, int) line: 7035 
    ActionBarHost(LinearLayout).setChildFrame(View, int, int, int, int) line: 1249  
    ActionBarHost(LinearLayout).layoutVertical() line: 1125 
    ActionBarHost(LinearLayout).onLayout(boolean, int, int, int, int) line: 1042    
    ActionBarHost(View).layout(int, int, int, int) line: 7035   
    FrameLayout.onLayout(boolean, int, int, int, int) line: 333 
    FrameLayout(View).layout(int, int, int, int) line: 7035 
    PhoneWindow$DecorView(FrameLayout).onLayout(boolean, int, int, int, int) line: 333  
    PhoneWindow$DecorView(View).layout(int, int, int, int) line: 7035   
    ViewRoot.performTraversals() line: 1045 
    ViewRoot.handleMessage(Message) line: 1727  
    ViewRoot(Handler).dispatchMessage(Message) line: 99 
    Looper.loop() line: 123 
    ActivityThread.main(String[]) line: 4627    
    Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
    Method.invoke(Object, Object...) line: 521  
    ZygoteInit$MethodAndArgsCaller.run() line: 868  
    ZygoteInit.main(String[]) line: 626 
    NativeStart.main(String[]) line: not available [native method]  

Original issue reported on code.google.com by Dudeibro...@gmail.com on 11 Jul 2011 at 6:05

GoogleCodeExporter commented 9 years ago
Are you using ImageLoader#bind(ImageView, String, Callback) or 
ImageLoader#bind(BaseAdapter, ImageView, String)?

Original comment by pbald...@google.com on 31 Jul 2011 at 1:54