[Android] Classify unexpected cases

Terms Definition :

Reboot : Real reboot. System restarts from ‘boot logo’.
Soft reboot : System restarts from ‘Power on animation’. (NOT from ‘Boot logo’.)

In user mode

On Dalvik

ANR (Application Not Responding)

* Event dispatching timeout : 5 sec.
=> Windows can’t dispatch events over 5 sec.
* Broadcast timeout : 10 sec.
=> Broadcast receiver can’t complete things to do in 10 sec.
* Service timeout : 20 sec.
=> Service can’t finish jobs in 20 sec..

Hang up

* There is no UI response, even if window dispatched events.
* Framework misses window that events should be passed to. (It doesn’t never happens.)
=> Note! : We should wait over 5 sec. to tell it’s hang-up or ANR. (See ‘Event dispatching timeout’)

FC (Force Close)

* Unexpected stop. Ex. null object access,  exceptions.

return from ‘main’ function.

* It’s normal end of process if it is intentional. But in some cases, we may come across unexpected return from ‘main’. System’s point of view, it’s just normal exit of process. So, no error message is left.

At native

Exception (ex. data abort etc)

* Kernel sends appropriate Signal (ex. SIGSEGV) to user process. And user process may be killed. In this case, process is killed due to signal from kernel.  So, we cannot expect UI feedback, but low level logs – ex. tombstone.

In privilege mode

Exception : Reboot. (Kernel ‘oops’ is executed before reboot. So, we may  be able to find corresponding kernel log/panic data.

Other important and notable cases.

system_process :

* Unexpected stop of  this process may cause system-soft-reboot. (This should be distinguished from reboot caused by kernel exception)

home / launcher

* Unexpected stop causes one-time-flickering of home screen to restart home. Let’s imagine following scenario.
-> Home enters unexpected busy state(cannot dispatch user input during this busy time). After 3~4 sec., there is exception and home is stopped -> restarted.
In this case, it may look like just ‘Smooth Reset’!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s