[Mono-bugs] [Bug 36875][Nor] New - System.IO.MemoryStream bug in ToArray() and GetBuffer()

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 17 Jan 2003 00:29:02 -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 eric@5stops.com.

http://bugzilla.ximian.com/show_bug.cgi?id=36875

--- shadow/36875	Fri Jan 17 00:29:02 2003
+++ shadow/36875.tmp.21595	Fri Jan 17 00:29:02 2003
@@ -0,0 +1,33 @@
+Bug#: 36875
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: eric@5stops.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.IO.MemoryStream bug in ToArray() and GetBuffer()
+
+Version: 0.18 -- checked out of cvs tree on 01.16.2003
+
+When calling ToArray() after Close(), i get the error:
+Unhandled Exception: System.ArgumentException: The MemoryStream has been closed
+in <0x0007b> 00 System.IO.MemoryStream:ToArray ()
+in [0x0000f] (at /home/eric/mono/bug_ser.cs:37) 00
+bug_ser.bug_ser:obj_serialize_int
+(object,System.Runtime.Serialization.IFormatter)
+in [0x00020] (at /home/eric/mono/bug_ser.cs:46) 00 bug_ser.bug_ser:Main ()
+
+
+according to the ECMA:
+"The buffer of a closed System.IO.MemoryStream is still available, and the
+System.IO.MemoryStream.ToArray and System.IO.MemoryStream.GetBuffer methods
+can be called successfully."