[Mono-bugs] [Bug 567522] New: BinaryFormatter doesn't deserialize object right
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Dec 29 06:15:36 EST 2009
http://bugzilla.novell.com/show_bug.cgi?id=567522
http://bugzilla.novell.com/show_bug.cgi?id=567522#c0
Summary: BinaryFormatter doesn't deserialize object right
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: x86
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: mika.aalto at tut.fi
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=334470)
--> (http://bugzilla.novell.com/attachment.cgi?id=334470)
Testing application
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.6)
Gecko/20091216 Mandriva Linux/1.9.1.6-0.1mdv2010.0 (2010.0) Firefox/3.5.6
Object serialized in MS .NET environment using BinaryFormatter can't be
deserialized with mono.
Attached example application contains data.bin file which is object serialized
in MS .NET. Running attached application deserializes this file correctly with
MS .NET but not with mono.
Reproducible: Always
Steps to Reproduce:
1. Run attached example application
2.
3.
Actual Results:
Unhandled Exception: System.Runtime.Serialization.SerializationException:
Unexpected binary element: 0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObject
(BinaryElement element, System.IO.BinaryReader reader, System.Int64& objectId,
System.Object& value, System.Runtime.Serialization.SerializationInfo& info)
[0x00000] in <filename unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadValue
(System.IO.BinaryReader reader, System.Object parentObject, Int64
parentObjectId, System.Runtime.Serialization.SerializationInfo info,
System.Type valueType, System.String fieldName, System.Reflection.MemberInfo
memberInfo, System.Int32[] indices) [0x00000] in <filename unknown>:0
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectContent
(System.IO.BinaryReader reader,
System.Runtime.Serialization.Formatters.Binary.TypeMetadata metadata, Int64
objectId, System.Object& objectInstance,
System.Runtime.Serialization.SerializationInfo& info) [0x00000] in <filename
unknown>:0
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectInstance
(System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo,
System.Int64& objectId, System.Object& value,
System.Runtime.Serialization.SerializationInfo& info) [0x00000] in <filename
unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObject
(BinaryElement element, System.IO.BinaryReader reader, System.Int64& objectId,
System.Object& value, System.Runtime.Serialization.SerializationInfo& info)
[0x00000] in <filename unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObject
(BinaryElement element, System.IO.BinaryReader reader, System.Int64& objectId,
System.Object& value, System.Runtime.Serialization.SerializationInfo& info)
[0x00000] in <filename unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject
(BinaryElement element, System.IO.BinaryReader reader) [0x00000] in <filename
unknown>:0
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph
(BinaryElement elem, System.IO.BinaryReader reader, Boolean readHeaders,
System.Object& result, System.Runtime.Remoting.Messaging.Header[]& headers)
[0x00000] in <filename unknown>:0
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] in <filename
unknown>:0
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream) [0x00000] in <filename unknown>:0
at SerializationTest.MainClass.Main (System.String[] args) [0x00000] in
<filename unknown>:0
Expected Results:
Class deserialized
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list