"Input string was not in a correct format" - probably the most duplicate question here on Stack Overflow.
Having a Windows Forms application that is installed on serveral 10,000 PCs worldwide, I never saw this error until yesterday.
One single user recently reported the "Input string was not in a correct format" error. He is running Windows 7 and .NET 4.
What confuses me is the stack trace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
This is the whole stack trace.
I.e. the exception seems to not originate in any of my own code.
My question:
Can anyone explain a possible program flow of my code that causes the above stack trace? (which does not show any of my code).
I'm still really confused how this might be possible at all.
Additional question:
Any idea about a possible reason for this error? Or how to get the real root cause for the error?
I can think of remote debugging but it seems like an overkill to me.
Update 1:
The user has a German culture ("de-DE
") just like most of our customers and just like I have, too.