[TIMOB-2607] Android: ImageView Fails When Loading Remote Image
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:59:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M05 |
Components | Android |
Labels | android, defect, imageview, regression, release-1.6.0, reported-1.5.0, rplist |
Reporter | Ryan Asleson |
Assignee | Don Thorp |
Created | 2011-04-15T03:24:32.000+0000 |
Updated | 2011-04-17T01:59:35.000+0000 |
Description
Hello,
After upgrading to the Titanium 1.5 and 1.5.1 SDK, my application can no longer load remote images via an ImageView on Android. It causes a force close. If I build with the previous 1.4.2 SDK the problem goes away, so I'm pretty sure it's a regression in the new SDK.
I built a test case that seems to demonstrate the problem. Use the attached app.js in a new project and deploy the attached image to a local server, then update line 34 in the attached app.js to use the URL to the image. When you run the project (I used the 2.3 emulator) it will fail sometime after it loads the image; if you use the 1.4.2 SDK it won't fail.
I hope the test case helps track down the issue. This is a show stopper for my application. Thank you so much for all the great work on Appcelerator Titanium!!
-Ryan
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-04-15T03:24:34.000+0000 | 2025 |
login-photo.jpg | 2011-04-15T03:24:34.000+0000 | 31931 |
It looks like other users are seeing it too:
http://developer.appcelerator.com/question/91101/imageview-problem-after-upgrading-to-151"> http://developer.appcelerator.com/question/91101/imageview-problem-...
Not sure if this is the proper venue, but ...
I reported a similar problem via the forums (http://developer.appcelerator.com/question/91101/imageview-problem-after-upgrading-to-151)">http://developer.appcelerator.com/question/91101/imageview-problem-.... Originally I thought my problem was the same as this ticket, but now I'm not so sure.
For me, I can make the remote image fail every time if the phone (Android, 2.2) is plugged in via the USB port for either USB Mass Storage or Charge Only modes. But if the phone is plugged in via PC Mode or Windows Media Syne modes, the remote image load works flawlessly every time.
So I'm not sure if this is really related or not - but I wanted to mention it ...
Updating state to reflect current status.
Got a pro client asking for this fix as well.
Simpler Sample Code
Tested On
Titanium Mobile 1.6.0 pulled January 8th, 2011
WORKS on iPhone Simulator 4.2
BROKEN on Android Simulator 2.2
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/64041">http://developer.appcelerator.com/helpdesk/view/64041
This one is preventing me from taking my android app live. I'd also like to see this bug fixed soon if possible.
http://developer.appcelerator.com/question/99781/remote-images-not-loading-in-160-on-android-imageview"> This question in the Q&A confirms it's not working for 1.6.0, although user claims 1.5.1 works OK.
Verified, working in 1.5.1, thanks for the tip hal.
request from two pro seats is to include this fix on the 1.5.x branch, but it looks like it might be there already? Should verify before closing ticket in any case.
(from [608046073c1c29c58a000397404c44897c4c7d17]) [#2607 state:fixed-in-qa] reworked background downloading to be less complex and to also correctly handle already cached images. https://github.com/appcelerator/titanium_mobile/commit/608046073c1c29c58a000397404c44897c4c7d17"> https://github.com/appcelerator/titanium_mobile/commit/608046073c1c...
[INFO] Titanium SDK version: 1.6.0 (01/14/11 10:32 43fff62) g1 (1.6) droid1 (2.2.1) sim 2.1. as per Kevin, checked [INFO] Titanium SDK version: 1.5.2 (01/14/11 10:34 8e8e048) and saw no issue.
Works FINE on HTC Desire on both 1.5.2 and 1.6.0 RC1
HTC Desire HD:
SDK 1.5.2
Fatal Exception on HTC Desire HD (App closes and Error Closes) on loading remote image
SDK 1.6.0 RC1
No Exception but image does not load on HTC Desire HD on 1.6.0 (local images load ok)
Further Information regarding Failure On HTC Desire HD Device:
Titanium SDK:
version=1.6.0
timestamp=02/18/11 15:10
githash=30eec59
The following trace shows that the device cannot find the image. Perhaps the device is trying to find the URL locally ?
I have tested the above URL using the devices browser and it loads up there fine.
It makes no difference how the device is connected to the internet, via Mobile Network or WiFi has the same result where the HTC Desire has no problem.
Chris, it's best to report the issue you are encountering via helpdesk or Q&A. Thanks!
Is this Problem fixed? I am getting the same error. Please provide me a fix for that.
Is this Problem fixed? I am getting the same error. Please provide me a fix for that.
In the 1.6.0 Release this is working for me. The issue with the HTC Desire HD I was having above was due to a dodgy SD Card, since the images are cached to the SD Card.
Stating which version of Titanium SDK and android SDK you are using would be helpful!
Also, Sorry I have to make another post because I cant edit my last post, like Thomas said to me its probably best to get support for your problem on the helpdesk, or there is a relevant ticket in the community Q&Ahttp://developer.appcelerator.com/question/99781/remote-images-not-loading-in-160-on-android-imageview" title="Here">here