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.
Xamarin.Froms 1.3.0 pre1 Android
1. Create a new application
- create class which inherits from new Application class
- then implement MainActivity.cs by inheriting from FormsApplicationActivity
- In OnCreate method call Forms.Init and LoadApplication
2. Debug application. Minimize application by clicking Android Home button. Then restore it through task manager. It works ok.
3. Minimize application by clicking Android Back button from MainPage. Then restore it through task manager. Crash:
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] System.NullReferenceException: Object reference not set to an instance of an object
[MonoDroid] at Xamarin.Forms.NavigationProxy.set_Inner (Xamarin.Forms.INavigation) <IL 0x00076, 0x0025a>
[MonoDroid] at Xamarin.Forms.Platform.Android.Platform.SetPage (Xamarin.Forms.Page) <IL 0x0009f, 0x0031b>
[MonoDroid] at Xamarin.Forms.Platform.Android.FormsApplicationActivity.InternalSetPage (Xamarin.Forms.Page) <IL 0x000b6, 0x0039f>
[MonoDroid] at Xamarin.Forms.Platform.Android.FormsApplicationActivity.SetMainPage () <IL 0x0000c, 0x00047>
[MonoDroid] at Xamarin.Forms.Platform.Android.FormsApplicationActivity.LoadApplication (Xamarin.Forms.Application) <IL 0x00035, 0x00117>
Possible dirty hack to get it working is to add this code to MainActivity.cs:
public override bool OnKeyDown(Keycode keyCode, KeyEvent e)
if (this.ActionBar.Title == "YourMainPageTitle")
if (keyCode == Keycode.Back && e.RepeatCount == 0)
return base.OnKeyDown(keyCode, e);
We have tried to reproduce this issue but not able to reproduce this. Could you please provide a sample app and detailed steps/screencast that demonstrate this issue, so that we can reproduce this issue at our end.
Also please let us know that you are getting this issue with android device or emulator?
Please read this:
I have checked this issue with attached link in comment 2 and I am getting Unhandled Exception: System.NullReferenceException.
Could you Please check the screencast and application output and let we now if you also getting same issue or I have missed anything.
Xamarin Studio 5.5.4 (build 15)
Xamarin.Android: 220.127.116.11 (Business Edition)
Mono 3.10.0 ((detached/92c4884)
Xcode 6.1 (6602)
Xamarin.iOS : 18.104.22.168 (Business Edition)
Xamarin.Mac : 22.214.171.124 (Business Edition)
Operating System : Mac OS X 10.9.4
This bug is also present in 1.3.0 pre3 ... but instead of exception, user is getting empty page (without views).
Steps to reproduce: just a standard XF application (FormsApplicationActivity + Forms.Init + LoadApplication)
Fixed in 1.3.5 or upper versions