[Mono-bugs] [Bug 79692][Nor] New - GetItemRectangle index out of range.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Oct 18 11:41:22 EDT 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 d+bugzilla at vdr.jp.

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

--- shadow/79692	2006-10-18 11:41:22.000000000 -0400
+++ shadow/79692.tmp.4201	2006-10-18 11:41:22.000000000 -0400
@@ -0,0 +1,136 @@
+Bug#: 79692
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Debian GNU/Linux (unstable)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: d+bugzilla at vdr.jp               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: GetItemRectangle index out of range.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+I got Got GetItemRectangle index out of range,
+2 ListBoxes, 2 Panels and 1 Splitter in TabPage.
+I use Mono 1.1.18 and libgdiplus 1.1.18 in Debian GNU/Linux (unstable).
+
+
+Steps to reproduce the problem:
+1. mcs -r:System.Windows.Forms -r:System.Drawing testcase.cs
+   (testcase.cs is below)
+2. run testcase.exe
+
+
+Actual Results:
+Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of
+range.
+Parameter name: GetItemRectangle index out of range.
+  at System.Windows.Forms.ListBox.GetItemRectangle (Int32 index) [0x00000] 
+  at System.Windows.Forms.ListBox.GetItemDisplayRectangle (Int32 index,
+Int32 first_displayble) [0x00000] 
+  at System.Windows.Forms.ListBox.LastVisibleItem () [0x00000] 
+  at System.Windows.Forms.ListBox.VerticalScrollEvent (System.Object
+sender, System.EventArgs e) [0x00000] 
+  at (wrapper delegate-invoke) System.MulticastDelegate:
+invoke_void_object_EventArgs (object,System.EventArgs)
+  at System.Windows.Forms.ScrollBar.OnValueChanged (System.EventArgs e)
+[0x00000] 
+  at System.Windows.Forms.ScrollBar.SetValue (Int32 value) [0x00000] 
+  at System.Windows.Forms.ScrollBar.UpdatePos (Int32 newPos, Boolean
+update_thumbpos) [0x00000] 
+  at System.Windows.Forms.ScrollBar.set_Maximum (Int32 value) [0x00000] 
+  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ScrollBar:
+set_Maximum (int)
+  at System.Windows.Forms.ListBox.UpdateVerticalScrollBar () [0x00000] 
+  at System.Windows.Forms.ListBox.UpdateScrollBars () [0x00000] 
+  at System.Windows.Forms.ListBox.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 (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:
+SetBounds (int,int,int,int)
+  at System.Windows.Forms.Control.PerformLayout
+(System.Windows.Forms.Control affectedControl, System.String
+affectedProperty) [0x00000] 
+  at System.Windows.Forms.Control.PerformLayout () [0x00000] 
+  at System.Windows.Forms.Control.ResumeLayout (Boolean performLayout)
+[0x00000] 
+  at System.Windows.Forms.Control.ResumeLayout () [0x00000] 
+  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:
+ResumeLayout ()
+  at System.Windows.Forms.Control+ControlCollection.AddRange
+(System.Windows.Forms.Control[] controls) [0x00000] 
+  at MyNameSpace.MyForm..ctor () [0x00000] 
+  at (wrapper remoting-invoke-with-check) MyNameSpace.MyForm:.ctor ()
+  at MyNameSpace.MyForm.Main () [0x00000] 
+
+
+Expected Results:
+2 ListBoxes, 2 Panels and 1 Splitter in TabPage. (Windows does).
+
+
+How often does this happen? 
+Always.
+But depends on rpan.Height and epan.Height's values.
+
+
+Additional Information:
+
+// testcase.cs
+
+namespace MyNameSpace
+{
+  using System;
+  using System.Windows.Forms;
+  using System.Drawing;
+
+  public class MyForm : Form
+  {
+    public MyForm()
+    {
+      TabControl tabl = new TabControl();
+      tabl.Dock = DockStyle.Fill;
+
+      TabPage tabln = new TabPage();
+
+      Panel rpan = new Panel();
+      rpan.Dock = DockStyle.Top;
+      rpan.Height = 18;
+
+      ListBox rlist = new ListBox();
+      rlist.Dock = DockStyle.Top;
+
+      Splitter spln = new Splitter();
+      spln.Dock = DockStyle.Top;
+
+      Panel epan = new Panel();
+      epan.Dock = DockStyle.Top;
+      epan.Height = 18;
+
+      ListBox elist = new ListBox();
+      elist.Dock = DockStyle.Fill;
+
+      tabln.Controls.AddRange( new Control[] { elist, epan, spln, rlist,
+rpan } );
+
+      tabl.Controls.AddRange( new Control[] { tabln } );
+      this.Controls.Add( tabl );
+    }
+
+    public static void Main()
+    {
+      Application.Run(new MyForm());
+    }
+  }
+}


More information about the mono-bugs mailing list