[Mono-bugs] [Bug 82510][Maj] Changed - assert when unloading domains and throwing exception from XmlDocument.Load.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 21 13:32:39 EDT 2007


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 joe at otee.dk.

http://bugzilla.ximian.com/show_bug.cgi?id=82510

--- shadow/82510	2007-08-21 12:34:56.000000000 -0400
+++ shadow/82510.tmp.2156	2007-08-21 13:32:39.000000000 -0400
@@ -61,6 +61,28 @@
 			Console.WriteLine ("invoke");
 			Assembly a = Assembly.LoadFrom ("test.exe");
 			Type t = a.GetType ("MonoEmbed");
 			t.GetMethod ("DoException").Invoke (null, null);
 		}
 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+------- Additional Comments From joe at otee.dk  2007-08-21 13:32 -------
+In this specific example it would indeed be easier.
+Unity is not really that simple unfortunately.
+
+The main problem is that Unity does some 20.000-100.000 mono_runtime_invoke calls 
+every second depending on the game.
+
+If i wanted to do this indirection through managed code i would have to convert all our 
+code that uses mono_runtime_invoke to call the managed ridrect method. Which then calls 
+Invoke from managed code as you described.
+
+In Unity however we do not know the class or the method name at compile time.
+I presume there is some way to directly pass the MethodInfo from unmanaged code to the 
+the method that does the redirect. But of course the MethodInfo would first have to be 
+allocated.
+
+Parameters also would have to be boxed, and a MonoArray would have to be allocated 
+instead of using the usual mono_runtime_invoke parameters.
+
+It seems that this would make invokation of our methods around twice as slow. So thats 
+not very good. This is why, i want to switch domains from unmanaged code.


More information about the mono-bugs mailing list