Linux X11 Error (BadMatch)
See original GitHub issueHi,
I’ve installed MatterControl 2.0 on a fresh installed Linux Mint 20. The application doesn’t start and complain about an X11 error.
I’m using Nvidia drivers and the screen is using the default visual (TrueColor, 24-bits).
Here is the stack trace :
X11 Error encountered:
Error: BadMatch (invalid parameter attributes)
Request: 151 (5)
Resource ID: 0x4600014
Serial: 262
Hwnd: Hwnd, Mapped:False ClientWindow:0x4600014, WholeWindow:0x4600013, Zombie=False, Parent:[Hwnd, Mapped:False ClientWindow:0x4600012, WholeWindow:0x4600011, Zombie=False, Parent:[<null>]]
Control: 0 at System.Environment.get_StackTrace () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Windows.Forms.XplatUIX11.HandleError (System.IntPtr display, System.Windows.Forms.XErrorEvent& error_event) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr , System.IntPtr , System.IntPtr ) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr display, System.IntPtr drawable, OpenTK.ContextHandle context) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Platform.X11.X11GLContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Graphics.GraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.GLControl.MakeCurrent () [0x00000] in <33e0a290e5404e8e8877ff9c93b1ec2f>:0
at OpenTK.GLControl.OnHandleCreated (System.EventArgs e) [0x00000] in <33e0a290e5404e8e8877ff9c93b1ec2f>:0
at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.UserControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUIX11.SendMessage (System.IntPtr hwnd, System.Windows.Forms.Msg message, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUIX11.CreateWindow (System.Windows.Forms.CreateParams cp) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams cp) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams cp) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control.CreateHandle () [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control.CreateControl () [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control.CreateControl () [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control.SetVisibleCore (System.Boolean value) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Form.SetVisibleCore (System.Boolean value) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at MatterHackers.Agg.UI.WinformsSystemWindow.SetVisibleCore (System.Boolean value) [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at System.Windows.Forms.Control.set_Visible (System.Boolean value) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control.Show () [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at MatterHackers.Agg.UI.WinformsSystemWindow.Show () [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at MatterHackers.Agg.UI.WinformsSystemWindow.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at MatterHackers.Agg.UI.SingleWindowProvider.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <49bb6fd6740f4762a381356153fe2e02>:0
at MatterHackers.MatterControl.WinformsSingleWindowProvider.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <16b4831ddba24ef8b2ca5ca9a43af3cd>:0
at MatterHackers.Agg.UI.SystemWindow.ShowAsSystemWindow () [0x00000] in <a5c2db3666d84398b1090e2f2dfee474>:0
at MatterHackers.MatterControl.Program.Main (System.String[] args) [0x00000] in <e58f04b6857344df9781155f8ee2c0c8>:0
Time to '': 800
X11 Error encountered:
Error: BadMatch (invalid parameter attributes)
Request: 151 (5)
Resource ID: 0x4600014
Serial: 353
Hwnd: Hwnd, Mapped:True ClientWindow:0x4600014, WholeWindow:0x4600013, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x4600012, WholeWindow:0x4600011, Zombie=False, Parent:[<null>]]
Control: 0 at System.Environment.get_StackTrace () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Windows.Forms.XplatUIX11.HandleError (System.IntPtr display, System.Windows.Forms.XErrorEvent& error_event) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr , System.IntPtr , System.IntPtr ) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr display, System.IntPtr drawable, OpenTK.ContextHandle context) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Platform.X11.X11GLContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Graphics.GraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.GLControl.MakeCurrent () [0x00000] in <33e0a290e5404e8e8877ff9c93b1ec2f>:0
at MatterHackers.Agg.UI.AggGLControl.MakeCurrent () [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at MatterHackers.Agg.UI.OpenGLSystemWindow.OnPaint (System.Windows.Forms.PaintEventArgs paintEventArgs) [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Application.RunLoop (System.Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at MatterHackers.Agg.UI.WinformsSystemWindow.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at MatterHackers.Agg.UI.SingleWindowProvider.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <49bb6fd6740f4762a381356153fe2e02>:0
at MatterHackers.MatterControl.WinformsSingleWindowProvider.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <16b4831ddba24ef8b2ca5ca9a43af3cd>:0
at MatterHackers.Agg.UI.SystemWindow.ShowAsSystemWindow () [0x00000] in <a5c2db3666d84398b1090e2f2dfee474>:0
at MatterHackers.MatterControl.Program.Main (System.String[] args) [0x00000] in <e58f04b6857344df9781155f8ee2c0c8>:0
X11 Error encountered:
Error: BadMatch (invalid parameter attributes)
Request: 151 (5)
Resource ID: 0x4600014
Serial: 360
Hwnd: Hwnd, Mapped:False ClientWindow:0x4600014, WholeWindow:0x4600013, Zombie=False, Parent:[Hwnd, Mapped:False ClientWindow:0x4600012, WholeWindow:0x4600011, Zombie=False, Parent:[<null>]]
Control: 0 at System.Environment.get_StackTrace () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Windows.Forms.XplatUIX11.HandleError (System.IntPtr display, System.Windows.Forms.XErrorEvent& error_event) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr , System.IntPtr , System.IntPtr ) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr display, System.IntPtr drawable, OpenTK.ContextHandle context) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Platform.X11.X11GLContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.Graphics.GraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <d85857bc66524258b04ff0bdaeed67db>:0
at OpenTK.GLControl.MakeCurrent () [0x00000] in <33e0a290e5404e8e8877ff9c93b1ec2f>:0
at MatterHackers.Agg.UI.AggGLControl.MakeCurrent () [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at MatterHackers.Agg.UI.OpenGLSystemWindow.OnClosed (System.EventArgs e) [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at System.Windows.Forms.Form.FireClosedEvents (System.Windows.Forms.CloseReason reason) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Form.RaiseCloseEvents (System.Boolean last_check, System.Boolean cancel) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Form.WmClose (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUIX11.SendMessage (System.IntPtr hwnd, System.Windows.Forms.Msg message, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUI.SendMessage (System.IntPtr handle, System.Windows.Forms.Msg message, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Form.Close () [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at MatterHackers.Agg.UI.WinformsSystemWindow.CloseSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at MatterHackers.Agg.UI.SingleWindowProvider.CloseSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <49bb6fd6740f4762a381356153fe2e02>:0
at MatterHackers.Agg.UI.SystemWindow.OnClosed (System.EventArgs e) [0x00000] in <a5c2db3666d84398b1090e2f2dfee474>:0
at MatterHackers.MatterControl.RootSystemWindow.OnClosed (System.EventArgs e) [0x00000] in <49bb6fd6740f4762a381356153fe2e02>:0
at MatterHackers.Agg.UI.GuiWidget.Close () [0x00000] in <a5c2db3666d84398b1090e2f2dfee474>:0
at MatterHackers.Agg.UI.GuiWidget.<CloseOnIdle>b__391_0 () [0x00000] in <a5c2db3666d84398b1090e2f2dfee474>:0
at MatterHackers.Agg.UI.UiThread.InvokePendingActions () [0x00000] in <a5c2db3666d84398b1090e2f2dfee474>:0
at System.Reflection.RuntimeMethodInfo.InternalInvoke (System.Reflection.RuntimeMethodInfo , System.Object , System.Object[] , System.Exception& ) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Windows.Forms.XplatUIDriverSupport.ExecutionCallback (System.Windows.Forms.AsyncMethodData data) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUIDriverSupport.ExecutionCallbackInContext (System.Object state) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Windows.Forms.XplatUIDriverSupport.ExecuteClientMessage (System.Runtime.InteropServices.GCHandle gchandle) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, System.IntPtr handle, System.Int32 wFilterMin, System.Int32 wFilterMax) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, System.IntPtr hWnd, System.Int32 wFilterMin, System.Int32 wFilterMax) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Application.RunLoop (System.Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0
at MatterHackers.Agg.UI.WinformsSystemWindow.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <712ffdb4c0144e8c88c0ce33a0b20977>:0
at MatterHackers.Agg.UI.SingleWindowProvider.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <49bb6fd6740f4762a381356153fe2e02>:0
at MatterHackers.MatterControl.WinformsSingleWindowProvider.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00000] in <16b4831ddba24ef8b2ca5ca9a43af3cd>:0
at MatterHackers.Agg.UI.SystemWindow.ShowAsSystemWindow () [0x00000] in <a5c2db3666d84398b1090e2f2dfee474>:0
at MatterHackers.MatterControl.Program.Main (System.String[] args) [0x00000] in <e58f04b6857344df9781155f8ee2c0c8>:0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
x11 xGetImage BadMatch Error
BadMatch - Some argument or pair of arguments has the correct type and range but fails to match in some other way required...
Read more >BadMatch error in hello world example on X11 · Issue #2661
BadMatch error in hello world example on X11 #2661 ... I'm on Ubuntu 20.04.5 with X11 on an ancient Thinkpad.
Read more >x11vnc throws "X Error of failed request: BadMatch" after ...
x11vnc throws "X Error of failed request: BadMatch" after upgrade from 17.04 · What is the result of echo $XDG_SESSION_TYPE on both machines?...
Read more >[Solved] Can't add custom resolution to my system (X Error
Whenever I try to add a new mode I get an error, here how I'm doing it: ... "1440x1080_144.00" X Error of failed...
Read more >xrandr error BadMatch (invalid parameter attributes) ...
xrandr error BadMatch (invalid parameter attributes) [SOLVED] ... to your xorg.conf file at the monitor section and then reboot, it will give you ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can edit /usr/lib/mattercontrol/appsettings.json to override this bug. Application crashes while ‘Color’ and ‘Depth’ parameters has different values. I set this values to ‘24’, and program works fine.
This bug is very pesky. Win10 version working on WINE, fairly stable.