Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7717] Android: UI.ImageView - Complex/autogenerated remote image URLs not rendered on device

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2013-02-27T12:35:07.000+0000
Affected Version/sRelease 1.8.1
Fix Version/sRelease 3.0.2
ComponentsAndroid
Labelsapi
ReporterCameron
Assigneejithinpv
Created2012-01-29T05:38:55.000+0000
Updated2017-05-31T22:39:16.000+0000

Description

Problem

A standard Imageview using a remote image with a complex/autogenerated URL is not rendered on any of the test devices. Could it have to do with the lack of a file extension in the URL? Note that the emulator does not exhibit this issue, and iOS works fine as well.

Test case

var win = Ti.UI.createWindow({
  backgroundColor:'white',
  fullscreen:false,
  title: 'Complex URL Remote ImageView Demo'
});

var imgwimage = Ti.UI.createImageView({
  image:'http://www.atsforums.com/forums/attachment.php?attachmentid=216&stc=1&d=1326113517'
});

win.add(imgwimage);
win.open();

Logs

logcat generated from an HTC Sensation
D/SurfaceFlinger(  235): [DISP] removeAbnormalLayer
D/SurfaceFlinger(  235): [DISP] layer 0x852918(Layer, 235) 1 1
D/dalvikvm(16427): GC_EXPLICIT freed 79K, 46% free 3184K/5831K, external 20K/532K, paused 161ms
I/ActivityManager(  235): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.appcelerator.testing10/.Testing10Activity } from pid 500
V/HtcAppUsageStats(  235): handleMessage msg=1
V/HtcAppUsageStats(  235): (launch app, package): (testing10, com.appcelerator.testing10)
D/PhoneWindow(  500): couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView@40587588 has no id.
D/SensorService(  235): enable: get sensor name = MPL accel
D/Sensors (  235): handle : 4 en: 1, v07-Correct timerirq initial delay setting
D/Sensors (  235): mEnabled = 0x10
I/        (  235): mpu3050_resume: Resuming to 0070
D/SensorService(  235): pid=235, uid=1000
W/TiApplication(16677): (main) [6533,8304] activity stack is emtpy, unable to get current activity
I/TiRootActivity(16677): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
D/Database(16677): dbopen(): path = /data/data/com.appcelerator.testing10/databases/tianalytics.db, flag = 6, file size = 6144
D/Database(16677): dbopen(): path = /data/data/com.appcelerator.testing10/databases/tianalytics.db, mode: wal, disk free size: 361 M, handle: 0x3e9ce0
D/Database(16677): dbclose(): path = /data/data/com.appcelerator.testing10/databases/tianalytics.db, handle = 0x3e9ce0
D/Database(16677): dbopen(): path = /data/data/com.appcelerator.testing10/databases/tianalytics.db, flag = 6, file size = 6144
D/Database(16677): dbopen(): path = /data/data/com.appcelerator.testing10/databases/tianalytics.db, mode: wal, disk free size: 361 M, handle: 0x3d8e18
W/dalvikvm(  500): disableGcForExternalAlloc: false
W/libagl  (  235): handle fade alpha 7
W/libagl  (  235): handle fade alpha 16
D/SurfaceFlinger(  235): [DISP] purgatorizeLayer_l 0x1484538 4
D/SurfaceFlinger(  235): [DISP] purgatorizeLayer_l 0x8fca18 4
D/Database(16677): dbclose(): path = /data/data/com.appcelerator.testing10/databases/tianalytics.db, handle = 0x3d8e18
W/libagl  (  235): handle fade alpha 31
D/SurfaceFlinger(  235): [DISP] remove 0x8fca18 2
D/SurfaceFlinger(  235): [DISP] remove 0x1484538 2
W/libagl  (  235): handle fade alpha 36
W/libagl  (  235): handle fade alpha 53
W/libagl  (  235): handle fade alpha 72
W/TiApplication(16677): (main) [191,191] activity stack is emtpy, unable to get current activity
W/TiApplication(16677): (main) [1,192] activity stack is emtpy, unable to get current activity
W/TiApplication(16677): (main) [0,192] activity stack is emtpy, unable to get current activity
W/libagl  (  235): handle fade alpha 92
W/libagl  (  235): handle fade alpha 113
W/libagl  (  235): handle fade alpha 134
W/libagl  (  235): handle fade alpha 155
W/libagl  (  235): handle fade alpha 196
W/libagl  (  235): handle fade alpha 214
W/libagl  (  235): handle fade alpha 228
W/libagl  (  235): handle fade alpha 240
W/libagl  (  235): handle fade alpha 248
W/libagl  (  235): handle fade alpha 253
W/TiApplication(16677): (KrollRuntimeThread) [226,418] Registering module with name already in use.
E/TiApplication(16677): (KrollRuntimeThread) [0,418] APP PROXY: ti.modules.titanium.app.AppModule@405bd388
D/dalvikvm(16677): GC_FOR_MALLOC freed 174K, 40% free 3795K/6279K, external 0K/0K, paused 32ms
V/WidgetUpdateIntentService(16916):  Update Widget intent type : 0
I/ActivityManager(  235): Starting activity: Intent { cmp=com.appcelerator.testing10/org.appcelerator.titanium.TiActivity (has extras) } from pid 16677
I/TiRootActivity(16677): (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.testing10.Testing10Activity@40561938
W/InputManagerService(  235): [unbindCurrentClientLocked] Disable input method client.
W/InputManagerService(  235): [startInputLocked] Enable input method client.
I/ActivityManager(  235): Displayed com.appcelerator.testing10/org.appcelerator.titanium.TiActivity: +80ms (total +738ms)
W/libagl  (  235): handle fade alpha 238
W/libagl  (  235): handle fade alpha 211
W/libagl  (  235): handle fade alpha 187
W/TiDrawableReference(16677): (main) [142,142] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled.
D/skia    (16677): --- SkImageDecoder::Factory returned null
W/libagl  (  235): handle fade alpha 165
W/libagl  (  235): handle fade alpha 143
W/libagl  (  235): handle fade alpha 124
W/libagl  (  235): handle fade alpha 106
W/libagl  (  235): handle fade alpha 89
W/libagl  (  235): handle fade alpha 73
W/libagl  (  235): handle fade alpha 60
W/libagl  (  235): handle fade alpha 46
W/libagl  (  235): handle fade alpha 36
W/libagl  (  235): handle fade alpha 26
W/libagl  (  235): handle fade alpha 18
W/libagl  (  235): handle fade alpha 12
W/libagl  (  235): handle fade alpha 6
W/libagl  (  235): handle fade alpha 3
W/libagl  (  235): handle fade alpha 1
D/TiUIImageView(16677): (main) [257,399] Retrying bitmap decode: 1/5
W/TiDrawableReference(16677): (main) [2,401] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled.
D/skia    (16677): --- SkImageDecoder::Factory returned null
D/SurfaceFlinger(  235): [DISP] purgatorizeLayer_l 0xe84018 4
D/SurfaceFlinger(  235): [DISP] remove 0xe84018 2
I/ActivityManager(  235): Process com.abcOrganizer.lite (pid 16940) has died.
D/TiUIImageView(16677): (main) [253,654] Retrying bitmap decode: 2/5
W/TiDrawableReference(16677): (main) [2,656] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled.
D/skia    (16677): --- SkImageDecoder::Factory returned null
D/TiUIImageView(16677): (main) [252,908] Retrying bitmap decode: 3/5
W/TiDrawableReference(16677): (main) [3,911] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled.
D/skia    (16677): --- SkImageDecoder::Factory returned null
D/TiUIImageView(16677): (main) [261,1172] Retrying bitmap decode: 4/5
W/TiDrawableReference(16677): (main) [3,1175] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled.
D/skia    (16677): --- SkImageDecoder::Factory returned null
D/dalvikvm(16677): GC_CONCURRENT freed 684K, 46% free 3551K/6471K, external 0K/0K, paused 5ms+6ms
D/TiUIImageView(16677): (main) [277,1452] Retrying bitmap decode: 5/5
W/TiDrawableReference(16677): (main) [4,1456] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled.
D/skia    (16677): --- SkImageDecoder::Factory returned null
E/TiUIImageView(16677): (main) [18,1474] Max retries reached, giving up decoding image source: http://www.atsforums.com/forums/attachment.php?attachmentid=216&stc=1&d=1326113517
D/BatteryService(  235): SendIntentforPowersaver
D/BatteryService(  235): Current powersaver status == NORMAL_STATUS
D/WifiService(  235): [smart wifi] mSmartWiFiStatus: 0 mBatteryLevel: 10 mWifiConnected: true
D/WifiService(  235): [smart wifi] ACTION_BATTERY_CHANGED pluggedType: 2
I/LlamaDroid( 1219): IntentReceiver.onReceive
I/LlamaDroid( 1219): Service already started
I/LlamaDroid( 1219): Intent Action is android.intent.action.BATTERY_CHANGED
I/LlamaDroid( 1219): Service exists, preparing for OnBatteryEvent
I/LlamaDroid( 1219): BatteryReceiver.onReceive Extra_plugged was 2, extraStatus was 2
I/LlamaDroid( 1219): TestEvent: StateChange triggertype=12 got 0 triggerable events.
I/LlamaDroid( 1219): Events to Enqueue 0
I/LlamaDroid( 1219): IntentProfile: android.intent.action.BATTERY_CHANGED > 63
I/LlamaDroid( 1219): SW-RtcWakeLock: RtcWakeLock wakelock not held
V/WidgetUpdateIntentService(16916):  Update Widget intent type : 0
D/skia    (  500): purging 93K from font cache [12 entries]
D/dalvikvm(  500): GC_EXPLICIT freed 672K, 45% free 5878K/10503K, external 9555K/11603K, paused 111ms
V/WidgetUpdateIntentService(16916):  Update Widget intent type : 0
D/dalvikvm(  582): GC_EXPLICIT freed 168K, 44% free 3776K/6727K, external 2025K/2537K, paused 181ms
V/WidgetUpdateIntentService(16916):  Update Widget intent type : 0
D/dalvikvm(10646): GC_EXPLICIT freed 6K, 42% free 3165K/5447K, external 0K/0K, paused 36ms

Discussions

Q&A: [basic imageview fails on android device when using an image from a forum](http://developer.appcelerator.com/question/132375/basic-imageview-fails-on-android-device-when-using-an-image-from-a-forum)

Comments

  1. Paul Dowsett 2012-02-02

    Thanks for raising this, Cameron. Please would you review the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist) and edit the ticket to add the missing information. Note that it's always a good idea to start with the [JIRA Ticket Template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template), to help ensure that tickets are in the recommended format. Many thanks
  2. Cameron 2012-02-02

    Paul, Im sincerely sorry about the missing information, I'm still getting a handle on what information is required. I've added in what I can. I unfortunatly do not have logs (or know how to exactly get any?) and don't exactly know what is meant by runtime? Thanks for helping to correct this ticket!
  3. Nikolai Derzhak 2012-02-06

    This issue latest notification was not sent due to JIRA mail setting. Fixed now. Please check the issue for latests changes.
  4. Paul Dowsett 2012-02-18

    Hi Cameron Sorry that it took some time to get abck to this. Don't be discouraged - this ticket is good! Just follow its format for future. Note that you can obtain the log file of a device connected by USB, by running adb -d logcat from the command line. Thanks for raising this ticket, and for your effort in making it a quality one! :) I'm moving it across to the main project now.
  5. Cameron 2012-03-04

    Paul, Thanks again for all the help with this and glad to see this ticket has been promoted! Will do on the logfile the next time, I've learned alot in this process and hopefully when this gets fixed everyone can benefit! Take care
  6. jithinpv 2013-02-27

    i have tried this url from browser. It seems the path given is not existing.
  7. Cameron 2013-08-13

    Well yea, the bug was from over a year ago that is why the URL is gone, but the bug is very real. Heres a new URL to try ( http://www.golfmkv.com/forums/attachment.php?attachmentid=82016&stc=1&d=1329969125 ). I'll jump through whatever hoops you need me to jump through in the hope that this bug could be addressed, just let me know what is needed...
  8. Lee Morris 2017-05-31

    Closing ticket as invalid.

JSON Source