D
Dave Farquharson
I am using Convert::ToInt32 to convert a string to an integer. On some small
number of machines this is causing a System.FormatException. After chucking
the problem at Google I found some promising info on a very strange registry
problem --
HKEY_CURRENT_USER | Control Panel | International | sPositiveSign
can become corrupted in such a way that certain strings can generate this
exception. For instance, if sPositiveSign is "0" then a ToInt32("0") will
throw. I can cause the symptoms my small set of machines see by forcing my
own to "0".
All weird, but well and good, except the machines in question do not have
anything unusual in sPositiveSign. Normally in the US this registry entry is
blank, and it is in fact blank on the machines in question.
So, anyone know of any other reason this could blow up? I log what the code
thinks is bad data and it is in fact ToInt32("0") that is dying for whatever
reason. This is .net 2.0.
Very odd.
-dave
number of machines this is causing a System.FormatException. After chucking
the problem at Google I found some promising info on a very strange registry
problem --
HKEY_CURRENT_USER | Control Panel | International | sPositiveSign
can become corrupted in such a way that certain strings can generate this
exception. For instance, if sPositiveSign is "0" then a ToInt32("0") will
throw. I can cause the symptoms my small set of machines see by forcing my
own to "0".
All weird, but well and good, except the machines in question do not have
anything unusual in sPositiveSign. Normally in the US this registry entry is
blank, and it is in fact blank on the machines in question.
So, anyone know of any other reason this could blow up? I log what the code
thinks is bad data and it is in fact ToInt32("0") that is dying for whatever
reason. This is .net 2.0.
Very odd.
-dave