MatterHackers / MatterControl

3D printing software for Windows, Mac and Linux
http://www.mattercontrol.com/
BSD 2-Clause "Simplified" License
456 stars 183 forks source link

X11 Error: BadMatch (invalid parameter attributes) (crash) #4682

Open jakimfett opened 4 years ago

jakimfett commented 4 years ago

Bug Report

Steps to Reproduce

  1. Upgrade to v2.19.10 on Elementary OS v5.0 Juno.
  2. (Attempt to) Start software with application tile, 2b. Start software from command line. 2c. Momentary processing, some gtk/mono whinging.
  3. X11 Error: BadMatch, crash with exit code 1.

Expected Behavior Program v2.x and above loads and I can configure my 3d printer.

Actual Behavior Program installed from v2.x debfile crashes without displaying MatterControl window.

MatterControl Build Number Installed via dpkg -i ./MatterControlSetup-2.19.10.10370.deb, so assuming it's 10370?

Operating System Version Elementary OS 5.0 Juno

Printer Make/Model Robo3D R1+.

Console Log

user@system >$ sudo dpkg -i ./MatterControlSetup-2.19.10.10370.deb 
[sudo] password for jakimfett:                            
Selecting previously unselected package mattercontrol.
(Reading database ... 266221 files and directories currently installed.)
Preparing to unpack .../MatterControlSetup-2.19.10.10370.deb ...
Unpacking mattercontrol (2.19.10.10367) ...
Setting up mattercontrol (2.19.10.10367) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2+elementary2~ubuntu5.0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.60ubuntu1) ...

user@system >$ mattercontrol --version
Could not get XIM
Gtk-Message: 14:11:28.483: Failed to load module "pantheon-filechooser-module"

(mono:31518): Gtk-WARNING **: 14:11:28.498: Unable to locate theme engine in module_path: "pixmap",

(mono:31518): Gtk-WARNING **: 14:11:28.498: Unable to locate theme engine in module_path: "pixmap",

(mono:31518): Gtk-WARNING **: 14:11:28.498: Unable to locate theme engine in module_path: "pixmap",

