[Mono-bugs] [Bug 437417] New: windows.forms.errorprovider error on parent change

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 21 13:19:36 EDT 2008


           Summary: windows.forms.errorprovider error on parent change
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: floseflose at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Description of Problem:

We found a bug in the windows.forms.errorprovider control in Mono 2.0.

The program crashes when you set the errorprovider for a control and then
change the control's parent. It doesn't matter whether the errorprovider is
still set for that control or not.

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at ErrorProperty.control_ParentChanged (object,System.EventArgs) [0x0002b]
at System.Windows.Forms.Control.OnParentChanged (System.EventArgs) [0x0001c]
at System.Windows.Forms.Control.ChangeParent (System.Windows.Forms.Control)
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control.ChangeParent (System.Windows.Forms.Control)
at ControlCollection.Remove (System.Windows.Forms.Control) [0x00055]
at ControlCollection.Add (System.Windows.Forms.Control) [0x00153]
at System.Windows.Forms.Control.set_Parent (System.Windows.Forms.Control)
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control.set_Parent(System.Windows.Forms.Control) <0x00041>
at errorp.Form1.button1_Click (object,System.EventArgs) <0x00031>
at System.Windows.Forms.Control.OnClick (System.EventArgs) [0x0001c]
at System.Windows.Forms.Button.OnClick (System.EventArgs) [0x00024]

Steps to reproduce the problem:
1. create a windows form with a textbox inside a panel, a button and an
2. code for button click:
        private void button1_Click(object sender, EventArgs e)
            errorProvider1.SetError(textBox1, "");
            textBox1.Parent = this ;
3. when running the program and clicking the button, the program crashes with
the error "Object reference not set to an instance of an object"(see above)

How often does this happen? 

Additional Information:
This error was not there in earlier mono versions.

Configure bugmail: https://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