[Mono-bugs] [Bug 54813][Cri] Changed - mcs 0.30.1 crashes mono (I think) in metadata.c

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 24 Feb 2004 19:25:09 -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 diltonm@mccomsoft.com.

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

--- shadow/54813	2004-02-24 18:32:52.000000000 -0500
+++ shadow/54813.tmp.4253	2004-02-24 19:25:09.000000000 -0500
@@ -57,6 +57,63 @@
 
 If there is anything else I can offer to assist in debugging this I'm 
 happy to help.
 
 ------- Additional Comments From diltonm@McCOMSoft.com  2004-02-24 18:32 -------
 This bug happens on Windows using the same Release, 0.30.1
+
+------- Additional Comments From diltonm@McCOMSoft.com  2004-02-24 19:25 -------
+Ok I isolated further and found that the following line was crashing 
+the compiler:
+
+//		private double _dTimerInterval = 1000 * Int32.Parse
+(Utility.GetAppSetting("Time Scaler"));
+
+This worked under previous versions of Mono. I tried changing the 
+line to reference the method GetAppSetting and copied it locally to 
+the class:
+
+		public static string GetAppSetting(string sKey)
+		{
+			string sRet = "";
+
+			lock(typeof(DCWatcher))
+			{
+				if( (sKey == null) || (sKey.Equals
+("")) )
+				{
+					throw new Exception
+("Argument validation exception");
+				}
+
+				try
+				{
+					AppSettingsReader appr = new 
+System.Configuration.AppSettingsReader();
+					sRet = (string)appr.GetValue
+(sKey, typeof(string));
+				}
+				catch(Exception getsetex)
+				{
+					sRet = getsetex.Message;
+				}
+			}
+
+			return sRet;
+		}
+
+This did not work so I tried the following:
+
+//		private double _dTimerInterval = 1000 * Int32.Parse
+(Utility.GetAppSetting("Time Scaler"));
+		private int i = Int32.Parse(GetAppSetting("test"));
+		private double _dTimerInterval = 1000;// * i;
+
+and in the constructor:
+
+			_dTimerInterval *= i;
+
+and now it compiles successfully. It would be great if I don't have 
+to propogate these changes to the rest of the project.
+
+Dilton
+