[Mono-bugs] [Bug 30158][Maj] New - Mono should throw and exception with different parameters in a delegate.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
10 Sep 2002 20:17:32 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kiwnix@yahoo.es.
http://bugzilla.ximian.com/show_bug.cgi?id=30158
--- shadow/30158 Tue Sep 10 16:17:32 2002
+++ shadow/30158.tmp.8039 Tue Sep 10 16:17:32 2002
@@ -0,0 +1,64 @@
+Bug#: 30158
+Product: Mono/Runtime
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: kiwnix@yahoo.es
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Mono should throw and exception with different parameters in a delegate.
+
+Description of Problem:
+
+Mono should throw and exception with different parameters in a delegate,
+but it doesn't, if the parameter is used, it hangs with:
+Needed to allocate blacklisted block at 0x8254000
+and eat all memory.
+
+Actual Results:
+Needed to allocate blacklisted block at 0x8254000
+
+and mono hangs
+
+Expected Results: (in MS SDK it occours)
+
+Unhandled Exception: System.ArgumentException: Error binding to target method.
+ at System.Delegate.InternalCreateMethod(RuntimeMethodInfo invokeMeth,
+Runtime
+MethodInfo targetMethod)
+ at System.Delegate.CreateDelegate(Type type, MethodInfo method)
+ at ComprobacionDelegados.Main()
+
+
+Additional Information:
+
+Test case:
+using System;
+using System.Reflection;
+
+public delegate void D();
+
+public class ComprobacionDelegados
+{
+ public static void Main ()
+ {
+ Type t = typeof(ComprobacionDelegados);
+ MethodInfo m = t.GetMethod("Metodo1");
+ D obj = (D) Delegate.CreateDelegate(typeof(D), m);
+ obj();
+ }
+
+ public static void Metodo1 (string s)
+ {
+ Console.WriteLine("Mostrando " + s); //if S is not used,
+ //the problem doesnt appear
+ }
+}