[Mono-bugs] [Bug 56158][Min] New - MCS crashes when not running in console environment

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 29 Mar 2004 08:55:25 -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 markuspalme@gmx.de.

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

--- shadow/56158	2004-03-29 08:55:25.000000000 -0500
+++ shadow/56158.tmp.24911	2004-03-29 08:55:25.000000000 -0500
@@ -0,0 +1,61 @@
+Bug#: 56158
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: Windows XP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: MarkusPalme@gmx.de               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: MCS crashes when not running in console environment
+
+Description of Problem:
+
+When mcs is not invoked from a console, it can't open STDIN and STDERR and
+crashes.
+
+Steps to reproduce the problem:
+1. Compile the attached program, it invokes the c# compiler and
+makesreproducing easy: csc /target:winexe test.cs
+2. Run the compiled program using the MS Runtime (Mono is not capable of
+executing this programm due to missing API implementation)
+
+Actual Results:
+
+Crash with TypeInitializationException
+
+How often does this happen? 
+
+Always.
+
+Additional Information:
+
+Stacktrace:
+
+Unhandled Exception: System.TypeInitializationException: An exception was
+thrown by the type initializer for System.Console --->
+System.IO.IOException: Invalid handle.
+
+in <0x000ac> System.IO.FileStream:.ctor
+(intptr,System.IO.FileAccess,bool,int,bool,bool)
+in <0x000b1> (wrapper remoting-invoke-with-check)
+System.IO.FileStream:.ctor (intptr,System.IO.FileAccess,bool,int,bool,bool)
+in <0x00045> System.Console:OpenStandardInput (int)
+in <0x0000f> System.Console:OpenStandardInput ()
+in <0x00285> System.Console:.cctor ()
+--- End of inner exception stack trace ---
+
+in (unmanaged) System.Console:get_Out ()
+in <0x00010> Mono.CSharp.CSharpParser:.ctor
+(Mono.CSharp.SeekableStreamReader,Mono.CSharp.SourceFile,System.Collections.ArrayList)
+in <0x000ee> Mono.CSharp.Driver:parse (Mono.CSharp.SourceFile)
+in <0x0005b> Mono.CSharp.Driver:ProcessFiles ()
+in <0x00472> Mono.CSharp.Driver:MainDriver (string[])
+in <0x00020> Mono.CSharp.Driver:Main (string[])