Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2667] Problem displaying image from Google Maps API (Android)

GitHub Issuen/a
Resolution Date2011-04-17T01:59:45.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M07
Labelsandroid, defect, release-1.5.2, release-1.6.0, reported-1.5.1
ReporterKevin Whinnery
AssigneeDon Thorp


On the emulators I have tried (1.5.1 on APIs 2.2, 2.1, and 1.6) the following code is causing a crash:

var window = Titanium.UI.createWindow({fullscreen: false});
var imageMap = Titanium.UI.createImageView({
    image: "http://maps.google.com/maps/api/staticmap?center=11.5558762589,104.921697935&zoom=13&size=250x70&maptype=roadmap&markers=color:green|11.5558762589,104.921697935&sensor=false",
    height: 90,
    width: 200,
    borderColor: "#FFF"


Paste in an app.js file to recreate the error. Image seems to load up fine in the browser.




  1. Don Thorp 2011-04-15

    (from [eadb8ad1b68d46534890494700a80fe4b2bccc09]) [#2667 state:fixed-in-qa] There is an issue somewhere in the Android network stack that is sending a null URI to the cache request. All we can do is work around this and not crash when given bad data. https://github.com/appcelerator/titanium_mobile/commit/eadb8ad1b68d46534890494700a80fe4b2bccc09"> https://github.com/appcelerator/titanium_mobile/commit/eadb8ad1b68d...

  2. Don Thorp 2011-04-15

    (from [f65c52c40591b337a7a5fdb04023ccafc086944f]) [#2667 state:fixed-in-qa] There is an issue somewhere in the Android network stack that is sending a null URI to the cache request. All we can do is work around this and not crash when given bad data. https://github.com/appcelerator/titanium_mobile/commit/f65c52c40591b337a7a5fdb04023ccafc086944f"> https://github.com/appcelerator/titanium_mobile/commit/f65c52c40591...

  3. Abraham 2011-04-15

    So what exactly does this mean? What is the fix?

  4. Jayme 2011-04-15

    Guys I've seen several posts related to this saying this is fixed, can we get an update as to when this will be available? Having an android app blow up when I load images for my users and other business objects is a big problem with getting Titanium adoption going at my employer.

  5. Don Thorp 2011-04-15

    It's available in both the 1.5.2 and 1.6.0 CI builds. Look in the guides section for Continuous Integration.

  6. Jayme 2011-04-15

    I asked about this issue during this morning's Webinar that your company did and was told to look at the daily builds, so I will certainly do that. Thanks for the response and all your hard work! You guys really have an amazing product.

  7. Thomas Huelbert 2011-04-15

    this renders the map in [INFO] Titanium SDK version: 1.5.2 (01/10/11 08:22 682e79e) droid 1 (2.2.1) and 2.2 sim, but when using Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06), it failed to render (white square) adb logcat shows:

    D/KrollContext( 365): (kroll$3) [5492,8708] Running evaluated script: app://folder/2667.js
    I/ActivityManager( 60): Starting activity: Intent { cmp=com.appcelerator.QAtests/org.appcelerator.titanium.TiActivity (has extras) }
    I/ActivityManager( 60): Displayed activity com.appcelerator.QAtests/org.appcelerator.titanium.TiActivity: 427 ms (total 427 ms)
    D/dalvikvm( 365): GC_FOR_MALLOC freed 6747 objects / 386072 bytes in 161ms
    W/System.err( 365): java.net.URISyntaxException: Illegal character in query at index 132: http://maps.google.com/maps/api/staticmap?center=11.5558762589,104.921697935&zoom=13&size=250x70&maptype=roadmap&markers=color:green|11.5558762589,104.921697935&sensor=false"> http://maps.google.com/maps/api/staticmap?center=11.5558762589,104....
    W/System.err( 365): at java.net.URI$Helper.validateQuery(URI.java:458)
    W/System.err( 365): at java.net.URI$Helper.parseURI(URI.java:360)
    W/System.err( 365): at java.net.URI$Helper.access$100(URI.java:302)
    W/System.err( 365): at java.net.URI.(URI.java:87)
    W/System.err( 365): at ti.modules.titanium.ui.widget.TiUIImageView.setImage(TiUIImageView.java:486)
    W/System.err( 365): at ti.modules.titanium.ui.widget.TiUIImageView.processProperties(TiUIImageView.java:563)
    W/System.err( 365): at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:462)
    W/System.err( 365): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:371)
    W/System.err( 365): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:364)
    W/System.err( 365): at org.appcelerator.titanium.proxy.TiViewProxy.getView(TiViewProxy.java:348)
    W/System.err( 365): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:377)
    W/System.err( 365): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:64)
    W/System.err( 365): at android.os.Handler.dispatchMessage(Handler.java:95)
    W/System.err( 365): at android.os.Looper.loop(Looper.java:123)
    W/System.err( 365): at android.app.ActivityThread.main(ActivityThread.java:4627)
    W/System.err( 365): at java.lang.reflect.Method.invokeNative(Native Method)
    W/System.err( 365): at java.lang.reflect.Method.invoke(Method.java:521)
    W/System.err( 365): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    W/System.err( 365): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    W/System.err( 365): at dalvik.system.NativeStart.main(Native Method)
    W/TiAnalyticsSvc( 365): (Thread-10) [1060,9768] Stopping Analytics Service
    D/dalvikvm( 295): GC_EXPLICIT freed 782 objects / 55696 bytes in 71ms
    D/dalvikvm( 306): GC_EXPLICIT freed 2027 objects / 144232 bytes in 88ms
    D/dalvikvm( 116): GC_EXPLICIT freed 197 objects / 10472 bytes in 74ms
    D/SntpClient( 60): request time failed: java.net.SocketException: Address family not supported by protocol

  8. Don Thorp 2011-04-15

    Moving to M07 so I can look at it.

  9. Thomas Huelbert 2011-04-15

    As per Don, the issue I reported above (illegal char) is due to the change in the way we handle "magic url's" replacing "|" with "%7C" in the url and all is well.

    closing against nexus s (4.3.1) and [INFO] Titanium SDK version: 1.6.0 (01/24/11 08:14 e1cb22a)

  10. Nikolai Derzhak 2011-04-15

    rollback wrong update

JSON Source