Saturday, February 01, 2003

FileStream Bug

Martin Plante of Xceed Software writes to report that the FileStream object can become unusable when writing to a removable drive:

  1. Short description

    When writing to a FileStream on a removable drive, and the FileStream gets out of space, it sometimes gets in a state where no other method can be called on the stream, not even Dispose.
  2. Steps to reproduce

    Open a FileStream for writing on a floppy drive, and make three Write calls, respectively of 1455389, 63 and 8074 bytes.
  3. What happens

    The third call throws an IOException (as expected), but every call to the FileStream once this happens keep throwing the same exception.
  4. What should happen instead

    At the very least, you should be able to call Dispose on that FileStream. We should also be able to call Flush, as in the above example, the second buffer (63 bytes) does not make it to the file either.
  5. Any additional info

    The thread on DOTNET-CLR:
    http://discuss.develop.com/archives/wa.exe?A2=ind0301B&L=DOTNET-CLR&P=R8525&I=-3

    Confirmed was a bug by Gang Peng of MS:
    "This is a known bug and will be fixed in Whidbey."
    (Ref: microsoft.beta.dotnet.framework)
Thank you.
 
    Martin Plante,  Lead Developer                
 Xceed Software Inc.   -Serious About Components- 
           Tel.: (450) 442-2626 ext. 223          
                            www.xceedsoft.com     

I've added this bug as #13 in the .NET Bugs Registry.

   12:01 AM

Content of this site is © Dejan Jelovic. All rights reserved.