Comments (5)
I tried on a clean Ubuntu 18.10 install and got the same error - fortunately the fix is pretty simple. I guess mono has the .NET framework version 4.5, but not 4.0. To override the default framework version (normally specified in the .sln file), use this for xbuild:
xbuild /p:TargetFrameworkVersion="v4.5"
Give that a shot; it might require a different framework version on your Mint build, but it's probably v4.5 as well.
from pathcam.
Thanks for the info. I tried it and it did build ok. It gave 40 warnings but no errors.
However, when I try to run it fails with an error related to version. Maybe there is a new command that tells it to use v4.5?
Here's the dump when running command,
mono GUI/bin/Debug/PathCAM.exe
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
X11 Error encountered:
Error: BadMatch (invalid parameter attributes)
Request: 154 (5)
Resource ID: 0x9600020
Serial: 243
Hwnd: Hwnd, Mapped:False ClientWindow:0x9600020, WholeWindow:0x960001F, Zombie=False, Parent:[<null>]
Control: GUI.Drawing3D at System.Environment.get_StackTrace () [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0
at System.Windows.Forms.XplatUIX11.HandleError (System.IntPtr display, System.Windows.Forms.XErrorEvent& error_event) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr , System.IntPtr , System.IntPtr ) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr display, System.IntPtr drawable, OpenTK.ContextHandle context) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Platform.X11.X11GLContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Graphics.GraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.GLControl.MakeCurrent () [0x00000] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at OpenTK.GLControl.OnHandleCreated (System.EventArgs e) [0x00000] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.UserControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.XplatUIX11.SendMessage (System.IntPtr hwnd, System.Windows.Forms.Msg message, System.IntPtr wParam, System.IntPtr lParam) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.XplatUIX11.CreateWindow (System.Windows.Forms.CreateParams cp) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams cp) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams cp) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.Control.CreateHandle () [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.Control.CreateControl () [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at OpenTK.GLControl.ValidateState () [0x00000] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at OpenTK.GLControl.MakeCurrent () [0x00000] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at GUI.Drawing3D.set_ClearColor (System.Drawing.Color value) [0x00000] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at GUI.PathCAM.InitializeComponent () [0x00000] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at GUI.PathCAM..ctor () [0x00000] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at GUI.Program.Main () [0x00000] in <7bb30ae022d9485bba76b05e54d6dd08>:0
OpenTK.Graphics.GraphicsContextException: Failed to make context current.
at OpenTK.Platform.X11.X11GLContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x0010e] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Graphics.GraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.GLControl.MakeCurrent () [0x00017] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at OpenTK.GLControl.OnHandleCreated (System.EventArgs e) [0x0007a] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x001d7] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x0003c] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.UserControl.WndProc (System.Windows.Forms.Message& m) [0x00036] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x0008e] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
X11 Error encountered:
Error: BadMatch (invalid parameter attributes)
Request: 154 (5)
Resource ID: 0x9600020
Serial: 261
Hwnd: Hwnd, Mapped:True ClientWindow:0x9600020, WholeWindow:0x960001F, Zombie=False, Parent:[<null>]
Control: GUI.Drawing3D at System.Environment.get_StackTrace () [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0
at System.Windows.Forms.XplatUIX11.HandleError (System.IntPtr display, System.Windows.Forms.XErrorEvent& error_event) [0x00000] in <d5b72d15d4f7424c8a1538e3f19ec2e3>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr , System.IntPtr , System.IntPtr ) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Platform.X11.Glx.MakeCurrent (System.IntPtr display, System.IntPtr drawable, OpenTK.ContextHandle context) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Platform.X11.X11GLContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Graphics.GraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.GLControl.MakeCurrent () [0x00000] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at GUI.Drawing3D.set_ClearColor (System.Drawing.Color value) [0x00000] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at GUI.PathCAM.InitializeComponent () [0x00000] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at GUI.PathCAM..ctor () [0x00000] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at GUI.Program.Main () [0x00000] in <7bb30ae022d9485bba76b05e54d6dd08>:0
Unhandled Exception:
OpenTK.Graphics.GraphicsContextException: Failed to make context current.
at OpenTK.Platform.X11.X11GLContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x0010e] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Graphics.GraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.GLControl.MakeCurrent () [0x00017] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at GUI.Drawing3D.set_ClearColor (System.Drawing.Color value) [0x00014] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at (wrapper remoting-invoke-with-check) GUI.Drawing3D:set_ClearColor (System.Drawing.Color)
at GUI.PathCAM.InitializeComponent () [0x0061c] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at GUI.PathCAM..ctor () [0x00047] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at (wrapper remoting-invoke-with-check) GUI.PathCAM:.ctor ()
at GUI.Program.Main () [0x0000c] in <7bb30ae022d9485bba76b05e54d6dd08>:0
[ERROR] FATAL UNHANDLED EXCEPTION: OpenTK.Graphics.GraphicsContextException: Failed to make context current.
at OpenTK.Platform.X11.X11GLContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x0010e] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.Graphics.GraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo window) [0x00000] in <5c487d0493a3443b8b6e3ad2f7883ea9>:0
at OpenTK.GLControl.MakeCurrent () [0x00017] in <d945ecfa2f964ea296cf28f4a03910c1>:0
at GUI.Drawing3D.set_ClearColor (System.Drawing.Color value) [0x00014] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at (wrapper remoting-invoke-with-check) GUI.Drawing3D:set_ClearColor (System.Drawing.Color)
at GUI.PathCAM.InitializeComponent () [0x0061c] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at GUI.PathCAM..ctor () [0x00047] in <7bb30ae022d9485bba76b05e54d6dd08>:0
at (wrapper remoting-invoke-with-check) GUI.PathCAM:.ctor ()
at GUI.Program.Main () [0x0000c] in <7bb30ae022d9485bba76b05e54d6dd08>:0
```
from pathcam.
I tried Mint 19.1 Cinnamon, and it builds (with the same 40 warnings, 0 errors), and seems to run OK. It launches with the same "The runtime version supported by this application is unavailable. Using default runtime: v4.0.30319".
It could be related to the window manager, maybe the xfce or mate version don't work? Also it looks like an OpenTK related issue (OpenTK handles the OpenGL abstraction), similar to this one: opentk/opentk#108
The issue could be specific to your hardware configuration (and I'm testing in a virtual machine, so I might not be able to replicate). In which case, changing the graphics selection might help. In GUI/Drawing32.cs line 28, change this:
public Drawing3D()
to
public Drawing3D() : base(new OpenTK.Graphics.GraphicsMode(OpenTK.DisplayDevice.Default.BitsPerPixel, 24))
Then rebuild with xbuild /p:TargetFrameworkVersion="v4.5" and try the .exe again. If it doesn't work, try forcing the first parameter of GraphicsMode to 24 or 32.
public Drawing3D() : base(new OpenTK.Graphics.GraphicsMode(24, 24))
public Drawing3D() : base(new OpenTK.Graphics.GraphicsMode(32, 24))
If any of those do work, you might also try
OpenTK.Graphics.GraphicsMode(32, 24, 0, 8)
which enables 8x anti-aliasing (supported by most modern graphics cards), and will make the UI look a bit better.
from pathcam.
Thank you again for your efforts. I made that change (presume meant Drawing3D.cs not Drawing32.cs) and after build it runs ok. I have a screen with red and green arrows. Yay! I have not tried anything further yet.
Incidentally I am on Cinnamon as well but my laptop has Nvidia Geforce 710M GPU built in. Maybe that makes a difference. I added a menu item and can start from there now.
All good I think. Will try to figure out how to use now. Just near end of Root 3 CNC build.
Thanks again.
from pathcam.
I hit this issue as well, Ubuntu 20.04 with nVidia graphics and the tweak to public Drawing3D() did the trick as well.
from pathcam.
Related Issues (20)
- PathCam is just what I want HOT 5
- Graphics Failure Exception
- Allow input in millimeters in GUI
- List of supported Robots
- Great Work!
- Using Triangle to create voronoi and the result is wrong HOT 3
- Rotating Parts HOT 1
- Parsing requires English region options
- Remember file units
- Add option to generate the output with millimeters instead of inches
- Move Height should be relative
- Metric version of PathCAM available. HOT 2
- Any more recent tutorials? HOT 4
- feature request: ability to open gerber files HOT 7
- Localisation issue HOT 1
- Please can we have a no rough cut option
- PathCAM massive fail on simple model
- PathCam bogs on the first attempt to use it
- Borken USB, at least on linux HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pathcam.