(mono:31518): Gtk-WARNING **: 14:11:28.499: Unable to locate theme engine in module_path: "pixmap",
X11 Error encountered: 
  Error: BadMatch (invalid parameter attributes)
  Request:     154 (5)
  Resource ID: 0x7200014
  Serial:      264
  Hwnd:        Hwnd, Mapped:False ClientWindow:0x7200014, WholeWindow:0x7200013, Zombie=False, Parent:[Hwnd, Mapped:False ClientWindow:0x7200012, WholeWindow:0x7200011, Zombie=False, Parent:[<null>]]
  Control:     0  at System.Environment.get_StackTrace () [0x00000] in <285579f54af44a2ca048dad6be20e190>:0 
  at System.Windows.Forms.XplatUIX11.HandleError (System.IntPtr display, System.Windows.Forms.XErrorEvent& error_event) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>: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 <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.UserControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.XplatUIX11.SendMessage (System.IntPtr hwnd, System.Windows.Forms.Msg message, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.XplatUIX11.CreateWindow (System.Windows.Forms.CreateParams cp) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams cp) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams cp) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.CreateHandle () [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.CreateControl () [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.CreateControl () [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.SetVisibleCore (System.Boolean value) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Form.SetVisibleCore (System.Boolean value) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>: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 <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.Show () [0x00000] in <7346aaf818a24e898fc55461ebf690ad>: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 

exception inside UnhandledException handler: (null) assembly:/usr/lib/mono/4.5/mscorlib.dll type:FileNotFoundException member:(null)

[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
  at Mindscape.Raygun4Net.RaygunMessageBuilder.SetEnvironmentDetails () [0x0000b] in <f91f2b249ee243acbec1dd6bfd729d19>:0 
  at Mindscape.Raygun4Net.RaygunClient.BuildMessage (System.Exception exception, System.Collections.Generic.IList`1[T] tags, System.Collections.IDictionary userCustomData, Mindscape.Raygun4Net.Messages.RaygunIdentifierMessage userInfoMessage, System.Nullable`1[T] currentTime) [0x00024] in <f91f2b249ee243acbec1dd6bfd729d19>:0 
  at Mindscape.Raygun4Net.RaygunClient.StripAndSend (System.Exception exception, System.Collections.Generic.IList`1[T] tags, System.Collections.IDictionary userCustomData, Mindscape.Raygun4Net.Messages.RaygunIdentifierMessage userInfo, System.Nullable`1[T] currentTime) [0x00016] in <f91f2b249ee243acbec1dd6bfd729d19>:0 
  at Mindscape.Raygun4Net.RaygunClient.Send (System.Exception exception, System.Collections.Generic.IList`1[T] tags, System.Collections.IDictionary userCustomData, Mindscape.Raygun4Net.Messages.RaygunIdentifierMessage userInfo) [0x00023] in <f91f2b249ee243acbec1dd6bfd729d19>:0 
  at Mindscape.Raygun4Net.RaygunClient.Send (System.Exception exception) [0x00000] in <f91f2b249ee243acbec1dd6bfd729d19>:0 
  at MatterHackers.MatterControl.Program+<>c.<Main>b__6_2 (System.Object s, System.Threading.ThreadExceptionEventArgs e) [0x0001c] in <e58f04b6857344df9781155f8ee2c0c8>:0 
  at System.Windows.Forms.Application.OnThreadException (System.Exception t) [0x00037] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.NativeWindow.OnThreadException (System.Exception e) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00196] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.XplatUIX11.SendMessage (System.IntPtr hwnd, System.Windows.Forms.Msg message, System.IntPtr wParam, System.IntPtr lParam) [0x000d5] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.XplatUIX11.CreateWindow (System.Windows.Forms.CreateParams cp) [0x004e5] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams cp) [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams cp) [0x00009] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.CreateHandle () [0x00031] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.CreateControl () [0x00039] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.CreateControl()
  at System.Windows.Forms.Control.CreateControl () [0x00072] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.SetVisibleCore (System.Boolean value) [0x00057] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Form.SetVisibleCore (System.Boolean value) [0x00065] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at MatterHackers.Agg.UI.WinformsSystemWindow.SetVisibleCore (System.Boolean value) [0x00009] in <712ffdb4c0144e8c88c0ce33a0b20977>:0 
  at System.Windows.Forms.Control.set_Visible (System.Boolean value) [0x00009] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at System.Windows.Forms.Control.Show () [0x00000] in <7346aaf818a24e898fc55461ebf690ad>:0 
  at MatterHackers.Agg.UI.WinformsSystemWindow.Show () [0x000f8] in <712ffdb4c0144e8c88c0ce33a0b20977>:0 
  at MatterHackers.Agg.UI.WinformsSystemWindow.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00060] in <712ffdb4c0144e8c88c0ce33a0b20977>:0 
  at MatterHackers.Agg.UI.SingleWindowProvider.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00373] in <49bb6fd6740f4762a381356153fe2e02>:0 
  at MatterHackers.MatterControl.WinformsSingleWindowProvider.ShowSystemWindow (MatterHackers.Agg.UI.SystemWindow systemWindow) [0x00031] in <16b4831ddba24ef8b2ca5ca9a43af3cd>:0 
  at MatterHackers.Agg.UI.SystemWindow.ShowAsSystemWindow () [0x0002b] in <a5c2db3666d84398b1090e2f2dfee474>:0 
  at MatterHackers.MatterControl.Program.Main (System.String[] args) [0x0037f] in <e58f04b6857344df9781155f8ee2c0c8>:0 

user@system >$ echo $?
1
didli commented 4 years ago

Same here with Fedora 31 xfce x64. Installed from unzipped .deb. Same errors.

jakimfett commented 4 years ago

I'll go ahead and try to compile on my system once I finish repairing my printer's hotend connector, but I'd really much rather use the official pre-packaged version.

(...how do I get the latest build from https://travis-ci.org/MatterHackers/MatterControl ? )

Is there some specific version of Mono that needs to be installed?
Just by scanning the logfile, it looks like MatterControl is looking for "Microsoft.VisualBasic", which on 'Nix is going to be the mono package, right?

I've got version 6.6.0.161 installed, and I'm using the .deb file downloaded from the MatterHackers store page.

jakimfett@obsidian:~/Downloads$ which mono
/usr/bin/mono
jakimfett@obsidian:~/Downloads$ mono --version
Mono JIT compiler version 6.6.0.161 (tarball Tue Dec 10 10:36:32 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    Interpreter:   yes
    LLVM:          yes(610)
    Suspend:       hybrid
    GC:            sgen (concurrent by default)
SmashleyG commented 4 years ago

exact same issue here on Xubuntu 19.10, downloaded .deb file from main site and have the following version of mono Mono JIT compiler version 6.6.0.161 (tarball Tue Dec 10 10:36:32 UTC 2019)

h54 commented 4 years ago

Same problem on Ubuntu 19.10 with .deb downloaded from MatterHackers site.

unlimitedbacon commented 4 years ago

Can one of you try the instructions at the bottom of this page (the fix for low end GPUs) and see if that helps?

h54 commented 4 years ago

I tried it but it resulted in the same stackdump

edit: GTX 1070 on 440.44 Nvidia proprietary drivers

jakimfett commented 4 years ago

I do notice a graphics hiccup (momentary choppy responsiveness) between when the program is executed and the (moments later) crashdump, @unlimitedbacon.

That said, I'm running a reasonably powerful graphics card (the GTX 970 FTW+ at almost five years old is nearly still more than 10x what Passmark considers "low mid range") with the v390.116 Nvidia proprietary driver for Linux-x86_64.

After re-installing with a freshly-downloaded .deb and setting FSAASamples to zero, the hiccup and crashdump are still generated when running the mattercontrol command, run duration approximately three seconds, total.

(edit(s) for clarity & conciseness, thanks @h54 for reminding me to add driver version numbers)

didli commented 4 years ago

Nvidia RTX 2060 founders edition, 440.44 Nvidia proprietary drivers. Coult it be that the convergent fault condition would be the nvidia proprietary drivers themselves, rather than the card ?

h54 commented 4 years ago

@didli yes it would be interesting to see if anyone on AMD or Intel graphics is having this issue.

h54 commented 4 years ago

I installed 2.0 with only Intel Integrated graphics and it starts. Initially, it's just a blank window but when I maximize it, I see and accept the license agreement. After that, all is normal.

Fedora 31 UHD Graphics 620

jakimfett commented 4 years ago

So, almost definitely an Nvidia upstream issue then, @h54 ?

h54 commented 4 years ago

@jakimfett I can't say definitively but I tried on two different systems with different Nvidia drivers (440.48.02 & 430.64) and the results are the same. I don't have an AMD card to test with, unfortunately.

jakimfett commented 4 years ago

@h54 said: I can't say definitively but I tried on two different systems with different Nvidia drivers (440.48.02 & 430.64) and the results are the same. I don't have an AMD card to test with, unfortunately.

But we do know that Intel Integrated works.
And those aren't from Nvidia, unless we're sorely mistaken.

h54 commented 4 years ago

I tested this morning with an AMD card and it started up without issue.

Pop_OS, kernel 5.3.0 RX-590

AngelQC commented 4 years ago

I've got the same issue, archlinux w/nvidia GT530 - I know, an old card but as other software works (PrusaSlicer) I guess it should not matter...

docmerlin commented 4 years ago

I get this problem with an NVIDIA 1080TI on archlinux

Brian245 commented 4 years ago

I'm getting the exact same error in the console log with Mint 18.3 running an Nvidia GeForce GTX 1060 6GB.

MechanizedMedic commented 3 years ago

I am also getting this error running an AMD Radeon RX 570 card with the "amdgpu" open source driver on Arch Linux.

CAHbKA-IV commented 3 years ago

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.

didli commented 3 years ago

Unbelievable, it works. Thank you CAHbKA-IV.

gpropf commented 2 years ago

I can vouch for this fix as well. Set 'Color' and 'Depth' to 24. Program works fine.

ashleycawley commented 2 years ago

Worked for me too! MatterControl wouldn't open for me on Zorin OS (Ubuntu based), but I got it working thanks to your advice by editing: /usr/lib/mattercontrol/appsettings.json And changing the color from 32 to 24 :+1: thank you so much.

ashleycawley commented 2 years ago

I contacted MatterHackers requesting that this user fix or work-around to the issue could be posted under the Know Issues section of their documentation at https://matterhackers.github.io/MatterControl-Help/docs/linux

However I was directed to this GitHub, its unfortunate because this issue has been on-going for 2 years now and there are four independent issues lists on GitHub linked to to this issue, it seems like an issue that could potentially be fixed quite easily or at the very least the documentation updated so that users can help themselves to get up and running if the Linux software isn't going to be patched.

gpropf commented 2 years ago

I'm glad my answer helped you. If I wasn't job hunting I'd fix it myself but I can't seem to get the MC C# code to compile on my Linux machine and I don't know enough about that environment to know why it won't work. This is a low priority right now for me. The fix should be quite simple I would think. Maybe somebody can make a binary without the bug and post it. - Greg

On Mon, Nov 15, 2021 at 10:56 AM Ashley Cawley @.***> wrote:

I contacted MatterHackers requesting that this user fix or work-around to the issue could be posted under the Know Issues section of their documentation at https://matterhackers.github.io/MatterControl-Help/docs/linux

However I was directed to this GitHub, its unfortunate because this issue has been on-going for 2 years now and there are four independent issues lists on GitHub linked to to this issue, it seems like an issue that could potentially be fixed quite easily or at the very least the documentation updated so that users can help themselves to get up and running if the Linux software isn't going to be patched.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MatterHackers/MatterControl/issues/4682#issuecomment-969216835, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB62E6PFVUV6S2XMXNWE45LUMFJU3ANCNFSM4JSM4FXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.