[Mono-bugs] [Bug 56122][Maj] New - Remoting Serialization problem using System.Collections.CollectionBase
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 27 Mar 2004 18:18:08 -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 gmiyake@carter-inc.com.
http://bugzilla.ximian.com/show_bug.cgi?id=56122
--- shadow/56122 2004-03-27 18:18:08.000000000 -0500
+++ shadow/56122.tmp.10120 2004-03-27 18:18:08.000000000 -0500
@@ -0,0 +1,321 @@
+Bug#: 56122
+Product: Mono: Runtime
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: Mono 0.31, WinXP .Net 1.1
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gmiyake@carter-inc.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Remoting Serialization problem using System.Collections.CollectionBase
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+I am attempting to send a class that derives from
+System.Collections.CollectionBase from a Linux server to a Windows
+XP .Net 1.1 client. I can successfully send other classes, but the class
+that derives from System.Collections.CollectionBase causes a
+Serialization Exception.
+
+I used to have this problem with all classes that were derived from
+another class - see Bug ID 54439.
+
+
+Steps to reproduce the problem:
+1. Send a class that derives from System.Collections.CollectionBase from
+the Linux server to the Windows client.
+2.
+3.
+
+Actual Results:
+
+Press Enter to start Remoting Client connection to :
+tcp://starwars:8084/MonoTes
+tServerApplication
+
+Creating two remote items...
+
+Finished Creating two remote items 1 and 2...
+Creating two client items...
+ServerObject ClientCreatedObject3: setting 333
+ServerObject ClientCreatedObject4: setting 444
+
+Adding client created objects to the server list...
+
+Request the server processing items in the list..
+
+Sending complex data to server...
+ComplexData Content:
+Enum value: d
+Array item: Complex Data From Client
+Array item: 1122
+Array item: Test Data - Hello World
+ComplexData round trip result:
+ComplexData Content:
+Enum value: d
+Array item: Complex Data From Client
+Array item: 1122
+Array item: Test Data - Hello World
+ComplexData from server:
+ComplexData Content:
+Enum value: e
+Array item: Complex Data From Server
+Array item: 112233
+Array item: Goodbye World
+Array item: 1
+Double value received from server: 11.3
+Sending Double value to server: 22.4
+
+XferObjectSimple tests -----------------------
+ Sending XferObjectSimple data to server...
+ Receiving XferObjectSimple from server...
+
+XferObjectDerived tests -----------------------
+ Receiving XferObject from server...
+ Sending XferObject data to server...
+
+XferObjectCollection tests -----------------------
+ Receiving XferObjectCollection from server...
+###################################
+RemotingClient caught Exception :
+System.Runtime.Serialization.SerializationExce
+ption: Cannot find member name XferTest.Xfer.XferObjectCollection.
+
+Server stack trace:
+ at
+System.Runtime.Serialization.Formatters.Binary.ReadObjectInfo.GetMemberTyp
+es(String[] inMemberNames)
+ at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor
+(String obje
+ctName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
+typeInf
+ormationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
+objectId, Bi
+naryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
+ at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create
+(String nam
+e, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
+typeInformat
+ionA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId,
+BinaryA
+ssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
+ at
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWi
+thMapTyped(BinaryObjectWithMapTyped record)
+ at
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWi
+thMapTyped(BinaryHeaderEnum binaryHeaderEnum)
+ at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
+ at
+System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(He
+aderHandler handler, __BinaryParser serParser, Boolean fCheck,
+IMethodCallMessag
+e methodCallMessage)
+ at
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
+(Stream serializationStream, HeaderHandler handler, Boolean fCheck,
+IMethodCallM
+essage methodCallMessage)
+ at
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.UnsafeDeser
+ializeMethodResponse(Stream serializationStream, HeaderHandler handler,
+IMethodC
+allMessage methodCallMessage)
+ at
+System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMess
+age(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
+ at
+System.Runtime.Remoting.Channels.BinaryClientFormatterSink.DeserializeMess
+age(IMethodCallMessage mcm, ITransportHeaders headers, Stream stream)
+ at
+System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMess
+age(IMessage msg)
+
+Exception rethrown at [0]:
+ at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
+(IMessage req
+Msg, IMessage retMsg)
+ at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
+(MessageData& msgDa
+ta, Int32 type)
+ at RemotingTest.ServerList.GetTestXferObjectCollection() in
+c:\amadeus\dev\mo
+no\monotest\remotingobject\remotingobject\remoteobject.cs:line 108
+ at RemotingTest.RemotingClient.Main() in
+c:\amadeus\dev\mono\monotest\remotin
+gclient\remotingclient.cs:line 113
+
+Server stack trace:
+ at
+System.Runtime.Serialization.Formatters.Binary.ReadObjectInfo.GetMemberTyp
+es(String[] inMemberNames)
+ at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor
+(String obje
+ctName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
+typeInf
+ormationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
+objectId, Bi
+naryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
+ at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create
+(String nam
+e, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
+typeInformat
+ionA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId,
+BinaryA
+ssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
+ at
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWi
+thMapTyped(BinaryObjectWithMapTyped record)
+ at
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWi
+thMapTyped(BinaryHeaderEnum binaryHeaderEnum)
+ at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
+ at
+System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(He
+aderHandler handler, __BinaryParser serParser, Boolean fCheck,
+IMethodCallMessag
+e methodCallMessage)
+ at
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
+(Stream serializationStream, HeaderHandler handler, Boolean fCheck,
+IMethodCallM
+essage methodCallMessage)
+ at
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.UnsafeDeser
+ializeMethodResponse(Stream serializationStream, HeaderHandler handler,
+IMethodC
+allMessage methodCallMessage)
+ at
+System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMess
+age(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
+ at
+System.Runtime.Remoting.Channels.BinaryClientFormatterSink.DeserializeMess
+age(IMethodCallMessage mcm, ITransportHeaders headers, Stream stream)
+ at
+System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMess
+age(IMessage msg)
+
+Exception rethrown at [0]:
+ at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
+(IMessage req
+Msg, IMessage retMsg)
+ at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
+(MessageData& msgDa
+ta, Int32 type)
+ at RemotingTest.ServerList.GetTestXferObjectCollection() in
+c:\amadeus\dev\mo
+no\monotest\remotingobject\remotingobject\remoteobject.cs:line 108
+ at RemotingTest.RemotingClient.Main() in
+c:\amadeus\dev\mono\monotest\remotin
+gclient\remotingclient.cs:line 113
+###################################
+Done. Press Enter to exit.
+
+
+Expected Results:
+Expected the XferObjectCollection to be sent like XferObjectDerived.
+
+How often does this happen?
+All the time.
+
+Additional Information:
+Previous problem with sending any derived type was fixed in Bug ID 54439
+Server: Red Hat Linux 9, Mono 0.31
+Client: Win XP, .Net 1.1
+
+Here are the classes being transferred:
+
+This does not work:
+------- XferObjectCollection
+using System;
+using ToolFX.Xfer;
+
+namespace XferTest.Xfer
+{
+ /// <summary>
+ /// Summary description for XferObjectCollection.
+ /// </summary>
+ ///
+ [Serializable]
+ public class XferObjectCollection :
+System.Collections.CollectionBase {
+ private String myName = "Unknown";
+
+ public XferObjectCollection():
+ base()
+ {
+
+ }
+ public String Name
+ {
+ get { return myName; }
+ set { myName = value; }
+ }
+
+ }
+}
+
+This works:
+------ XferObjectDerived.cs
+
+using System;
+//using System.Runtime.Serialization;
+
+namespace XferTest.Xfer {
+ public enum BLOCK_STATE {
+ AVAILABLE,
+ FILLING,
+ QUEUED_FOR_XFER,
+ TRANSFERING,
+ QUEUED_ON_CLIENT,
+ CLIENT_PROCESSING,
+ OWNED_BY_APP,
+ DISPOSED
+ }
+ [Serializable]
+ public class XferObjectDerived : XferObjectBase //, ISerializable
+ {
+ public XferObjectDerived( int pNumRows) {
+ myNumRows = pNumRows;
+ myLastUsedIndex = myNumRows;
+ }
+ public XferObjectDerived() {
+ myNumRows = 0;
+ myLastUsedIndex = myNumRows;
+ }
+ public int myNumRows;
+ public int myLastUsedIndex;
+
+ }
+}
+---- XferObjectBase.cs
+using System;
+//using System.Runtime.Serialization;
+namespace XferTest.Xfer
+{
+ /// <summary>
+ /// Summary description for Class1.
+ /// </summary>
+ [Serializable]
+ public class XferObjectBase //: ISerializable
+ {
+ private long myXferSequenceNumber = -1;
+ public XferObjectBase()
+ {
+ }
+ public long XferSequenceNumber {
+ get { return myXferSequenceNumber; }
+ set { myXferSequenceNumber = value; }
+ }
+
+ }
+}