[Mono-bugs] [Bug 635782] New: Serialization / De-serialization

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Aug 31 04:27:46 EDT 2010



           Summary: Serialization / De-serialization
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: elior at cs.technion.ac.il
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)

Collection Deserialization fails

Reproducible: Always

Steps to Reproduce:
1. Run the following code-snippet:
Stream s = new MemoryStream();
int[] arr = new int[] {1,2,3};
IFormatter formatter = new BinaryFormatter();
formatter.Serialize(s, arr);
arr = formatter.Deserialize(s) as int[];
foreach (var item in arr)
    Console.WriteLine (item);
Actual Results:  
System.IO.EndOfStreamException : Failed to read past end of stream.

  at System.IO.BinaryReader.ReadByte () [0x00000] 
(System.IO.BinaryReader reader, System.Boolean& hasHeaders) [0x00000] 
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream) [0x00000] 
  at TestForm.Serialization.TestCase () [0x00027] in
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] 

Expected Results:  

If you need any help fixing it, I will be happy to oblige.
(I just would like to know its not already fixed, since it seems fairly basic).

Keep up the good work!

Configure bugmail: https://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