[Mono-bugs] [Bug 410710] CallByName infinte loop

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jul 21 15:56:29 EDT 2008


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

User andyhume32 at yahoo.co.uk added comment
https://bugzilla.novell.com/show_bug.cgi?id=410710#c3


Andy Hume <andyhume32 at yahoo.co.uk> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |andyhume32 at yahoo.co.uk




--- Comment #3 from Andy Hume <andyhume32 at yahoo.co.uk>  2008-07-21 13:56:29 MDT ---
I don't quite understand what fixed it but the infinite recursion is gone. 
That's visible both by usage and inspection, running ILDasm on 1.9 and current
shows that only in the older assembly does Versioned.CallByName call itself!

    D:\>ildasm.exe /text "\Program
Files\Mono-1.9\lib\mono\2.0\Microsoft.VisualBasic.dll"  | findstr "CallByName"
      .method public static object  CallByName(object Instance,
        IL_0004:  call       object
Microsoft.VisualBasic.CompilerServices.Versioned::CallByName(object,
      } // end of method Versioned::CallByName

    D:\>ildasm.exe /text
D:\cygwin\usr\src\mono\mono-basic\class\lib\vbnc\Microsoft.VisualBasic.dll  |
findstr "CallByName"
      .method public static object  CallByName(object Instance,
        IL_0004:  call       object
Microsoft.VisualBasic.Interaction::CallByName(object,
      } // end of method Versioned::CallByName

SVN doesn't show and changes to that code, so perhaps a compiler fix...


However I haven't managed to CallType.Get to work at all yet, I have been
successful with Set and Method.  The original case fails with
[[
Unhandled Exception: System.MissingMemberException: Cannot find the requested
class member.
  at Microsoft.VisualBasic.CompilerServices.LateBinder.BindToMethod
(BindingFlags bindingAttr, System.Reflection.MethodBase[] match,
System.Object[]& args, System.Reflection.ParameterModifier[] modifiers,
System.Globalization.CultureInfo culture, System.String[] names, System.Object&
state) [0x00000] 
  at System.MonoType.InvokeMember (System.String name, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object target, System.Object[] args,
System.Reflection.ParameterModifier[] modifiers,
System.Globalization.CultureInfo culture, System.String[] namedParameters)
[0x00230] in D:\cygwin\usr\src\mono\mcs\class\corlib\System\MonoType.cs:382 
  at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet (System.Object
o, System.Type objType, System.String name, System.Object[] args,
System.String[] paramnames, System.Boolean[] CopyBack) [0x00000] 
  at Microsoft.VisualBasic.Interaction.CallByName (System.Object ObjectRef,
System.String ProcName, CallType UseCallType, System.Object[] Args) [0x00000] 
  at Microsoft.VisualBasic.CompilerServices.Versioned.CallByName (System.Object
Instance, System.String MethodName, CallType UseCallType, System.Object[]
Arguments) [0x00000] 
  at Module1.MSDN_TestCallByName2 () [0x00000] 
  at Module1.Main () [0x00000] 
]]


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