[TIMOB-1507] Android: Remote images in ImageView/TableView sporadically causes NPE
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-08-20T15:50:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, defect, imageview, tableview |
Reporter | Marshall Culpepper |
Assignee | Neeraj Gupta |
Created | 2011-04-15T02:54:40.000+0000 |
Updated | 2017-03-22T20:51:19.000+0000 |
Description
It looks like loadDrawable() in TiBackgroundImageLoadTask (line 58) is returning a BitmapDrawable that has a null Bitmap in some instances, we need to more gracefully handle that situation. See helpdesk #35081.
For another customer yesterday I made this change:
http://github.com/appcelerator/titanium_mobile/commit/91ddf8884ecc961369cb131b635d91c102eb2cc8"> http://github.com/appcelerator/titanium_mobile/commit/91ddf8884ecc9...
I thought maybe the NPE could be the context ref itself. But indeed maybe it's at the Bitmap level.
Add'l commit to try to eliminate NPEs from null bitmap:
http://github.com/appcelerator/titanium_mobile/commit/a750b594219fccef60906e5a886178da991b35dc"> http://github.com/appcelerator/titanium_mobile/commit/a750b594219fc...
The last commit doesn't address the perhaps deeper problem as to why a bitmap might be null in the first place.
(from [a750b594219fccef60906e5a886178da991b35dc]) [#1507 status:open] Try to eliminate the occasional NPEs from background image loading by verifying bitmap is not null before accessing its properties http://github.com/appcelerator/titanium_mobile/commit/a750b594219fccef60906e5a886178da991b35dc"> http://github.com/appcelerator/titanium_mobile/commit/a750b594219fc...
No test case, unable to reproduce and link doesn't work, marking ticket as invalid.
Closing ticket as invalid with reference to the above comments.