[Mono-devel-list] Hangs on System.IO.MonoIO:Write

STEPHEN W. COREY - 5535 swc at wardandsmith.com
Tue Aug 2 09:03:12 EDT 2005


I've got a C# app (developed & tested on WinXP) which writes an
ArrayList to a file, using a StreamWriter. The last line in the code is
the call to StreamWriter.Close(). 75% of the time, the code runs
flawlessly. Sporadically, though, it hangs on the call to
System.IO.MonoIO:Write(). When I run mono with the "-v" parameter,
here's what I get (I'm only showing the parts before/after the hang):
 
----When it hangs, here's what I get-----
Method System.IO.FileStream:WriteSegment (byte[],int,int) emitted at
0x40e53418 to 0x40e53474 [emaillistgenerator.exe]
Method System.IO.StreamWriter:Close () emitted at 0x40e53478 to
0x40e53492 [emaillistgenerator.exe]
Method System.IO.StreamWriter:Dispose (bool) emitted at 0x40e53498 to
0x40e534ee [emaillistgenerator.exe]
Method System.IO.StreamWriter:Flush () emitted at 0x40e534f0 to
0x40e5354c [emaillistgenerator.exe]
Method (wrapper managed-to-native) System.IO.MonoIO:Seek
(intptr,long,System.IO.SeekOrigin,System.IO.MonoIOError&) emitted at
0x40e53550 to 0x40e535c5 [emaillistgenerator.exe]
Method (wrapper managed-to-native) System.IO.MonoIO:Write
(intptr,byte[],int,int,System.IO.MonoIOError&) emitted at 0x40e535c8 to
0x40e5361c [emaillistgenerator.exe]
(This is the end of the output)

 
----When it runs normal, here's what I get-----
Method System.IO.FileStream:WriteSegment (byte[],int,int) emitted at
0x40e53e90 to 0x40e53eec [emaillistgenerator.exe]
Method System.IO.StreamWriter:Close () emitted at 0x40e53ef0 to
0x40e53f0a [emaillistgenerator.exe]
Method System.IO.StreamWriter:Dispose (bool) emitted at 0x40e53f10 to
0x40e53f66 [emaillistgenerator.exe]
Method System.IO.StreamWriter:Flush () emitted at 0x40e53f68 to
0x40e53fc4 [emaillistgenerator.exe]
Method (wrapper managed-to-native) System.IO.MonoIO:Seek
(intptr,long,System.IO.SeekOrigin,System.IO.MonoIOError&) emitted at
0x40e53fc8 to 0x40e5403d [emaillistgenerator.exe]
Method (wrapper managed-to-native) System.IO.MonoIO:Write
(intptr,byte[],int,int,System.IO.MonoIOError&) emitted at 0x40e54040 to
0x40e54094 [emaillistgenerator.exe]
Method System.ComponentModel.Component:Finalize () emitted at 0x40e54098
to 0x40e540c5 [emaillistgenerator.exe]
Method System.DirectoryServices.DirectoryEntry:Dispose (bool) emitted at
0x40e540c8 to 0x40e540f1 [emaillistgenerator.exe]
Method System.EventArgs:.cctor () emitted at 0x40e54108 to 0x40e5412d
[emaillistgenerator.exe]
(More output after this, but I omitted it)
 
 
 
Can anyone help figure out why it's hanging? I've tried doing a Flush()
on the StreamWriter before the close, but it doesn't make a difference.
I am using Mono 1.1.8.2. Thanks!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050802/ef013bca/attachment.html 


More information about the Mono-devel-list mailing list