[Mono-bugs] [Bug 402703] New: StatusBar: various collection bugs

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jun 23 06:16:49 EDT 2008


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


           Summary: StatusBar: various collection bugs
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: andyhume32 at yahoo.co.uk
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


PropertyGrid cannot edit the StatusBarPanelCollection of StatusBar.Panels, for
two reasons:
1) The internal list is lazy-initialized and is not initialized when the first
call is to the IList.CopyTo method, thus NRE.
2) Because CollectionEditor uses IList.Add which accesses the internal list
directly the panel is not initialized (see AddInternal).  Thus a
NullReferenceException occurs at paint in
DrawStatusBarPanel/DrawStatusBarPanelBackground (accessing the panel.Parent
property), see exception below.

Other applications that use those methods will fail too.


Paint exception in 1.9 below.  In current code the problem is hit in
DrawStatusBarPanelBackground.
[[
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object

at System.Windows.Forms.ThemeWin32Classic.DrawStatusBarPanel
(System.Drawing.Graphics,System.Drawing.Rectangle,int,System.Drawing.Brush,System.Windows.Forms.StatusBarPanel)
<0x00188>
at System.Windows.Forms.ThemeWin32Classic.DrawStatusBar
(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.StatusBar)
<0x00f67>
at System.Windows.Forms.StatusBar.Draw
(System.Drawing.Graphics,System.Drawing.Rectangle) <0x000a1>
at System.Windows.Forms.StatusBar.OnPaintInternal
(System.Windows.Forms.PaintEventArgs) <0x000b2>
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message&)
<0x0009b>
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&)
<0x001e2>
at System.Windows.Forms.StatusBar.WndProc (System.Windows.Forms.Message&)
<0x0000d>
at ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x00014>
at ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x00022>
at System.Windows.Forms.NativeWindow.WndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0015c>
at System.Windows.Forms.XplatUIWin32.InternalWndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00046>
at (wrapper native-to-managed)
System.Windows.Forms.XplatUIWin32.InternalWndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00065>
at (wrapper managed-to-native)
System.Windows.Forms.XplatUIWin32.Win32DispatchMessage
(System.Windows.Forms.MSG&) <0x00004>
at System.Windows.Forms.XplatUIWin32.DispatchMessage
(System.Windows.Forms.MSG&) <0x0000a>
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&)
<0x00015>
at System.Windows.Forms.Application.RunLoop
(bool,System.Windows.Forms.ApplicationContext) <0x0099f>
at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext) <0x0004c>
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00022>
at StatusBarIList.Main () <0x00264>
]]


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


More information about the mono-bugs mailing list