[Mono-bugs] [Bug 420305] New: [REGRESSION] NRE in ErrorProvider. SetIcon* when Control not parented and ContainerControl set

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Aug 26 05:29:54 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=420305


           Summary: [REGRESSION] NRE in ErrorProvider.SetIcon* when Control
                    not parented and ContainerControl set
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=235428)
 --> (https://bugzilla.novell.com/attachment.cgi?id=235428)
Repro -- ErrorProviderThree.cs

A new NRE in ErrorProvider whilst configuring when the extended-control isn't
parented and ContainerControl set.  This case is new since 1.9, a result of bug
368587 fix.  We need to guard against null control.Parent in all cases.

Occurs on HEAD and 2.0 branch ((in my case HEAD tested on Linux and branch on
WinXP)).

This exception occurs from the attached repro.
[[
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
 at System.Windows.Forms.ErrorProvider+ErrorProperty..ctor
(System.Windows.Forms.ErrorProvider ep, System.Windows.Forms.Control control)
[0x00182] in
D:\cygwin\usr\src\mono\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ErrorProvider.cs:96 
 at System.Windows.Forms.ErrorProvider.GetErrorProperty
(System.Windows.Forms.Control control) [0x00018] in
D:\cygwin\usr\src\mono\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ErrorProvider.cs:573 
 at System.Windows.Forms.ErrorProvider.SetIconAlignment
(System.Windows.Forms.Control control, ErrorIconAlignment value) [0x00000] in
D:\cygwin\usr\src\mono\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ErrorProvider.cs:541 
 at (wrapper remoting-invoke-with-check)
System.Windows.Forms.ErrorProvider:SetIconAlignment
(System.Windows.Forms.Control,System.Windows.Forms.ErrorIconAlignment)
 at ErrorProviderNotAddSetCC..ctor () [0x00019] in d:\Documents and
Settings\alan\My
Documents\Suppliers\Mono\WinForms\ErrorProvider\ErrorProviderThree.cs:19 
 at (wrapper remoting-invoke-with-check) ErrorProviderNotAddSetCC:.ctor ()
 at ErrorProviderNotAddSetCC.Main (System.String[] args) [0x00000] in
d:\Documents and Settings\alan\My
Documents\Suppliers\Mono\WinForms\ErrorProvider\ErrorProviderThree.cs:1 
]]


-- 
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