Tuesday, August 9, 2011

[android-developers] IllegalStateException only happens with Monkey

I've been testing an Android 3.0 SDK 11 version of one of my apps.  When testing with Monkey I occasionally get an IllegalStateException when my data form dialog closes and a ListView is refreshed.  I cannot replicate this doing the same thing manually with the emulator nor on my tablet.  And yes ListView is only updated on the UI thread.  The original code updated on a Handler and that has always worked fine for two years in my apps with no crashes.  I also implemented a version with an AsyncTask and it still does the same thing.

Monkey also does some impossible things during its testing such as opening the Menu while a dialog is up.  Doing that manually will cancel the dialog.  I'm beginning to think I'm wasting time on a bug that Monkey might be creating.

A couple other thoughts: this implementation uses DialogFragment.  Any gochas that haven't been discussed with that?  Also in the data form dialog I'm using the new DatePicker.  The most numerous error I'm seeing is an IllegalStateException with ListView connected with Calendar.  The only thing I can think of is the new DatePicker is using a ListView to display those flingable number lists.  In that case the bug would would be an internal OS bug.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment