[Mono-bugs] [Bug 39331][Wis] Changed - NullReference unwraping an object created in another domain

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sat, 8 Mar 2003 16:21:09 -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 gonzalo@ximian.com.

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

--- shadow/39331	Sat Mar  8 15:30:04 2003
+++ shadow/39331.tmp.24000	Sat Mar  8 16:21:09 2003
@@ -1,23 +1,23 @@
 Bug#: 39331
-Product: Mono/Class Libraries
+Product: Mono/Runtime
 Version: unspecified
 OS: Red Hat 7.2
 OS Details: 
-Status: ASSIGNED   
+Status: NEW   
 Resolution: 
 Severity: Unknown
 Priority: Wishlist
-Component: System.Web
-AssignedTo: gonzalo@ximian.com                            
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: ztashev@openlinksw.co.uk               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Attempt to create second application host generated error.
+Summary: NullReference unwraping an object created in another domain
 
 Please fill in this template when reporting a bug, unless you know what 
 you are doing.
 Description of Problem:
 
 Attempt to create second application host generated error. 
@@ -69,6 +69,36 @@
 ApplicationHost.CreateApplicationHost (type, virtualDir, rootDir);
 +			host2 =  (XSPApplicationHost) 
 ApplicationHost.CreateApplicationHost (type, "/virtdir2", rootDir);
  			host.SetListenAddress (port);
  			
  			Console.WriteLine ("Listening on port: {0}", port);
+
+------- Additional Comments From gonzalo@ximian.com  2003-03-08 16:21 -------
+This seems to be a runtime bug.
+I've created this test case:
+---
+using System;
+using System.Runtime.Remoting;
+
+[Serializable]
+class Test
+{
+	static void Main ()
+	{
+		AppDomain domain = AppDomain.CreateDomain ("hola");
+		ObjectHandle oh = domain.CreateInstance (typeof
+(Test).Assembly.FullName, typeof (Test).FullName);
+		oh.Unwrap ();
+		domain = AppDomain.CreateDomain ("hola2");
+		oh = domain.CreateInstance (typeof (Test).Assembly.FullName, typeof
+(Test).FullName);
+		oh.Unwrap ();
+	}
+}
+----
+
+if i run it like 'mono remoting.test.exe' it says:
+Unhandled Exception: System.NullReferenceException: A null value was
+found where an object instance was required
+
+however, if i do 'mono --share-code remoting-test.exe' it works.