[Mono-bugs] [Bug 79999][Wis] New - Control allows negative bounds if called in a Resize handler

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Nov 21 14:42:24 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by rolfkvinge at ya.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79999

--- shadow/79999	2006-11-21 14:42:24.000000000 -0500
+++ shadow/79999.tmp.22762	2006-11-21 14:42:24.000000000 -0500
@@ -0,0 +1,143 @@
+Bug#: 79999
+Product: Mono: Class Libraries
+Version: 1.0
+OS: other
+OS Details: Suse & WinXP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: rolfkvinge at ya.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Control allows negative bounds if called in a Resize handler
+
+Run RdlReader.exe, open a report and minimize it.
+
+Result:
+
+Unhandled Exception: System.ArgumentException: Value '-164' must be 
+greater than or equal to 0.
+  at System.Windows.Forms.ScrollBar.set_LargeChange (Int32 value) [0x00000]
+  at (wrapper remoting-invoke-with-check) 
+System.Windows.Forms.ScrollBar:set_LargeChange (int)
+  at fyiReporting.RdlViewer.RdlViewer.SetScrollControlsV () [0x00000]
+  at fyiReporting.RdlViewer.RdlViewer.SetScrollControls () [0x00000]
+  at fyiReporting.RdlViewer.RdlViewer.CalcZoom () [0x00000]
+  at fyiReporting.RdlViewer.RdlViewer.DrawPanelResize (System.Object 
+sender, System.EventArgs e) [0x00000]
+  at (wrapper delegate-invoke) 
+System.MulticastDelegate:invoke_void_object_EventArgs 
+(object,System.EventArgs)
+  at System.Windows.Forms.Control.OnResize (System.EventArgs e) [0x00000]
+  at System.Windows.Forms.Control.OnSizeChanged (System.EventArgs 
+e) [0x00000]
+  at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 
+width, Int32 height, Int32 clientWidth, Int32 clientHeight) [0x00000]
+  at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 
+width, Int32 height) [0x00000]
+  at System.Windows.Forms.Control.SetBoundsCore (Int32 x, Int32 y, Int32 
+width, Int32 height, BoundsSpecified specified) [0x00000]
+  at System.Windows.Forms.Control.SetBounds (Int32 x, Int32 y, Int32 
+width, Int32 height, BoundsSpecified specified) [0x00000]
+  at System.Windows.Forms.Control.set_Height (Int32 value) [0x00000]
+  at (wrapper remoting-invoke-with-check) 
+System.Windows.Forms.Control:set_Height (int)
+  at fyiReporting.RdlViewer.RdlViewer.RdlViewer_Layout (System.Object 
+sender, System.Windows.Forms.LayoutEventArgs e) [0x00000]
+  at (wrapper delegate-invoke) 
+System.MulticastDelegate:invoke_void_object_LayoutEventArgs 
+(object,System.Windows.Forms.LayoutEventArgs)
+  at System.Windows.Forms.Control.OnLayout 
+(System.Windows.Forms.LayoutEventArgs levent) [0x00000]
+  at System.Windows.Forms.Control.PerformLayout 
+(System.Windows.Forms.Control affectedControl, System.String 
+affectedProperty) [0x00000]
+  at System.Windows.Forms.Control.OnResize (System.EventArgs e) [0x00000]
+  at System.Windows.Forms.Control.OnSizeChanged (System.EventArgs 
+e) [0x00000]
+  at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 
+width, Int32 height, Int32 clientWidth, Int32 clientHeight) [0x00000]
+  at System.Windows.Forms.Control.UpdateBounds () [0x00000]
+  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& 
+m) [0x00000]
+  at System.Windows.Forms.Control+ControlNativeWindow.WndProc 
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, 
+IntPtr wParam, IntPtr lParam) [0x00000]
+  at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg 
+message, IntPtr wParam, IntPtr lParam) [0x00000]
+  at System.Windows.Forms.XplatUIX11.SetWindowPos (IntPtr handle, Int32 x, 
+Int32 y, Int32 width, Int32 height) [0x00000]
+  at System.Windows.Forms.XplatUI.SetWindowPos (IntPtr handle, Int32 x, 
+Int32 y, Int32 width, Int32 height) [0x00000]
+  at System.Windows.Forms.Control.SetBoundsCore (Int32 x, Int32 y, Int32 
+width, Int32 height, BoundsSpecified specified) [0x00000]
+  at System.Windows.Forms.Control.SetBounds (Int32 x, Int32 y, Int32 
+width, Int32 height, BoundsSpecified specified) [0x00000]
+  at System.Windows.Forms.Control.SetBounds (Int32 x, Int32 y, Int32 
+width, Int32 height) [0x00000]
+  at System.Windows.Forms.Control.SetImplicitBounds (Int32 x, Int32 y, 
+Int32 width, Int32 height) [0x00000]
+  at (wrapper remoting-invoke-with-check) 
+System.Windows.Forms.Control:SetImplicitBounds (int,int,int,int)
+  at System.Windows.Forms.Control.PerformLayout 
+(System.Windows.Forms.Control affectedControl, System.String 
+affectedProperty) [0x00000]
+  at System.Windows.Forms.Control.OnResize (System.EventArgs e) [0x00000]
+  at System.Windows.Forms.Form.OnResize (System.EventArgs e) [0x00000]
+  at System.Windows.Forms.Control.OnSizeChanged (System.EventArgs 
+e) [0x00000]
+  at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 
+width, Int32 height, Int32 clientWidth, Int32 clientHeight) [0x00000]
+  at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 
+width, Int32 height) [0x00000]
+  at System.Windows.Forms.Control.SetBoundsCore (Int32 x, Int32 y, Int32 
+width, Int32 height, BoundsSpecified specified) [0x00000]
+  at System.Windows.Forms.Form.SetBoundsCore (Int32 x, Int32 y, Int32 
+width, Int32 height, BoundsSpecified specified) [0x00000]
+  at System.Windows.Forms.Control.SetBounds (Int32 x, Int32 y, Int32 
+width, Int32 height, BoundsSpecified specified) [0x00000]
+  at System.Windows.Forms.Control.set_Bounds (Rectangle value) [0x00000]
+  at (wrapper remoting-invoke-with-check) 
+System.Windows.Forms.Control:set_Bounds (System.Drawing.Rectangle)
+  at System.Windows.Forms.MdiClient.ArrangeIconicWindows () [0x00000]
+  at (wrapper remoting-invoke-with-check) 
+System.Windows.Forms.MdiClient:ArrangeIconicWindows ()
+  at System.Windows.Forms.MdiWindowManager.SetWindowState (FormWindowState 
+old_state, FormWindowState window_state) [0x00000]
+  at System.Windows.Forms.Form.set_WindowState (FormWindowState 
+value) [0x00000]
+  at (wrapper remoting-invoke-with-check) 
+System.Windows.Forms.Form:set_WindowState 
+(System.Windows.Forms.FormWindowState)
+  at System.Windows.Forms.InternalWindowManager.MinimizeClicked 
+(System.Object sender, System.EventArgs e) [0x00000]
+  at (wrapper delegate-invoke) 
+System.MulticastDelegate:invoke_void_object_EventArgs 
+(object,System.EventArgs)
+  at System.Windows.Forms.InternalWindowManager.HandleNCLButtonUp 
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.InternalWindowManager.HandleMessage 
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& 
+m) [0x00000]
+  at System.Windows.Forms.Control+ControlNativeWindow.WndProc 
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, 
+IntPtr wParam, IntPtr lParam) [0x00000]
+  at System.Windows.Forms.XplatUIX11.DispatchMessage 
+(System.Windows.Forms.MSG& msg) [0x00000]
+  at System.Windows.Forms.XplatUI.DispatchMessage 
+(System.Windows.Forms.MSG& msg) [0x00000]
+  at System.Windows.Forms.Application.DispatchMessage 
+(System.Windows.Forms.MSG& msg) [0x00000]
+
+
+The problem is that Control's PerformLayout (which changes negative bounds 
+to 0) won't do anything when called recursively, which is the case when 
+it's size is changed in a Resize handler.


More information about the mono-bugs mailing list