Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-704

Android Map not loading correctly - java.lang.ArrayIndexOutOfBoundsException error

    Details

      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

      index.js

      var Map = require('ti.map');
       
      $.index.open();
      

      index.xml

      <Alloy>
      	<Window class="container">
      		  <Module id="mapview" module="ti.map" method="createView">
              </Module>
      	</Window>
      </Alloy>
      

      Logs

      console

       
      [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

          Activity

            People

            • Assignee:
              mpmiranda Mauro Parra-Miranda
              Reporter:
              veronika Veronika Milic
            • Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • It looks like Backbone Issue Sync is not enabled for your project.

                  Git Source Code