[Bug 31269] System.OverflowException in .NET application using Decimal data type

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Jul 21 05:54:34 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=31269

--- Comment #2 from ElGonzo <elgonzo at gmx.net> 2012-07-21 05:54:34 CDT ---
Created attachment 41085
  --> http://bugs.winehq.org/attachment.cgi?id=41085
Small demo program exhibiting the problem

This is a demo program to demonstrate the problem with the
System.Windows.Forms.NumericUpDown control when running in Wine.
The demo program requires .NET framework 2.0.

The demo program has also been tested on MS Windows with the native .NET
framework, and it does not exhibit a problem there.

The attached ZIP archive contains the documented source code and and executable
built with VS2010.


As i found out, certain very specific conditions have to be met to trigger the
OverflowException:

- NumericUpDown's maximum value must be initially set to decimal.MaxValue.

- NumericUpDown's value must be programmatically set to floating point number
with a fraction, such as 123.456. Integer-like values (such as 123.0) would not
trigger the problem.

- After setting the value of NumericUpDown, change its maximum value to, for
example, 1000.0. This will cause the OverflowException when the program is
executed in Wine.

Note, that if any of these conditions is not fully met, the issue will not be
triggered.


While exploring the bug, i stumbled over another issue with the NumericUpDown
control in Wine, which might be a different bug or just another symptom of the
same bug. Please let me know if you would like me to file this issue as a
separate bug.

One condition of of the bug i was exploring to happen is to set the
NumericUpDown's Maximum property to decimal.MaxValue. Doing so makes the spin
buttons of the control behave erratic, when the NumericUpDown's increment is
set to 0.1. Under these conditions, clicking on the upwards spin button will
set a wrong value of something like 79228162514264337593543950335, instead of
incementing the current value by +0.1.

The same attached demo program exhibits this problem, too.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list