[Mono-bugs] [Bug 39380][Wis] Changed - Cannot create 2 AppDomains in a row

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Mon, 10 Mar 2003 04:04:36 -0500 (EST)

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 gkodinov@openlinksw.co.uk.


--- shadow/39380	Sun Mar  9 16:28:40 2003
+++ shadow/39380.tmp.19453	Mon Mar 10 04:04:36 2003
@@ -32,6 +32,22 @@
     d2 = AppDomain.CreateDomain ("d2");
 ------- Additional Comments From gonzalo@ximian.com  2003-03-09 16:28 -------
 May be related to bug #39331
+------- Additional Comments From gkodinov@openlinksw.co.uk  2003-03-10 04:04 -------
+Yes, it's related - we're trying to get Mono to work w/ more than 
+one active ApplicationHost instances in the same process.
+This is the first problem (of many ? ;-) to make the #39331 work.
+The problem here is that somehow the CreateDomain () sets the 
+current domain of the thread (witch is wrong IMHO ?).
+So the next CreateDomain () finds the MarshalObjectByRef interface 
+not to be equal (Using Type.Equals() ) to the MarshalObjectByRef 
+interface in the new domain (it does pointer comparison of klass 
+memeber), falls off the System.Runtime.Remoting.TypeInfo constructor 
+and throws NullReferenceException. I've experimented by changing the 
+type comparisons there to compare the Type().FullName and it went 
+past that point but complained somewhere in the BinaryFormatter.