[Mono-bugs] [Bug 63363][Min] New - ToString() raises an Exception with format "0.00E+00"

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 18 Aug 2004 16:54:07 -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 agallero@netscape.net.

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

--- shadow/63363	2004-08-18 16:54:07.000000000 -0400
+++ shadow/63363.tmp.27036	2004-08-18 16:54:07.000000000 -0400
@@ -0,0 +1,69 @@
+Bug#: 63363
+Product: Mono: Class Libraries
+Version: unspecified
+OS: SUSE 9.1
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Minor
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: agallero@netscape.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ToString() raises an Exception with format "0.00E+00"
+
+Description of Problem:
+Mono 1.01
+
+When using ToString() to convert a double with formar "0.00E+00" an
+exception thrown.
+
+On the code:
+
+using System;
+
+class Class1
+{
+	static void Main(string[] args)
+	{
+		double i=0;
+		Console.WriteLine(i.ToString("0.00E+00"));
+	}
+}
+
+Will raise an exception. code runs well under .NET framework.
+
+Steps to reproduce the problem:
+1. Compile and run the above code.
+
+Actual Results:
+IndexOutOfRangeException:
+Unhandled Exception: System.IndexOutOfRangeException: Array index is out of
+range.
+in <0x00035> System.Text.StringBuilder:get_Chars (int)
+in <0x00473> System.FloatingPointFormatter:FormatCustomParser
+(System.FloatingPointFormatter/Format,double,System.Globalization.NumberFormatInfo,string)
+in <0x00150> System.FloatingPointFormatter:FormatCustom
+(System.FloatingPointFormatter/Format,double,System.Globalization.NumberFormatInfo,string)
+in <0x00177> System.FloatingPointFormatter:GetStringFrom
+(string,System.Globalization.NumberFormatInfo,double)
+in <0x000a2> System.DoubleFormatter:NumberToString
+(string,System.Globalization.NumberFormatInfo,double)
+in <0x00079> System.Double:ToString (string,System.IFormatProvider)
+in <0x00013> System.Double:ToString (string)
+in <0x0001d> Class1:Main (string[])
+
+
+
+Expected Results:
+0.00E+00
+
+How often does this happen? 
+Always.
+
+Additional Information:
+Locale is english. ToString("0.00") runs fine.