https://bugzilla.novell.com/show_bug.cgi?id=635782
https://bugzilla.novell.com/show_bug.cgi?id=635782#c0 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: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) 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[]; s.Close(); 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] at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.ReadBinaryHeader (System.IO.BinaryReader reader, System.Boolean& hasHeaders) [0x00000] at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (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 /home/elior/Projects/Diagram.NET/TestForm/Tests/Serialization.cs:23 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] Expected Results: 1 2 3 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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
