Bug 2188 - Unhandles exception appears when run the application.
Summary: Unhandles exception appears when run the application.
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2011-11-24 05:34 UTC by Jatin
Modified: 2011-12-22 07:00 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Jatin 2011-11-24 05:34:07 UTC
Step To Reproduce:

1.Launch the MonoDevelop.
2.Click on "Start a New Solution" link.
3.Choose C# > Mono for Android in left hand panel.
4.Select Mono for Android Application from the center panel.
5.Create a new solution.
6.Build thhe solution and then Run the solution. 
7.Select the emulator.
8.Observe that the application does not run successfully. 

Actual result:

The application does not run successfully, as when try to run the application, Unhanded exception occurs. i.e :

I/monodroid-gc(  358): environment supports jni NewWeakGlobalRef

E/MonoDroid(  358): Could not load type 'jatin.Activity1, jatin, Version=1.0.4345.28634, Culture=neutral, PublicKeyToken=null'. Skipping JNI registration of type 'jatin/Activity1'.

E/mono    (  358): 

E/mono    (  358): Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object

E/mono    (  358):   at Android.Runtime.TypeManager.n_Activate (IntPtr jnienv, IntPtr jclass, IntPtr typename_ptr, IntPtr signature_ptr, IntPtr jobject, IntPtr parameters_ptr) [0x00000] in <filename unknown>:0 

E/mono    (  358):   at (wrapper native-to-managed) Android.Runtime.TypeManager:n_Activate (intptr,intptr,intptr,intptr,intptr,intptr)
Expected result:

Error should not appear and the application shoult run successfully.

MonoDevelop 3.0 Beta-1 (2.9.0)
Mono for Android 4.0
Windows 7
Mac 10.6 (Snow Leopard)
Comment 1 Jatin 2011-11-24 06:48:32 UTC
This issue exists only when the active configuration is Debug. However, it works fine when the active configuration is Release.
Comment 2 Miguel de Icaza [MSFT] 2011-11-28 10:21:21 UTC
We believe that this is the FastDev bug.

Could you try again with the new packages that we are about to release in a few hours?

Also, for Mono for Android bugs, would you mind adding to the reporting:

* What API target level you are using (from the project options)
* the version of the Android simulator that you were using (this is the version of the simulator that you created).

You also should not be testing the MonoDevelop Beta against the Stable version of Mono for Android.
Comment 3 Jatin 2011-12-22 07:00:08 UTC
We have tested this issue with the new installers, i.e

MonoDevelop 2.8.5
Mono for Android 4.0.1

And now this issue does not exist.

Hence, closing this issue.