[Mono-bugs] [Bug 74732][Blo] New - Sharing/Access violation after exiting a running mono app with an open StreamWriter

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 26 Apr 2005 05:54:13 -0400 (EDT)


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 andrew.gleave@ifgmgt.com.

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

--- shadow/74732	2005-04-26 05:54:13.000000000 -0400
+++ shadow/74732.tmp.8973	2005-04-26 05:54:13.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 74732
+Product: Mono: Runtime
+Version: unspecified
+OS: Debian Woody
+OS Details: Mac OS 10.3.9, Debian
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: io-layer
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: Andrew.Gleave@ifgmgt.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Sharing/Access violation after exiting a running mono app with an open StreamWriter
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Terminating a running mono process with an open StreamWriter, either by
+using kill or Ctrl-C, will cause a sharing violation on the file when the
+process is restarted.
+
+Steps to reproduce the problem:
+1. Open a StreamWriter and write some output to it.
+2. Kill the process while it is running
+3. Try to start the app again, and you will get something like the
+following exception
+
+Actual Results:
+Throws the following exception on restarting the app:
+
+Unhandled Exception: System.IO.IOException: Sharing violation on path 
+TestApp.log in <0x0032a> System.IO.FileStream:.ctor (System.String 
+name, FileMode mode, FileAccess access, FileShare share, Int32 
+bufferSize, Boolean isAsync, Boolean anonymous) in <0x0001f> 
+System.IO.FileStream:.ctor (System.String name, FileMode mode, 
+FileAccess access, FileShare share) in (wrapper 
+remoting-invoke-with-check) System.IO.FileStream:.ctor
+(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
+in <0x000e1> System.IO.StreamWriter:.ctor (System.String path, Boolean 
+append, System.Text.Encoding encoding, Int32 bufferSize) in (wrapper 
+remoting-invoke-with-check) System.IO.StreamWriter:.ctor
+(string,bool,System.Text.Encoding,int)
+in <0x0004a> ConsoleApplication4.Class1:Main (System.String[] args)
+
+Expected Results:
+Mono should have no issue re-opening the file
+
+How often does this happen?
+Every time.
+
+Additional Information:
+It only affects recent builds.  I can remember it not being an issue, until
+l about three weeks ago.