[Mono-bugs] [Bug 471259] New: NullReferenceException using Reflection with valid Nullable/ByRef arguments

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 30 23:10:31 EST 2009


           Summary: NullReferenceException using Reflection with valid
                    Nullable/ByRef arguments
    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:
Gecko/20081217 Firefox/ (.NET CLR 3.5.30729)

The Eagle unit test object-7.1 causes Mono 2.0 to crash.  For Mono 2.2, it
fails the unit test with a NullReferenceException.  The test itself is designed
to exercise Reflection with Nullable and/or ByRef arguments.  This test works
properly on .NET.

---- object-7.1 start

==== object-7.1 objects with array and nullable arguments FAILED
==== Contents of test case:

  list [set x [object create Eagle._Tests.Default]] [llength [info objects]] 
[set y 0] [object invoke $x TestByRefValueTypeMethod y] $y  [object invoke $x
TestNullableValueTypeMethod $null]  [object invoke $x
TestByRefNullableValueTypeMethod y] $y  [object invoke $x
TestIntArrayReturnValue]  [object invoke $x TestStringArrayReturnValue] 
[object invoke $x TestStringListReturnValue]  [object invoke $x
TestStringListArrayReturnValue]  [set z(0) foo] [object invoke $x
TestByRefStringListArray z]  [array get z] [unset z] [unset y] [object dispose
$x] [unset x]  [llength [info objects]]

---- Test generated error; Return code was: Error
---- Return code should have been one of: Ok Return
---- errorInfo: System.NullReferenceException: Object reference not set to an
instance of an object
  at Eagle._Components.Private.MarshalOps.FixupByRefArguments
(Eagle._Components.Public.Interpreter interpreter, System.Reflection.Binder
binder, System.Globalization.CultureInfo cultureInfo,
Eagle._Containers.Private.ArgumentInfoList argumentInfoList, System.Object[]
args, Eagle._Containers.Public.OptionDictionary options, Boolean create,
Boolean dispose, Boolean alias, Boolean toString,
Eagle._Components.Public.Result& error) [0x00000] 
  at Eagle._Commands.Object.Execute (Eagle._Components.Public.Interpreter
interpreter, IClientData clientData, Eagle._Containers.Public.ArgumentList
arguments, Eagle._Components.Public.Result& result) [0x00000] 
    while executing
"object invoke $x TestByRefNullableValueTypeMethod y"
    invoked from within
"list [set x [object create Eagle._Tests.Default]] [llength [info objects]] 
[set y 0] [object invoke $x TestByRefValueTypeMethod y] $y  [object invoke..."
---- errorCode: NONE
==== object-7.1 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 (crash in 2.0 and
fail in 2.2)
3. Type "set argv [list -constraints monoCrash]" and hit enter.
4. Type "#test object7*" and hit enter to see the failure (complete with stack

Actual Results:  
On Mono 2.0, the runtime crashes.  On Mono 2.2 the unit test fails with a

Expected Results:  
The unit test should pass.

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