[android-developers] Strange instance of app not responding error

2010-08-31 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.

A customer just notified me that she's experiencing the infamous app
not responding / wait, force close message during a specific
operation. By just waiting enough, the app resumes ok.
Now, that specific operation is indeed long and in fact it has been
programmed in a background thread, with a progress dialog signaling
the wait. I can't reproduce the problem on my development phone - I
suppose because it's perhaps faster than the phone of the user. But I
can't reproduce the problem either with the emulator, which I suppose
is slow enough.

Generally speaking, I think I could be able to solve this specific
problem with the customer giving me the proper feedback. It's the
general issue that hassles me. This part of the application is very
good covered by tests at different levels, including automated
black-box tests with Robotium that drive the UI as the user would do,
and even in stress mode (repeating the test multiple times). So I
supposed to be very safe in that area and I'm disappointed to discover
that it was a false sense of safety. What am I possibly missing?

Also, is it possible / does make sense to slow down a phone during
tests? I was thinking of a service running in background just
consuming some CPU cycles to make the phone less responsive.

- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAkx8uUcACgkQeDweFqgUGxeL7gCVGEE8EYiE2J0t9vnS48LVYOrd
hwCfZW1TN7TFM8CbYTIZR36pDU6TcSE=
=X0L9
-END PGP SIGNATURE-

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Strange instance of app not responding error

2010-08-31 Thread Mark Murphy
On Tue, Aug 31, 2010 at 4:11 AM, Fabrizio Giudici
fabrizio.giud...@tidalwave.it wrote:
 So I
 supposed to be very safe in that area and I'm disappointed to discover
 that it was a false sense of safety. What am I possibly missing?

Well, that's difficult to answer in the abstract.

The two most variable performance things I can think of in Android are
network I/O operations and flash writes. The former is fairly obvious,
and we've been recommending network I/O be done in an AsyncTask,
IntentService, or background thread for some time.

The flash write scenario was new to me. Brad Fitzpatrick's
presentation at Google I|O 2010 (Writing zippy Android apps, or
something like that) was a bit of an eye-opener. I had not realized
exactly how slow a flash write could be -- 1 byte in 200ms has been
seen, though normally it's tons faster. The speed will vary widely,
based on hardware capabilities, how much of the flash filesystem is in
use, wear-leveling status, and a host of other criteria. And, the
emulator won't emulate this, since the emulator's write speeds are
that of the host PC, typically on a hard drive or SSD-caliber flash.

Of course, there's always the possibility that the interference is
from something else on this person's phone.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Strange instance of app not responding error

2010-08-31 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/31/10 10:22 , Mark Murphy wrote:

 The two most variable performance things I can think of in Android
 are network I/O operations and flash writes. The former is fairly
 obvious, and we've been recommending network I/O be done in an
 AsyncTask, IntentService, or background thread for some time.
Thanks for pointing out those things. Is it also reading from flash
slow? The long operation I'm talking of is reading a bunch of data
from the flash to RAM (no network, no writes).


- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx8vlwACgkQeDweFqgUGxdgsgCgpm18MvBnIM8CGOBQ2KFGeoes
IGUAmwY1vqxep5oyyO3EjaCcuHt9rXVh
=kqG7
-END PGP SIGNATURE-

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en