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. Active Installs Dropping Like Crazy but Total Downloads Increasing Steadily!

I'm getting a little concerned about the issue.  I know for a fact
that my application is doing very well from analytic...  But the
active installs are dropping daily by a lot! While my total downloads
are growing steadily as they always have!  I'm worried cause I know
that active installs affect an applications popularity and mine is
going to be dumped all the way to the bottom if this continues....

So what's causing this issue? Two theories:
1. I recently allowed to install to SD card.
2. Android Market is broken?

Anyone seeing this issues?


2. Android Emulator vs iPhone emulator (Why does it take so long)

I have a fairly fast machine, and I boot into Windows 7 or Mac OS
depending on which work I need to do.

When I start the Android emulator it takes around 2-3 minutes and its
sluggish when its ready. However, the iPhone emulator in Mac OS takes
around 10 seconds at most and its very smooth when its ready.

Why is that? Is it something we will continue to see in the future or
will this be resolved in the future?


3. Excellent UI Design from TAT

4. android 2.1 issue

5. JNI ioctl problem

6. Atul Raut wants to chat

7. Nested dialog and have a child dialog return a string to update EditText file in Parent Dialog, is this possible?