[Mono-devel-list] NumberFormatter problem with mono-api-info.exe

Sebastien Pouliot sebastien at ximian.com
Mon Jan 31 15:58:47 EST 2005


Hello,

The mono-api-info tool seems to have a problem with the new
NumberFormatter class.

This seems to affect both the NET_1_1 profile
http://mono.ximian.com:8008/amd64-head-mono/events/863/log
and the NET_2_0 profile
http://mono.ximian.com:8008/intel-head-mono/events/971/log


The two errors seems identical but the first is most useful as it
includes the line numbers:

Unhandled Exception: System.ArgumentException: An invalid argument was
specified.
in [0x00262] SingleStore:.ctor (single)
in [0x00001] (at /home/builder/HEAD/mcs/class/corlib/System/NumberFormatter.cs:1118) NumberStore:CreateInstance (single)
in [0x00002] (at /home/builder/HEAD/mcs/class/corlib/System/NumberFormatter.cs:55) System.NumberFormatter:NumberToString (string,single,System.Globalization.NumberFormatInfo)
in [0x00015] (at /home/builder/HEAD/mcs/class/corlib/System/NumberFormatter.cs:1864) System.FloatingPointFormatter:GetStringFrom (string,System.Globalization.NumberFormatInfo,single)
in [0x00046] (at /home/builder/HEAD/mcs/class/corlib/System/SingleFormatter.cs:54) System.SingleFormatter:NumberToString (string,System.Globalization.NumberFormatInfo,single)
in [0x0001d] (at /home/builder/HEAD/mcs/class/corlib/System/Single.cs:222) System.Single:ToString (string,System.IFormatProvider)
in [0x00003] (at /home/builder/HEAD/mcs/class/corlib/System/Single.cs:210) System.Single:ToString (System.IFormatProvider)
in [0x00012] (at /home/builder/HEAD/mcs/class/corlib/System/Convert.cs:1877) System.Convert:ToString (object,System.IFormatProvider)
in [0x00067] (at /home/builder/HEAD/mcs/tools/corcompare/mono-api-info.cs:557) Mono.AssemblyInfo.FieldData:AddExtraData (System.Xml.XmlNode,System.Reflection.MemberInfo)
in [0x00096] (at /home/builder/HEAD/mcs/tools/corcompare/mono-api-info.cs:212) Mono.AssemblyInfo.MemberData:DoOutput ()
in [0x00364] (at /home/builder/HEAD/mcs/tools/corcompare/mono-api-info.cs:345) Mono.AssemblyInfo.TypeData:DoOutput ()
in [0x001e2] (at /home/builder/HEAD/mcs/tools/corcompare/mono-api-info.cs:182) Mono.AssemblyInfo.AssemblyData:DoOutput ()
in [0x00067] (at /home/builder/HEAD/mcs/tools/corcompare/mono-api-info.cs:76) Mono.AssemblyInfo.AssemblyCollection:DoOutput ()
in [0x00048] (at /home/builder/HEAD/mcs/tools/corcompare/mono-api-info.cs:37) Mono.AssemblyInfo.Driver:Main (string[])


The error probably comes from:

	if (float.IsNaN (value) || float.IsInfinity (value))
		throw new ArgumentException ();

Maybe there should be a string representation for NaN or Infinity ?

-- 
Sebastien Pouliot  <sebastien at ximian.com>
blog: http://pages.infinit.net/ctech/poupou.html




More information about the Mono-devel-list mailing list