LibreTasks
LibreTasks copied to clipboard
Child activity/dialog causes parent activity to force close
What steps will reproduce the problem?
1. Create Rule -> Time is -> +Action -> SMS -> SMS Send -> Param
2. Wait as each dialog along the chain has to Force Close
What is the expected output? What do you see instead?
SMS Send should force close, but the previous dialogs/activities should handle
the bad return nicely if at all possible.
Original issue reported on code.google.com by [email protected]
on 22 Jun 2010 at 8:05
- Blocking: #94
Testable by referencing a null pointer in a ActivityDlg class.
View v = null;
v.setVisibility(false);
Watch all parent activities crash in order. :-/
Original comment by [email protected]
on 2 Jul 2010 at 9:46
Original comment by [email protected]
on 3 Jul 2010 at 6:53
- Added labels: Priority-High
- Removed labels: Priority-Medium
Actually it's:
View v = null;
v.setVisibility(View.INVISIBLE);
Original comment by [email protected]
on 4 Jul 2010 at 9:18
I'm not sure why this happens. From the docs:
When an activity exits, it can call setResult(int) to return data back to its
parent. It must always supply a result code, which can be the standard results
RESULT_CANCELED, RESULT_OK, or any custom values starting at RESULT_FIRST_USER.
In addition, it can optionally return back an Intent containing any additional
data it wants. All of this information appears back on the parent's
Activity.onActivityResult(), along with the integer identifier it originally
supplied.
If a child activity fails for any reason (such as crashing), the parent
activity will receive a result with the code RESULT_CANCELED.
If I use:
setResult(RESULT_CANCELED);
finish();
it is handled properly.
If I use:
View v = null;
v.setVisibility(View.INVISIBLE);
it crashes the entire Activity Stack.
I can't think of how to fix this and haven't been able to find any references
to this in the mailinglists or docs.
Original comment by [email protected]
on 4 Jul 2010 at 11:02
Original comment by [email protected]
on 6 Jul 2010 at 2:20
With new coding changes that limit the amount of crashing going on this is no
longer as important of an issue, dropping milestone and priority.
Original comment by [email protected]
on 13 Jul 2010 at 11:20
- Added labels: Priority-Medium
- Removed labels: Milestone-Release1.0, Priority-High