[Mono-list] RE: [Mono-devel-list] mcs 0.26 fails on Windows
Varga Zoltan
vargaz@freemail.hu
Sat, 20 Sep 2003 06:23:53 +0200 (CEST)
--0-1804289383-1064031833=:74897
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-2
Content-Transfer-Encoding: QUOTED-PRINTABLE
Hi,
Here is a patch to icall.c which fixes this problem:
Could somebody check this in ? I don't have CVS access right
now.
It might also be a good idea to do a new windows release
with only
this fix, given the number of people who are experiencing
this problem.
bye
Zoltan
<<<<<<<<<<<<<<<<<
Daniel Morgan <danielmorgan@verizon.net> =EDrta:
> MessageI have to agree with Paul, I get the same problem
when trying to run
> mcs on a Windows 2000 Professional machine.
> -----Original Message-----
> From: mono-devel-list-admin@lists.ximian.com
> [mailto:mono-devel-list-admin@lists.ximian.com]On Behalf
Of Paul Paximadis
> Sent: Monday, September 15, 2003 5:45 AM
> To: mono-devel-list@lists.ximian.com; mono-list@ximian.com
> Subject: [Mono-devel-list] mcs 0.26 fails on Windows
>=20
>=20
> Hi,
>=20
> I installed mono-0.26-win32-2.exe on a Windows 2000
Professional machine.
> When I try and compile a simple "Hello World" app. I get
the errors below:
> This works fine with 'mono-0.25-win32-1.exe'.
>=20
> I have also compiled a simple gtk-sharp program (
compiles fine with
> 0.25 ) but when I try and execute with 'mono Hello.exe'
windows generates a
> unhadled exception etc.., yet I can run the program fine
with Microst.
> Any ideas.
>=20
> Any help would be appreciated.
>=20
> Thanks,
> Paul
>=20
>=20
> C:\C#Samples>mcs Hello.cs
>=20
> 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 ---
>=20
> in (unmanaged) 00 System.Guid:NewGuid ()
> in <0x00093> 00 System.Reflection.Emit.ModuleBuilder:.ctor
> (System.Reflection.Em
> it.AssemblyBuilder,string,string,bool,bool,bool)
> in <0x00159> 00
System.Reflection.Emit.AssemblyBuilder:DefineDynamicModule
> (stri
> ng,string,bool,bool)
> in <0x00021> 00
System.Reflection.Emit.AssemblyBuilder:DefineDynamicModule
> (stri
> ng,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[])
>=20
--0-1804289383-1064031833=:74897
Content-Type: APPLICATION/octet-stream; name=diff
Content-Disposition: attachment; filename=diff
--- icall.c.orig 2003-09-20 06:17:12.844027200 +
+++ icall.c 2003-09-20 06:21:05.037905600 +0200
@@ -3123,7 +3123,8 @@
TIME_ZONE_INFORMATION tz_info;
FILETIME ft;
int i;
-
+ int err;
+
GetTimeZoneInformation (&tz_info);
MONO_CHECK_ARG_NULL (data);
@@ -3141,9 +3142,13 @@
break;
mono_array_set ((*names), gpointer, 0, mono_string_new_utf16 (domain, tz_info.StandardName, i));
- SystemTimeToFileTime (&tz_info.StandardDate, &ft);
+ tz_info.StandardDate.wYear = year;
+ err = SystemTimeToFileTime (&tz_info.StandardDate, &ft);
+ g_assert (err);
mono_array_set ((*data), gint64, 1, ((guint64)ft.dwHighDateTime<<32) | ft.dwLowDateTime);
- SystemTimeToFileTime (&tz_info.DaylightDate, &ft);
+ tz_info.DaylightDate.wYear = year;
+ err = SystemTimeToFileTime (&tz_info.DaylightDate, &ft);
+ g_assert (err);
mono_array_set ((*data), gint64, 0, ((guint64)ft.dwHighDateTime<<32) | ft.dwLowDateTime);
mono_array_set ((*data), gint64, 3, tz_info.Bias + tz_info.StandardBias);
mono_array_set ((*data), gint64, 2, tz_info.Bias + tz_info.DaylightBias);
--0-1804289383-1064031833=:74897--