Bug 1971 - Error displayed when user run application on emulator in debug mode
Summary: Error displayed when user run application on emulator in debug mode
Status: VERIFIED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 1.9.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-11-09 10:22 UTC by Saurabh
Modified: 2013-05-28 13:16 UTC (History)
3 users (show)

Tags:
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:
Status:
VERIFIED INVALID

Description Saurabh 2011-11-09 10:22:07 UTC
Steps to reproduce:
1.Launch MonoDevelop.
2.open Application(Button).
3.Select Build>Build all.
4.Select Run>Run.
5.Pop up display.
6.Select API14 and click Start emulator.
7.Error displayed in 'Application Output'.

Actual result:
When user run application on emulator in debug mode,error displayed in 'Application Output'.Please view error details.

Expected result:
Application should be run successfully on emulator no error should be displayed.

Enviornment
MonoDevelop 2.8.2
MonoforAndroid 1.9.2

Error details:
I/MonoDroid(  561): UNHANDLED EXCEPTION: System.NotSupportedException: Unable to activate instance of type Mono.Samples.Button.ButtonActivity from native handle 68e00019 ---> System.MissingMethodException: No constructor found for Mono.Samples.Button.ButtonActivity::.ctor(System.IntPtr)
I/MonoDroid(  561):   at Android.Runtime.TypeManager.CreateProxy (System.Type type, IntPtr handle) [0x00000] in <filename unknown>:0 
I/MonoDroid(  561):   at Android.Runtime.TypeManager.CreateInstance (IntPtr handle, System.Type targetType) [0x00000] in <filename unknown>:0 
I/MonoDroid(  561):   --- End of inner exception stack trace ---
I/MonoDroid(  561): at Android.Runtime.TypeManager.CreateInstance (intptr,System.Type) <0x0057c>
I/MonoDroid(  561): at Java.Lang.Object.GetObject (intptr,System.Type,bool) <0x00223>
I/MonoDroid(  561): at Java.Lang.Object._GetObject<Android.App.Activity> (intptr,bool) <0x0004f>
I/MonoDroid(  561): at Java.Lang.Object.GetObject<Android.App.Activity> (intptr,bool) <0x0002b>
I/MonoDroid(  561): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00027>
I/MonoDroid(  561): at (wrapper dynamic-method) object.d25ccdad-4dd5-4a5b-aa22-fa329e094ecd (intptr,intptr,intptr) <0x00033>
E/mono    (  561): 
E/mono    (  561): Unhandled Exception: System.NotSupportedException: Unable to activate instance of type Mono.Samples.Button.ButtonActivity from native handle 68e00019 ---> System.MissingMethodException: No constructor found for Mono.Samples.Button.ButtonActivity::.ctor(System.IntPtr)
E/mono    (  561):   at Android.Runtime.TypeManager.CreateProxy (System.Type type, IntPtr handle) [0x00000] in <filename unknown>:0 
E/mono    (  561):   at Android.Runtime.TypeManager.CreateInstance (IntPtr handle, System.Type targetType) [0x00000] in <filename unknown>:0 
E/mono    (  561):   --- End of inner exception stack trace ---
E/mono    (  561):   at Android.Runtime.TypeManager.CreateInstance (IntPtr handle, System.Type targetType) [0x00000] in <filename unknown>:0 
E/mono    (  561):   at Java.Lang.Object.GetObject (IntPtr handle, System.Type type, Boolean owned) [0x00000] in <filename unknown>:0 
E/mono    (  561):   at Java.Lang.Object._GetObject[Activity] (IntPtr handle, Boolean owned) [0x00000] in <filename unknown>:0 
E/mono    (  561):   at Java.Lang.Object.GetObject[Activity] (IntPtr handle, Boolean owned) [0x00000] in <filename unknown>:0 
E/mono    (  561):   at Android.App
Comment 1 Saurabh 2011-11-09 10:50:09 UTC
This is occuring on both Debuging and relese mode for API4
Comment 2 Jonathan Pryor 2011-11-09 20:41:55 UTC
This isn't Mono for Android 1.9.2, or this was originally built under an earlier release, you upgraded Mono for Android, and didn't Clean + Rebuild the project.

I know this because 1.9.2 should be looking for a (IntPtr, JniHandleOwnership) constructor, not a (IntPtr) constructor; the error message is wrong for 1.9.2.

Try cleaning, rebuilding, and reinstalling the project.
Comment 3 Mohit Kheterpal 2013-05-28 13:16:44 UTC
Today we have checked this issue on following builds :

XS 4.0.8(build 2)
MFA 4.6.07004
Mono 2.10.12

As per comment 2, we are able to build and run application successfully on emulator API14 without any error.

Hence changing its status to verified.