[Mono-bugs] [Bug 74996][Blo] New - MI/ method lookup oddness ...
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu May 19 12:47:52 EDT 2005
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 michael at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74996
--- shadow/74996 2005-05-19 12:47:52.000000000 -0400
+++ shadow/74996.tmp.6103 2005-05-19 12:47:52.000000000 -0400
@@ -0,0 +1,76 @@
+Bug#: 74996
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: misc
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: michael at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MI/ method lookup oddness ...
+
+I have this code:
+
+ public string testMulti(XMulti multi)
+ {
+ Console.WriteLine("HERE: enter testMulti");
+ if (multi == null)
+ Console.WriteLine("ERROR: multi is null");
+ else
+ Console.WriteLine("HERE: multi is " + multi);
+ try {
+ Console.WriteLine("HERE: chop -0");
+ checkEqual(61 * 6, multi.fn61(6));
+ Console.WriteLine("HERE: chop1");
+ checkEqual(11 * 1, multi.fn11(1)); # Line 719
+ Console.WriteLine("HERE: chop2"); # Line 720
+
+
+When run it prints out:
+
+HERE: multi is Uno object proxy. OID:
+...
+HERE: chop -0
+...
+HERE: chop0
+HERE: chop1
+CallManaged TargetInvocationException
+System.Reflection.TargetInvocationException: Exception has been thrown by
+the target of an invocation. ---> System.NullReferenceException: Object
+reference not set to an instance of an object
+in [0x00063] (at
+/opt/OpenOffice/src680-m102/testtools/source/bridgetest/cli/cli_cs_testobj.cs:720)
+cs_testobj.BridgeTestObject:testMulti (XMulti multi)
+in <0x00000> <unknown method>
+in (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
+(object,object[])
+in [0x00044] (at
+/opt/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:127)
+System.Reflection.MonoMethod:Invoke (System.Object obj, BindingFlags
+invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
+System.Globalization.CultureInfo culture)--- End of inner exception stack
+trace ---
+
+ie. it crashes trying to invoke '.fn11'
+
+The problem with claiming the object is Nil is that we just invoked a
+method on it: The object structure is indeed highly complex -
+involving multiply inherited interfaces. The IDL is here:
+
+http://go-oo.org/lxr/source/udk/testtools/source/bridgetest/idl/bridgetest.idl#137
+
+Notice the 'fn11' method is implemented on the 'XMultiBase1' interface.
+
+Notice the 'fn61' method is implemented on a derived child & executes
+fine.
+
+I attach the dll with the compiled types from this idl.
+
+HTH :-)
More information about the mono-bugs
mailing list