[Mono-devel-list] Possible bug when using System.IO.FileStream

Peter Magnusson crippledcanary at gmail.com
Tue Mar 15 10:46:32 EST 2005

When I use a FileStream(string, FileMode, FileAccess, FileShare, int,
bool) constructor I get an error like below.

** ERROR **: Thread 0x930 calling into managed code is not registered
with the GC. On UNIX, this can be fixed by #include-ing <gc.h> before
<pthread.h> in the file containing the thread creation code.

I use mono and mcs from revision 41836

I have run the same test on my Windows machine and there it's working
as expected and creates a file called "log.txt" and writes into that

I don't know if this is expected behaviour but I don't think so.

Steps to reproduce:
I have attached a test class that can be compliled with "mcs test.cs"
and run with "mono test.exe".
The class contains 2 methods that use FileStream, one that is working
and one wich isn't. The faulty one is called WriteLines_Faulty.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cs
Type: application/octet-stream
Size: 785 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050315/89d45f52/attachment.obj 

More information about the Mono-devel-list mailing list