[Mono-bugs] [Bug 403880] New: [Regression] TypeDescriptor. GetProperties fail with interface type

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 25 14:59:51 EDT 2008


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


           Summary: [Regression] TypeDescriptor.GetProperties fail with
                    interface type
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: contact at i-nz.net
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


TypeDescriptor.GetProperties fails on an interface type.  Works in 1.9.

For instance:
   TypeDescriptor.GetProperties (typeof (IComponent));
fails with
[[
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
 at System.ComponentModel.TypeInfo.GetProperties () [0x0002a] in
D:\cygwin\usr\src\mono\mcs\class\System\System.ComponentModel\TypeDescriptor.cs:1164 
 at System.ComponentModel.Info.GetProperties (System.Attribute[] attributes)
[0x00000] in
D:\cygwin\usr\src\mono\mcs\class\System\System.ComponentModel\TypeDescriptor.cs:952 
 at System.ComponentModel.TypeDescriptor.GetProperties (System.Type
componentType, System.Attribute[] attributes) [0x00000] in
D:\cygwin\usr\src\mono\mcs\class\System\System.ComponentModel\TypeDescriptor.cs:733 
 at System.ComponentModel.TypeDescriptor.GetProperties (System.Type
componentType) [0x00000] in
D:\cygwin\usr\src\mono\mcs\class\System\System.ComponentModel\TypeDescriptor.cs:688 
 at PropertyDescriptorCollection_Sort.Main () [0x00000] 
]]

Apparently Type.BaseType of an interface type is null, the loop in
TypeInfo.GetProperties need to also terminate when at an interface -- or just
only on null.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list