java.lang.ArrayIndexOutOfBoundsException: length=1; index=1

Appcelerator JIRA | Veronika Milic | 2 years ago
  1. 0

    Titanium Android Map java.lang.ArrayIndexOutOfBoundsException

    Stack Overflow | 2 years ago | user1732111
    java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    h2. 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. h2. Test case {code:lang=javascript|title=index.js} var Map = require('ti.map'); $.index.open(); {code} {code:lang=xml|title=index.xml} <Alloy> <Window class="container"> <Module id="mapview" module="ti.map" method="createView"> </Module> </Window> </Alloy> {code} h2. Logs {code:lang=none|title=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) {code} h2. Discussions Q&A question [http://developer.appcelerator.com/question/178445]

    Appcelerator JIRA | 2 years ago | Veronika Milic
    java.lang.ArrayIndexOutOfBoundsException: length=1; index=1

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      length=1; index=1

      at org.appcelerator.titanium.util.TiResponseCache.get()
    2. org.appcelerator.titanium
      TiResponseCache.get
      1. org.appcelerator.titanium.util.TiResponseCache.get(TiResponseCache.java:276)
      1 frame
    3. Android
      HttpsURLConnectionImpl.getOutputStream
      1. com.android.okhttp.internal.http.OkResponseCacheAdapter.get(OkResponseCacheAdapter.java:38)
      2. com.android.okhttp.internal.http.HttpEngine.initResponseSource(HttpEngine.java:224)
      3. com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:185)
      4. com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
      5. com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
      6. com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
      7. com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:254)
      7 frames
    4. com.google.maps
      l.run
      1. com.google.maps.api.android.lib6.b.l.run(Unknown Source)
      1 frame
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:841)
      1 frame