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 on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
An uncaught exception in "OnCreate()" of the main activity doesn't terminate the app anymore. Instead MfA (or Android?) tries to restart the app over and over again.
Code to trigger the behavior:
Android Log (I added dashed lines to mark the portions that are repeating):
This is default Android behavior, not a Mono for Android "bug":
Reading between the lines:
> A process is started again for those components when there's again work for them to do.
You have a visible activity. It's thus the topmost Activity, and what the user is interacting with. It crashes/dies. As far as Android is concerned, the user is _still_ interacting with the Activity, and thus Android will restart the process+Activity so that the user can interact with it.
At least this is the behavior I've observed.
The "fix" is to keep the Activity from being topmost: hit the Home button so that the Activity is no longer foremost. This will keep the process from continually (restarting+crashing)*.
I just created a Java Android app and it terminates when there is an uncaught exception in "onCreate()" - no restarting at all.
I'm sorry but I have to reopen this bug. This behavior definitely differs from the Android-Java behavior.
Also, because MfA tries to start the app over and over again, the Android log gets flooded with the same error message. In some cases, there are so many messages that they will freeze Visual Studio during deployment. (The "Android Device Logging" window will eat up all CPU by trying to keep up with the message flood.)
*** This bug has been marked as a duplicate of bug 7634 ***