[Mono-bugs] [Bug 39915][Nor] New - RemotingServices.Disconnect() and ContextBoundObject

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 18 Mar 2003 14:46:34 -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 jean-marc.andre@polymtl.ca.

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

--- shadow/39915	Tue Mar 18 14:46:34 2003
+++ shadow/39915.tmp.21620	Tue Mar 18 14:46:34 2003
@@ -0,0 +1,88 @@
+Bug#: 39915
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: RedHat 8.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jean-marc.andre@polymtl.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: RemotingServices.Disconnect() and ContextBoundObject
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+RemotingServices.Disconnect through an ArgumentException when passing a
+ContextBound object as argument.
+The MS runtime doesn't through this exception.
+
+Steps to reproduce the problem:
+1.Build the following lines and run it with Mono.
+2. 
+using System;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Tcp;
+
+namespace CBTest
+{
+	internal class CBTestObject: ContextBoundObject
+	{
+		public CBTestObject(int id)
+		{
+			_id = id;
+		}
+		public int Id
+		{
+			get{ return _id;}
+		}
+		private int _id;
+	}
+
+	public class CBTest
+	{
+		public static void Main()
+		{
+			TcpChannel chn = null;
+			try
+			{
+				chn = new TcpChannel(1234);
+				ChannelServices.RegisterChannel(chn);
+
+				CBTestObject cbObject = new CBTestObject(1);		
+
+				RemotingServices.Marshal(cbObject);
+
+				RemotingServices.Disconnect(cbObject);
+			}
+			finally
+			{
+				if(chn != null) ChannelServices.UnregisterChannel(chn);
+			}
+		}
+	}
+}
+
+3. 
+
+Actual Results:
+
+Unhandled Exception: System.ArgumentException: The obj parameter is a proin
+<0x00089> 00 System.Runtime.Remoting.RemotingServices:Disconnect
+(SysthalByRefObject)
+in <0x000b0> 00 CBTest.CBTest:Main ()
+
+
+Expected Results:
+nothing
+
+How often does this happen? 
+Always
+
+Additional Information: