Titanium JIRA Archive
Appcelerator Community (AC)

[AC-704] Android Map not loading correctly - java.lang.ArrayIndexOutOfBoundsException error

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2014-12-12T18:13:50.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Appcelerator Modules
LabelsTCSupportTriage, android, mapView, mapv2, titanium
ReporterVeronika Milic
AssigneeMauro Parra-Miranda
Created2014-10-16T11:48:28.000+0000
Updated2016-03-02T05:55:03.000+0000

Description

Problem

I have a MapView in my Android Titanium app. After a certain time the map tiles don't load anymore, resulting in a blurry map, or, if I switch to sattellite view, to an empy grid. Sometimes the issue appears as soon as the map is loaded, sometimes it takes a little longer and the map works fine for an amount of time. I already tried to change API keys. I think that the issue could be related to this: [https://code.google.com/p/gmaps-api-issues/issues/detail?id=7188], even it is reported only for Android v4.1.2 To exclude that the issue could be related to other parts of the app, I tried to make a test app with just a map in the index and the issue was still present.

Test case

var Map = require('ti.map');

$.index.open();
<Alloy>
	<Window class="container">
		  <Module id="mapview" module="ti.map" method="createView">
        </Module>
	</Window>
</Alloy>

Logs


[ERROR] :  REQUEST: ERROR
[ERROR] :  REQUEST: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
[ERROR] :  REQUEST: 	at org.appcelerator.titanium.util.TiResponseCache.get(TiResponseCache.java:276)
[ERROR] :  REQUEST: 	at com.android.okhttp.internal.http.OkResponseCacheAdapter.get(OkResponseCacheAdapter.java:38)
[ERROR] :  REQUEST: 	at com.android.okhttp.internal.http.HttpEngine.initResponseSource(HttpEngine.java:224)
[ERROR] :  REQUEST: 	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:185)
[ERROR] :  REQUEST: 	at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
[ERROR] :  REQUEST: 	at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
[ERROR] :  REQUEST: 	at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
[ERROR] :  REQUEST: 	at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:254)
[ERROR] :  REQUEST: 	at com.google.maps.api.android.lib6.b.l.run(Unknown Source)
[ERROR] :  REQUEST: 	at java.lang.Thread.run(Thread.java:841)

Discussions

Q&A question [http://developer.appcelerator.com/question/178445]

Attachments

FileDateSize
screen1.png2014-10-16T12:02:49.000+0000504241

Comments

  1. Michael Gangolf 2014-10-20

    same here on a Nexus 4 (4.4.4), Map 2.1.6, SDK 3.4.0 GA lots of: {quote} [DEBUG] REQUEST: Connection opened to:https://clients4.google.com/glm/mmap/api [DEBUG] REQUEST: Open Connection [DEBUG] REQUEST: DRD(19): 62|147 [DEBUG] REQUEST: Close [DEBUG] REQUEST: Error processing: com.google.maps.api.android.lib6.b.d@4355d018 not retrying [DEBUG] REQUEST: Retrying: com.google.maps.api.android.lib6.c.au@4280cee0 [ERROR] REQUEST: ERROR [ERROR] REQUEST: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 [ERROR] REQUEST: at org.appcelerator.titanium.util.TiResponseCache.get(TiResponseCache.java:276) [ERROR] REQUEST: at com.android.okhttp.internal.http.OkResponseCacheAdapter.get(OkResponseCacheAdapter.java:38) [ERROR] REQUEST: at com.android.okhttp.internal.http.HttpEngine.initResponseSource(HttpEngine.java:224) [ERROR] REQUEST: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:185) [ERROR] REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345) [ERROR] REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89) [ERROR] REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197) [ERROR] REQUEST: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:254) [ERROR] REQUEST: at com.google.maps.api.android.lib6.b.l.run(Unknown Source) [ERROR] REQUEST: at java.lang.Thread.run(Thread.java:841) {quote} its not blurry but slow
  2. Daantje Eeltink 2014-10-20

    I've got the same problem, it just appeared out of nothing. Did not upgrade/update any sdk or device. My app worked fine, did one complete test, restarted my app and the errors appeared. Using Nexus 5 (4.4.4), Map 2.1.6, SDK 3.4.0 GA (OSX 10.10)
  3. luca capra 2014-10-22

    Happens to me too on Samsung S3 4.1.2, Xperia Z 4.4.4
  4. Michael Gangolf 2014-10-24

    Play services (and the Store app) were updated the other day. Might this be the source of this error? My version is 6.1.83
  5. Michael Gangolf 2014-10-25

    The new version 2.2.1 https://github.com/appcelerator/titanium_mobile/tree/master/support/module/packaged fixed the issue for me
  6. Veronika Milic 2014-10-27

    Tried the new module, but it seems even worse - the issue appears almost immediately.
  7. Goh TF 2014-10-27

    I having the same problem. Tried the new Ti.Map module 2.2.1 with Ti.SDK3.3.0, the same problem still happen.
  8. luca capra 2014-10-28

    I've tried v2.2.1but still have the issue. Seems a caching issue as cleaning the app cache allow to load fresh map imagery that looks good. At a certain point, after zooming in my case, the images around the view are not loaded anymore and keep showing an overzoomed image from previous zoom level How to reproduce 1 clean app cache 2 zoom an area 3 move the view nearby and immediately press a zoom control (before image load) 4 the image "stop" loading and the zoomed one is shown After this point seems the images are not loaded anymore for that area
  9. Netto Ramalho 2014-11-05

  10. Terry Morgan 2014-11-14

    I'm also see the exact same issue intermittently on the follow device / OS combinations: * Samsung S5 +Android 4.4.2 * Genymotion + Android 4.4.2
  11. Mauro Parra-Miranda 2014-12-12

JSON Source