[Mono-bugs] [Bug 500917] New: crash on DateTimePicker.Paint event with DateTimePicker.Value.Year >= 9990

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 5 04:37:30 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=500917


           Summary: crash on DateTimePicker.Paint event with
                    DateTimePicker.Value.Year >= 9990
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: smieci100 at go2.pl
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10)
Gecko/2009042316 Firefox/3.0.10 GTB5

if You initialize DateTimePicker with year >= 9990 it will crash when handling
paint event

Reproducible: Always

Steps to Reproduce:
1.put DateTimePicker on a form 
2.initialize it with date >= 9990 year
  public Form1()
  {
    InitializeComponent();
    dateTimePicker1.Value = new DateTime(9990, 1, 1);
  }
3.run
Actual Results:  
exception thrown from function DateTimePicker.CalculateMaxWidth

there is piece of code that adds 10 years to current value of control:

for (int i = 1; i <= 10; i++) {
  text = PartData.GetText (Value.AddYears (i), format);
[...]

result of adding 10 years to year 9990 = exception

Expected Results:  
form should appear with DateTimePicker set to date 9990-1-1

this also happens with date set by binding

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list