[Mono-bugs] [Bug 43187][Nor] New - ObjRef.ctr(SerializationInfo, StreamingContext)

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 16 May 2003 17:23:44 -0400 (EDT)


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=43187

--- shadow/43187	Fri May 16 17:23:44 2003
+++ shadow/43187.tmp.23152	Fri May 16 17:23:44 2003
@@ -0,0 +1,66 @@
+Bug#: 43187
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+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: 
+Cc: 
+Summary: ObjRef.ctr(SerializationInfo, StreamingContext)
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+I think the MS ObjRef.ctr(SerializationInfo, StreamingContext) uses the
+SerializationInfo.GetInt32 function to assign the *flags* field and not a
+type cast as it is the case in the Mono implementation.
+
+
+Steps to reproduce the problem:
+1. 
+
+
+using System;
+using System.Runtime.Remoting;
+using System.Runtime.Serialization;
+
+class ObjRefB: ObjRef {
+	
+	public static void Main() {
+
+		SerializationInfo info = new SerializationInfo(typeof(ObjRef), new
+FormatterConverter());
+		info.AddValue("uri",
+"/08b200e4_14d0_40e5_ae83_dlacfcb76a11/191545_21.rem", typeof(string));
+		info.AddValue("objrefFlags", "0", typeof(string));
+
+		ObjRef objRef = new ObjRef(info, new
+StreamingContext(StreamingContextStates.All));
+
+	}
+}
+
+2. 
+3. 
+
+Actual Results:
+it throws a Type cast exception
+
+Expected Results:
+the test exits normally
+
+
+How often does this happen? 
+always
+
+Additional Information:
+I'll join a test source file and a patch.