ArrayIndexOutOfBounds in Thread.getState() ...

by Pent » Thu, 19 May 2011 04:56:32 GMT

Sponsored Links
 I've had this sometimes in the console, wrote it off as sporadic
malign alien influence. A user just contacted me that it started
happening after an upgrade from 2.2 to 2.2.2.

Brief version:

Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.Thread.getState(

Looks like a bug in the library or ... ?

No idea if it happens with newer Android versions, it's not mentioned
by the console error reports.


Full version:

java.lang.RuntimeException: Unable to start service with Intent
{ (has extras) }:
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.Thread.getState(


Re: ArrayIndexOutOfBounds in Thread.getState() ...

by fadden » Fri, 20 May 2011 07:57:39 GMT


Weird.  That line is:

            int state = thread.getStatus();
            if(state != -1) {
                return VMThread.STATE_MAP[state]; // 812

The STATE_MAP array has Thread.State entries for all valid thread
states, suggesting that the thread is in some weird state.
Unfortunately the exception doesn't say what element it was trying to
access.  (Newer versions of the VM and core libs are more verbose on
these exceptions.)


Sponsored Links

Other Threads

1. PV Architecture Question

I would like to have the capability to have multiple parser nodes in
the node-graph/pipeline where the output of one parser node provides
input to a second parser node (which may provide input to yet another
parser node). My current understanding is that the PV architecture
only allows the output of a source node to be the input to either a
sink node or a decoder node and that the maximum length of the node-
graph is 3 (source node->decoder node->sink node). Do I have a correct
understanding of the architecture?


2. Compache dan Swa

penjelasan singkatnya mungkin begini :

Swap adalah Virtual Memory, bisa menggunakan partisi khusus linux swap atau 
partisi yg sudah ada, swap bertindak sebagai extra RAM, tapi bukan artinya 
"near comparable" ke RAM asli ya, peningkatan performance akan terasa saat RAM 
kita sudah penuh dan saat multitasking, tapi jg bukan artinya mempercepat 
eksekusi sebuah aplikasi.

Compache adalah sebuah command/script utility yg akan mengkompress isi RAM, 
sehingga lebih banyak data yg bisa di masukkan kedalam RAM, kelemahannya adalah 
saat proses kompresi dan dekompresi akan memakan power usage CPU.

kedua hal tersebut harus di support oleh ROM supaya bisa aktif..

buat para suhu silahkan ditambahkan, kelemahan, kekurangan dan kelebihannya...
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group:


3. PhoneStateListener::onSignalStrengthChanged

4. Bestpractice Android 1.6 Gestures and WebView

5. java.lang.IllegalStateException: Content of adapter changed but ListView didn't

6. detect whether the network is connect

7. Problem in debugging android webkit