[Mono-bugs] [Bug 649527] New: MethodBase::Attributes is loading to aggressively

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 27 06:48:09 EDT 2010


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

https://bugzilla.novell.com/show_bug.cgi?id=649527#c0


           Summary: MethodBase::Attributes is loading to aggressively
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: misc
        AssignedTo: rkumpera at novell.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


using System;
using System.Collections.Generic;
using System.Reflection;

class Program
{
    static void Main (string[] args)
    {
        var a = Assembly.LoadFrom ("bug-0-lib.dll");
        var t = a.GetType ("IFoo");

        const BindingFlags all_members = BindingFlags.DeclaredOnly |
                BindingFlags.Static | BindingFlags.Instance |
                BindingFlags.Public | BindingFlags.NonPublic;
        var m = t.GetMembers (all_members) [0] as MethodBase;
        var attr = m.Attributes;
    }
}

Mono

Could not load signature of IFoo:foo due to: 

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or
assembly 'bug-1-lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or
one of its dependencies.
File name: 'bug-1-lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
  at (wrapper managed-to-native)
System.Reflection.MonoMethodInfo:get_method_info
(intptr,System.Reflection.MonoMethodInfo&)
  at System.Reflection.MonoMethodInfo.GetMethodInfo (IntPtr handle) [0x00000]
in <filename unknown>:0 
  at System.Reflection.MonoMethodInfo.GetAttributes (IntPtr handle) [0x00000]
in <filename unknown>:0 
  at System.Reflection.MonoMethod.get_Attributes () [0x00000] in <filename
unknown>:0 
  at Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

-- 
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