[Mono-bugs] [Bug 48376][Wis] New - mcs TypeInitializationException problem introduced in .26

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 10 Sep 2003 20:14:00 -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 clinton_s_olson@yahoo.com.

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

--- shadow/48376	2003-09-10 20:14:00.000000000 -0400
+++ shadow/48376.tmp.9850	2003-09-10 20:14:00.000000000 -0400
@@ -0,0 +1,104 @@
+Bug#: 48376
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: clinton_s_olson@yahoo.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs TypeInitializationException problem introduced in .26
+
+Shown below is a Windows command prompt session that illustrates how mcs is
+not behaving correctly as of version .26 for Windows.  I used the windows
+installer to install mono versions .24, .25, and .26 .  After each install
+I compiled the basic hello.cs code (shown below) and in version .26 the
+compiler fails.
+
+Here is the session:
+
+Microsoft Windows 2000 [Version 5.00.2195]
+(C) Copyright 1985-2000 Microsoft Corp.
+
+C:\>cd sandbox\csharp
+
+C:\sandbox\csharp>mono -V
+Mono JIT compiler version 0.24, (C) 2002, 2003 Ximian, Inc.
+
+C:\sandbox\csharp>type hello.cs
+class MainClass
+{
+        public static void Main()
+        {
+                System.Console.WriteLine("Hello World!");
+        }
+}
+
+
+
+C:\sandbox\csharp>mcs hello.cs
+Compilation succeeded
+
+C:\sandbox\csharp>mono -V
+Mono JIT compiler version 0.25, (C) 2002, 2003 Ximian, Inc.
+
+C:\sandbox\csharp>mcs hello.cs
+Compilation succeeded
+
+C:\sandbox\csharp>mono -V
+Mono JIT compiler version 0.26, (C) 2002, 2003 Ximian, Inc.
+
+C:\sandbox\csharp>mcs hello.cs
+
+Unhandled Exception: System.TypeInitializationException: An exception was
+thrown by the type initializer for System.Guid --->
+System.ArgumentOutOfRangeException: Argument is out of range
+in <0x001e3> 00 System.DateTime:.ctor (bool,long)
+in <0x00015> 00 System.DateTime:.ctor (long)
+in <0x001be> 00 System.CurrentTimeZone:GetDaylightChanges (int)
+in <0x00046> 00 System.TimeZone:IsDaylightSavingTime (System.DateTime)
+in <0x0001e> 00 System.CurrentTimeZone:GetUtcOffset (System.DateTime)
+in <0x00078> 00 System.DateTime:.ctor (bool,long)
+in <0x0003b> 00 System.DateTime:get_Now ()
+in <0x0004e> 00 .GuidState:.ctor (bool)
+in <0x00026> 00 System.Guid:.cctor ()
+--- End of inner exception stack trace ---
+
+in (unmanaged) 00 System.Guid:NewGuid ()
+in <0x00093> 00 System.Reflection.Emit.ModuleBuilder:.ctor
+(System.Reflection.Emit.AssemblyBuilder,string,string,bool,bool,bool)
+in <0x00159> 00 System.Reflection.Emit.AssemblyBuilder:DefineDynamicModule
+(string,string,bool,bool)
+in <0x00021> 00 System.Reflection.Emit.AssemblyBuilder:DefineDynamicModule
+(string,string,bool)
+in <0x000d0> 00 Mono.CSharp.CodeGen:Init (string,string,bool)
+in <0x006be> 00 Mono.CSharp.Driver:MainDriver (string[])
+in <0x0001b> 00 Mono.CSharp.Driver:Main (string[])
+
+
+Steps to reproduce the problem:
+Attempt to compile hello world (code shown above) on windows with mono
+version .26 installed via the windows installer obtained at the mono
+download page
+
+Actual Results:
+Unhandled Exception: System.TypeInitializationException (complete trace
+shown above)
+
+
+Expected Results:
+A successful compile
+
+
+How often does this happen?
+Always with mono .26 on Windows 2000 
+
+
+Additional Information: