[Mono-bugs] [Bug 471255] New: Type.GetType returns null for a given type only on Mono (works in .NET)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 30 22:30:01 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=471255


           Summary: Type.GetType returns null for a given type only on
                    Mono (works in .NET)
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.2.x
          Platform: x86
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: joe at mistachkin.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20)
Gecko/20081217 Firefox/2.0.0.20 (.NET CLR 3.5.30729)


The Eagle unit test object-9.2 uses Type.GetType to lookup the Type object
using the qualified type name "Eagle._Components.Public.Engine".  This works
fine using .NET; however, it seems to always return null under Mono (2.0 and
2.2).

---- object-9.2 start

==== object-9.2 objects with attributes, "fragile" overload resolution success
FAILED
==== Contents of test case:

  set type [object invoke System.Type GetType Eagle._Components.Public.Engine]
  object invoke -parametertypes [list System.Type] -tostring Interpreter
GetObjectId $type

---- Test generated error; Return code was: Error
---- Return code should have been one of: Ok Return
---- errorInfo: no method "Interpreter.GetObjectId" matches arguments:
"Eagle._Components.Public.ScriptException: {expected type value but got ""}
  at Eagle._Components.Private.ScriptBinder.ChangeType (System.Object value,
System.Type type, System.Globalization.CultureInfo culture) [0x00000] 
  at Eagle._Components.Private.MarshalOps.FixupValue
(Eagle._Components.Public.Interpreter interpreter, System.Reflection.Binder
binder, System.Globalization.CultureInfo cultureInfo, System.Type type, Boolean
input, Boolean output, System.Object& arg, Eagle._Components.Public.Result&
error) [0x00000] "
    while executing
"object invoke -parametertypes [list System.Type] -tostring Interpreter
GetObjectId $type"
---- errorCode: NONE
==== object-9.2 FAILED


Reproducible: Always

Steps to Reproduce:
1. Download the "Mono-on-Unix" binaries distribution from: http://eagle.to/
2. Start the EagleShell.exe under the Mono of your choice (fails in 2.0 and
2.2)
3. Type "set argv [list -constraints monoBug]" and hit enter.
4. Type "#test object9*" and hit enter to see the failure (complete with stack
trace).

Actual Results:  
Type.GetType returns null and the rest of the unit test fails

Expected Results:  
The Type object corresponding to the supplied type name.

-- 
Configure bugmail: https://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.


More information about the mono-bugs mailing list