http://bugzilla.novell.com/show_bug.cgi?id=537248


           Summary: MissingMethodException when trying to instantiate
                    class using the generic T()
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: P5 - None
         Component: Runtime
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Created an attachment (id=317099)
 --> (http://bugzilla.novell.com/attachment.cgi?id=317099)
Project file

Description of Problem:

An exception is thrown when instantiating a class using the generic "new T()".

Steps to reproduce the problem:
1. Load the attached project
2. Run it

Note the function "WorkAroundBugs" in Main.cs. You can uncomment those lines to
see this execute correctly.


Actual Results:

Unhandled Exception: System.MissingMethodException: Method not found: 'Default
constructor not found...ctor() of Db.User'.
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic)
[0x00000] 
  at System.Activator.CreateInstance (System.Type type) [0x00000] 
  at System.Activator.CreateInstance[User] () [0x00000] 
  at SQLiteClient.SQLiteCommand+<ExecuteQuery>c__Iterator0`1[Db.User].MoveNext
() [0x00000] 
  at Db.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app,
MonoTouch.Foundation.NSDictionary options) [0x00000] 
  at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String
principalClassName, System.String delegateClassName) [0x00000] 
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] 
  at Db.Application.Main (System.String[] args) [0x00000] 


Expected Results:

The object gets created and no exception is thrown. (There is an additional bug
posted regarding missing Setters, if this is patched then things work.)

How often does this happen? 

Always


Additional Information:

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to