-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems running under Linux mono #14
Comments
I read the note at http://blog.thisisnotrocketscience.nl/projects/pcb-panelizer/ that says
(The readme says "should work" without restriction though, so I tried the GUI first.) I took a look at the source and this is related to loading an ico file. I'm not sure which yet. |
The last line when running strce is an attempt to open GerberPanelizer.resources.dll (ENOENT), which makes me think it's attempting to load a PE resources from itself. It appears that the icons in the release zip are all a format with valid headers, but then the entries all start with "\x89PNG". I don't see code to load this in https://github.com/mono/mono/blob/master/mcs/class/System.Drawing/System.Drawing/Icon.cs (but there's a patch on https://bugzilla.xamarin.com/show_bug.cgi?id=30715 that does). I'll try swapping out the icon resources and running again; I assume the normal build requires Visual Studio, and there isn't a commandline build script that works on Linux? |
Replacing it with Resource Hacker was insufficient to get it running under mono -- I'm not sure which icon it's loading quite yet (it's either something mmap'd or read over IPC, as there's no read containing 'PNG' nearby). I checked and the command line utilities do work, so perhaps the readme should just be adjusted to be more specific in the meantime? |
I'll test it on a linux vm - see if I can fix this somehow. If it really only is the PNG stuff it should be a relatively simple fix. Did you try running mono with that patch? Very odd that png streams are not supported in this particular way. So far I've only built it on Visual Studio - if somebody wants to make/maintain a buildscript for other systems - be my guest. I will personally not make/maintain one - another support headache. |
With the patch it gets slightly further,
I then hacked up GetInternalBitmap to do
and it gets further. It launches and has a valid icon, but then when using File->New it crashes in OpenTK saying "The specified window isn't an OpenGL window." Since you mentioned replacing this with the "mono version", I just built OpenTK from AUR and copied it in place... now New causes the window to become painted with the null brush. Did you have something more specific in mind for "replacing"? |
Aha. I think I'm hitting opentk/opentk#393 (I do have an nvidia card, and that user is also on Arch). __GL_THREADED_OPTIMIZATIONS=0 got the File->New to complete and show graph paper, and I can load a board (this is with the Linux version of OpenTK). The right pane has a working splitter, but no contents, just gray Aside from that, it exports ok (some messages in console, but the gerbers look fine). |
Hmm, also running into this while trying to open this project with mono. This machine happens to also have an nvidia gpu (and using the associated nvidia driver), but the solution to use __GL_THREADED_OPTIMIZATIONS=0 doesn't seem to work as I get the exact same System.Reflection.TargetInvocationException Any ideas? |
@dromer The TargetInvocationException implies you need to remove openTK.dll from the local directory, so it uses the system-installed one. (If you're on Arch, it's in AUR.) |
Hi @thatch , I renamed OpenTK.dll and installed libopentk1.1-cil (wich provides OpenTK.dll on ubuntu 16.04) and still get System.Reflection.TargetInvocationException |
Ah, I think I was incorrect then. Does your error have "XOR data length expected" as my paste above? If so, that's the PNG icon issue. Ways forward are either:
|
Yes I did get the 'XOR data length' line as with you. I didn't try to compile the code myself, but used the GerberTools_2017_2_17.zip binary release. |
Is there any update to this? I am also failing the XOR stuff but would like to run the Panelizer on Linux. |
Same here compiling the latest from the repo using Visual Studio Mac. |
I have looked at bit into the problem and created a pull request that fixes the problem, see #41 To make it easy for others I have here attached a compiled version: Panelizer.zip |
Confirmed. Launched @runesoeknudsen s compiled version successfully on my Ubuntu 16.04 Box with mono 5.8.0.22 |
@phl0 how are you launching it? i tried w/
mono version:
|
A way around could be using a virtual machine running Linux. Note that it needs to support OpenGL |
If a VM is required, then I'll just run it in my Win10 VM. |
used runesoeknudsen version under Mono JIT compiler version 5.4.1.7 on Ubuntu 16.04.1 64bit and the generated gerber files contain no mousebites, but the png images have them?? original gerbers generated using kicad |
Affected by the exception on the description of this bug, I tried @runesoeknudsen 's version on Ubuntu 16.04 with its default version of mono, and it attempts to start (seems like it were going to show a window), but then fails with a bad image format exception. Is it supposed to work with mono 4.2.1.102+dfsg2-7ubuntu4 ? |
Nothing works for me mono version: % mono -V
Mono JIT compiler version 5.18.0.268 (tarball Sat Mar 16 14:25:29 +07 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: supported, not enabled.
Suspend: preemptive
GC: sgen (concurrent by default) error on startup: % mono GerberPanelizer.exe
Unhandled Exception:
System.InvalidCastException: Specified cast is not valid.
at GerberCombinerBuilder.GerberPanelizerParent.InitializeComponent () [0x002f4] in <19d40ec926044f24bd4f992136fb1d19>:0
at GerberCombinerBuilder.GerberPanelizerParent..ctor () [0x00034] in <19d40ec926044f24bd4f992136fb1d19>:0
at (wrapper remoting-invoke-with-check) GerberCombinerBuilder.GerberPanelizerParent..ctor()
at GerberCombinerBuilder.Program.Main () [0x0000e] in <19d40ec926044f24bd4f992136fb1d19>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidCastException: Specified cast is not valid.
at GerberCombinerBuilder.GerberPanelizerParent.InitializeComponent () [0x002f4] in <19d40ec926044f24bd4f992136fb1d19>:0
at GerberCombinerBuilder.GerberPanelizerParent..ctor () [0x00034] in <19d40ec926044f24bd4f992136fb1d19>:0
at (wrapper remoting-invoke-with-check) GerberCombinerBuilder.GerberPanelizerParent..ctor()
at GerberCombinerBuilder.Program.Main () [0x0000e] in <19d40ec926044f24bd4f992136fb1d19>:0 |
@alexws54tk which source did you build, and how? Can you build a debug version with source line locations |
@ulidtko I build sources from main repo with some patches from #71 trough
alex@aero [17/03 17:47:09] [~/src/GerberTools] [master *]
-> % xbuild /p:Configuration=Debug GerberProjects/GerberProjects.sln 2>&1 >output Same error on start. alex@aero [17/03 18:32:53] [~/src/GerberTools] [master *]
-> % mono GerberPanelizer/bin/Debug/GerberPanelizer.exe
Unhandled Exception:
System.InvalidCastException: Specified cast is not valid.
at GerberCombinerBuilder.GerberPanelizerParent.InitializeComponent () [0x002f4] in <50ae998f472d413888ca5036cc3cce02>:0
at GerberCombinerBuilder.GerberPanelizerParent..ctor () [0x00034] in <50ae998f472d413888ca5036cc3cce02>:0
at (wrapper remoting-invoke-with-check) GerberCombinerBuilder.GerberPanelizerParent..ctor()
at GerberCombinerBuilder.Program.Main () [0x0000e] in <50ae998f472d413888ca5036cc3cce02>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidCastException: Specified cast is not valid.
at GerberCombinerBuilder.GerberPanelizerParent.InitializeComponent () [0x002f4] in <50ae998f472d413888ca5036cc3cce02>:0
at GerberCombinerBuilder.GerberPanelizerParent..ctor () [0x00034] in <50ae998f472d413888ca5036cc3cce02>:0
at (wrapper remoting-invoke-with-check) GerberCombinerBuilder.GerberPanelizerParent..ctor()
at GerberCombinerBuilder.Program.Main () [0x0000e] in <50ae998f472d413888ca5036cc3cce02>:0 alex@aero [17/03 18:43:35] [~/src/GerberTools] [master *]
-> % mono ./ReleaseBuilder.exe DirtyPCBs DirtyPCBs\Build
Directory not found!
alex@aero [17/03 18:43:43] [~/src/GerberTools] [master *]
-> % mono ./ReleaseBuilder.exe GerberTools Build
Unhandled Exception:
System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <9268f3792dc94bbabfe610485b45e6a0>:0
at System.Uri..ctor (System.String uriString, System.UriKind uriKind) [0x00014] in <9268f3792dc94bbabfe610485b45e6a0>:0
at ReleaseBuilder.ReleaseBuilder.RelativePath (System.String path1, System.String path2) [0x00001] in <ad1089b2f1bb4da088d45d9907849a99>:0
at ReleaseBuilder.ReleaseBuilder.AddFilesToFolder (Ionic.Zip.ZipFile zip, System.String inputfolder, System.String basefolder) [0x00046] in <ad1089b2f1bb4da088d45d9907849a99>:0
at ReleaseBuilder.ReleaseBuilder.AddFolder (Ionic.Zip.ZipFile zip, System.String inputfolder, System.String basefolder) [0x00035] in <ad1089b2f1bb4da088d45d9907849a99>:0
at ReleaseBuilder.ReleaseBuilder.Main (System.String[] args) [0x00114] in <ad1089b2f1bb4da088d45d9907849a99>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <9268f3792dc94bbabfe610485b45e6a0>:0
at System.Uri..ctor (System.String uriString, System.UriKind uriKind) [0x00014] in <9268f3792dc94bbabfe610485b45e6a0>:0
at ReleaseBuilder.ReleaseBuilder.RelativePath (System.String path1, System.String path2) [0x00001] in <ad1089b2f1bb4da088d45d9907849a99>:0
at ReleaseBuilder.ReleaseBuilder.AddFilesToFolder (Ionic.Zip.ZipFile zip, System.String inputfolder, System.String basefolder) [0x00046] in <ad1089b2f1bb4da088d45d9907849a99>:0
at ReleaseBuilder.ReleaseBuilder.AddFolder (Ionic.Zip.ZipFile zip, System.String inputfolder, System.String basefolder) [0x00035] in <ad1089b2f1bb4da088d45d9907849a99>:0
at ReleaseBuilder.ReleaseBuilder.Main (System.String[] args) [0x00114] in <ad1089b2f1bb4da088d45d9907849a99>:0 ЗЫ: В общем: очередное ненужное подделие с отсутствием заявленной работоспособности. Только зря два дня потерял. |
Winelib is a development toolkit which allows you to compile your Windows applications on Unix. |
My problemHi every one Unfortunaly i'm getting in truble...
Any one cane help me??? I realy don't know what i need to install now. Update build.shI also update the
|
It's my first time trying to run the tools, and I uncovered an error when running in the obvious way on Linux. This occurs under both older Ubuntu (mono 3.2.8) and recent Arch (mono 4.8.0). The same release works fine under Windows 10. I haven't looked into whether previous GerberTools releases behave any better though.
The text was updated successfully, but these errors were encountered: