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. Soal Batt

pagi semua........

baru kejadian nih pagi ini, semalem di charge sampe full, trus airplane-mode
(spt biasa) , nah tau2 koq ada kedap-kedip merah di led-nya, pad display-on
kalo batt dah mau abis, cuma sisa 2% , ya udah langsung colok usb-pc, masih
kedap-kedip merah cek status batt 8%, itu ilang min di berapa % ya

btw kenapa bisa begini ya, biasa ok2 aja, malah pernah pas malem charge
belum full, tp gsm on, cuma data off, pagi2 masih full aja

Batt original berapa ya, trus kalo pake yg kapasitas besar, kayanya
tutup-nya gak bisa utk foto ya

-- 
Salam,
Jus
~ pake web google mail ajah ~

-- 
"Indonesian Android Community [id-android]" 

2. About ACCESS_DRM permission problem

Hello,

I am trying to delete the content in DrmProvider.

When i execute the statement
"getContentResolver().delete(Uri.parse("content://drm/audio/1"), null,
null);", the exception of "Requires DRM permission" will be shown.

And one of warning message was found in logger.
"04-12 13:21:51.074: WARN/PackageManager(55): Not granting permission
android.permission.ACCESS_DRM to package com.cellcast.android
(protectionLevel=2 flags=0x4444)"

Is any setting i was missed.

The following is my AndroidManifest.xml.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.cellcast.android" android:versionCode="1"
      android:versionName="1.0">

      <uses-permission android:name="android.permission.ACCESS_DRM" />
      <uses-permission android:name="android.permission.INSTALL_DRM" /

      <application android:icon="@drawable/icon"android:label="@string/
app_name">
              <activity android:name=".DRMTest"android:label="@string/
app_name">
                      <intent-filter>
                              <action
android:name="android.intent.action.MAIN" />
                              <category
android:name="android.intent.category.LAUNCHER" />
                      </intent-filter>
              </activity>
      </application>
</manifest>

Thanks all of you

-- 

3. Buat Wallpaper

4. Android App Presentation

5. Application icon change during Application upgrade

6. top 10 ideas to make money from your Blogs.[finance4u.yolasite]

7. 98 Tips Which You LOve Most For MakIng money[finance4u.yolasite]