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(Thread.java:812)
at net.dinglisch.android.taskerm.ExecuteService.onStart(Unknown
Source)
at android.app.Service.onStartCommand(Service.java:420)

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.

Pent

--------------------------------------------------------------------------------
Full version:

java.lang.RuntimeException: Unable to start service
net.dinglisch.android.taskerm.ExecuteService@45d59050 with Intent
{ cmp=net.dinglisch.android.taskerm/.ExecuteService (has extras) }:
java.lang.ArrayIndexOutOfBoundsException
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:
3153)
at android.app.ActivityThread.access$3800(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
2180)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.Thread.getState(Thread.java:812)
at net.dinglisch.android.taskerm.ExecuteService.onStart(Unknown
Source)
at android.app.Service.onStartCommand(Service.java:420)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:
3143)

-- 



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?
-Moto

-- 

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?