Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 56102 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 22005 [details]
Test Project to recreate
If you successfully load/create an activity, any subsequent unhandled exception is confined only to that activity – you get a stopped working dialog, but the previous activity(s) remain functional. However if you put an unhandled exception in the create method of an activity, and handle the exception form the calling activity (from the StartActivity method, not only does it crash the called activity, but it crashes the calling activity. In the example, trying to load activity three, should remain on activity 2, as activity 2 is handling the load of activity 3 with a try/catch, however it returns to activity 1. The ‘crash’ button is just there to confirm the normal operation of an unhandled operation from a fully loaded activity.
Confirmed with the following steps using Visual Studio 2017 15.2 and Xamarin.Android 18.104.22.168:
1. Build and run the attached project.
2. In the Activity 1 screen, tap LOAD ACTIVITY 2.
3. In the Activity 2 screen, tap LOAD ACTIVITY 3.
The last step causes "Unfortunately, ActivityCrashTest has stopped" (Nexus 5, Android 6.0.1).
Here's the relevant snippet from Activity2 OnCreate:
private void LoadActivity3()
//Handle loading an activity, that is at high risk of crashing - activity 3 will have forced exception raised during load.
Intent intent = new Intent(this, typeof(actActivity3));
//NEVER REACHED!! despite exception handled. Crashes this activity, as well as called activity (activity 3).
And here's the Activity3 OnCreate:
protected override void OnCreate(Bundle savedInstanceState)
//Crash the activiy, before it loads
Activity1 continues to run, so you can repeat steps 2, 3 above.
IS anyone actually doing anything with these reports? We take the efforts to demo the bug, it gets confirmed, nine months later, and still nothing....