[Mono-bugs] [Bug 331144] New: ComboBox: X11 error changing DropDownStyle

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 5 11:46:21 EDT 2007


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

           Summary: ComboBox: X11 error changing DropDownStyle
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: gert.driesen at pandora.be
         QAContact: mono-bugs at ximian.com
          Found By: ---


When changing the DropDownStyle of a created ComboBox from Simple to DropDown,
the following X11 error is reported:

X11 Error encountered: 
  Error: BadMatch (invalid parameter attributes)
  Request:     12 (0)
  Resource ID: 0x2A00016
  Serial:      390
  Hwnd:        Hwnd, Mapped:True ClientWindow:0x2A00017, WholeWindow:0x2A00016,
Zombie=True, Parent:[<null>]
  Control:     <handle 44040215 non-existant>   at
System.Environment.get_StackTrace()
   at System.Windows.Forms.XplatUIX11.HandleError(IntPtr display, XErrorEvent
ByRef error_event)
   at System.Windows.Forms.XplatUIX11.HandleError(IntPtr , XErrorEvent ByRef )
   at System.Drawing.GDIPlus.GdipCreateFromXDrawable_linux(IntPtr , IntPtr ,
IntPtr ByRef )
   at System.Drawing.GDIPlus.GdipCreateFromXDrawable_linux(IntPtr , IntPtr ,
IntPtr ByRef )
   at System.Drawing.Graphics.FromXDrawable(IntPtr drawable, IntPtr display)
   at System.Drawing.Graphics.FromHwnd(IntPtr hwnd)
   at System.Windows.Forms.Control.CreateGraphics()
   at System.Windows.Forms.TextBoxBase.CreateGraphicsInternal()
   at System.Windows.Forms.TextBoxBase.CalculateDocument()
   at System.Windows.Forms.TextBoxBase.TextBoxBase_SizeChanged(System.Object
sender, System.EventArgs e)
   at System.Windows.Forms.Control.OnSizeChanged(System.EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width,
Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmWindowPosChanged(Message ByRef m)
   at System.Windows.Forms.Control.WndProc(Message ByRef m)
   at System.Windows.Forms.TextBoxBase.WndProc(Message ByRef m)
   at System.Windows.Forms.TextBox.WndProc(Message ByRef m)
   at System.Windows.Forms.Control+ControlWindowTarget.OnMessage(Message ByRef
m)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(Message ByRef m)
   at System.Windows.Forms.NativeWindow.WndProc(IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam)
   at System.Windows.Forms.XplatUIX11.SendMessage(IntPtr hwnd, Msg message,
IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.XplatUIX11.SetWindowPos(IntPtr handle, Int32 x,
Int32 y, Int32 width, Int32 height)
   at System.Windows.Forms.XplatUI.SetWindowPos(IntPtr handle, Int32 x, Int32
y, Int32 width, Int32 height)
   at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width,
Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.TextBoxBase.SetBoundsCore(Int32 x, Int32 y, Int32
width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.SetBounds(Int32 x, Int32 y, Int32 width,
Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.set_Width(Int32 value)
   at System.Windows.Forms.ComboBox.LayoutComboBox()
   at System.Windows.Forms.ComboBox.set_DropDownStyle(ComboBoxStyle value)
   at Program.Main()

To reproduce, compile and run the following code snippet:

using System;
using System.Windows.Forms;

class Program
{
        [STAThread]
        static void Main ()
        {
                ComboBox comboBox = new ComboBox ();
                comboBox.Items.Add ("abc");

                Form form = new Form ();
                form.Controls.Add (comboBox);
                form.Show ();

                comboBox.DropDownStyle = ComboBoxStyle.Simple;
                comboBox.DropDownStyle = ComboBoxStyle.DropDown;

                form.Dispose ();
        }
}

I've also added this as a (NotWorking) unit test to ComboBoxTest.cs. Please
enable this test once a fix is available.


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