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. Wi-Fi On Hurts My Performance

While developing on the phone itself, I was getting around the same
fps for my game and it was the bare threshhold I was happy with.  I
then, turned on wifi connecting to my wireless router because I do not
have a service plan to get to the internet.  I went back to my game
and noticed a 5 fps on average slow down.  In the logcat de{*filter*} I
see logs to with the tag dhcp (i think thats right) every 100ms
refreshing the ip to the wifi.  I cannot tell if its the constant
logging or being connected to the wifi which is extra overhead that is
eating up my cpu time.

Questions.
1) If I were to have a provided and was connected to them at all
times.  would that slow me down tooo?

2) Has anyone else noticed that the wifi slows them down a little.
Maybe its in my head now but the home screen is a little laggy when
connected to wifi

3) Does anyone know how to tell the phone make the wifi a deamon
thread and not kill my processing time.


--~--~---------~--~----~------------~-------~--~----~

2. How do I make my application to be restarted after the phone is powered-on again?

Hi Everyone,

Can anyone give me a hint about what should I do to make my
application to be restarted automatically after the phone has been
powered-off and powered-on again ?

I read that regular alarms do not survive phone reboots so, I'm
assuming there should be a way to do it.

Thanks in advance,
Pablo
--~--~---------~--~----~------------~-------~--~----~

3. dx moaning

4. access android device on pc

5. The problem about the sensor!!!

6. Application that loops every minute - how to efficiently do it

7. Buffering Background Image - Graphics Advice Sought