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. android doesn't recognize battery

Hi all,
in the presence of usb cable if i remove battery from the device and put it
back ,the device is not recognizing the battery.
but from the kernel log i can see the battery charging event at the time of
inserting the battery back and after that if the usb cable is taken out
,device will shutdown
why its happening and which part of android source supposed to handle this
behaviour?

-Anand

-- 

2. Widget Layout Help Please

Hi everyone,

I am trying to make a widget to show on the home screen(s). My problem
is lets say I set my icon to 30x30 when I load the widget on the
screen the Icon is the correct size BUT the layout itself takes up a
lot more space than what is actually needed. This means that I can't
really place my widget next to other icons on the screen. Its like the
bounding box is 3 times bigger than the content that fills it. How do
I fix this? Here is my XML....

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:id="@+id/widget"
    android:layout_width="30px"
    android:layout_height="30px"
    android:focusable="true"

    >
        <ImageView android:id="@+id/widgWeatherIcon"
        android:layout_width="30px"
        android:layout_height="30px"
    android:src="@drawable/asdf_widgettester"


        >
        </ImageView>
        <TextView android:id="@+id/widgCurrTemp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="100"
        android:layout_below="@id/widgWeatherIcon">
        </TextView>
</RelativeLayout>


I have tried wrap_content and other width/height settings but nothing
seems to reduce the "Box" around my widget content..... Im super
confused. I clicked on my ATK widget and started to drag it around on
my HTC Aria and it shows the bounding box around the widget and that
one is the same size of the content inside same with all the other
widgets on my screens.

Thanks so much for the help and advice!

Tommy

-- 

3. problem with accented letters

4. How to zoom in/out image with webkit

5. AudioManager request/abandon focus messages

6. Adding native Binder service permission error when not root

7. Info