[Mono-bugs] [Bug 389280] New: TypeManager. MemberLookup_FindMembers method throws NullReferenceException for arrays of emitting types

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 12 06:04:11 EDT 2008


           Summary: TypeManager.MemberLookup_FindMembers method throws
                    NullReferenceException for arrays of emitting types
           Product: Mono: Compilers
           Version: 1.9.0
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: mihailik at gmail.com
         QAContact: mono-bugs at lists.ximian.com
        Depends on: 389279
          Found By: Other

Mono.CSharp.TypeManager.MemberLookup_FindMembers method
throws NullReferenceException for arrays of emitting types in MS_COMPATIBLE
and with original Microsoft .NET 2.0 SP1

Proposed fix is to add check for IsArray:
        private static MemberInfo [] MemberLookup_FindMembers (Type t,
MemberTypes mt, 

BindingFlags bf,
                                                               string name, out

                MemberCache cache;

                // If this is a dynamic type, it's always in the
`builder_to_declspace' hash table
                // and we can ask the DeclSpace for the MemberCache.
                if (t.Assembly == CodeGen.Assembly.Builder && !t.IsArray) {
                        if (t.IsGenericParameter) {
                                TypeParameter tparam = (TypeParameter) 


                                used_cache = true;
                                if (tparam.MemberCache == null)
                                        return new MemberInfo[0];

                                return tparam.MemberCache.FindMembers (
                                        mt, bf, name,
FilterWithClosure_delegate, null);

                        if (t.IsGenericType && !t.IsGenericTypeDefinition)
                                t = t.GetGenericTypeDefinition ();
                if (t is TypeBuilder) {
                        DeclSpace decl = (DeclSpace) builder_to_declspace [t];
                        cache = decl.MemberCache;

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