When starting up the EggBot Control extension in Inkscape I get the following error:
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
I get this when running both v202 and v215 of the firmware and inkscape-0.48.3.1
Any suggestions? I've poked at this off and off for weeks.
Comments
The error happens no matter what image I have loaded (or none at all).
A couple of side notes. I have had nothing but trouble with this beast, and in the couple of years I have had it I have never gotten it to work satisfactorily. I also had it on loan to the hackerspace in Austin for a time, and one of the members reported he had it running (but I think he was running Windows).
Also, when I power the beast up, the LED next to the USB port blinks in a in a constant long, short, long, short,... pattern. Is this some sort of error code?
As a further note, usbview recognizes the EiBotBoard and returns the following information:
EiBotBoard
Manufacturer: SchmalzHaus
Speed: 12Mb/s (full)
USB Version: 2.00
Device Class: 02(comm.)
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 64
Number of Configurations: 1
Vendor Id: 04d8
Product Id: fd92
Revision Number: 1.82
So, I do not think there is a real problem with the board, BUT when I run "gtkterm --port /dev/ttyACM0" I get the following errors:
!2 Err: TX Buffer overrun
!7 Err: Extra parmater
Any idea what that might be about?
The OS is detected in the eggbot_scan.py file, one of the the Eggbot extensions. It normally checks for a platform of 'linux2' and if your sys.platform is (for example) linux3, you may be able to fix it by changing the line that reads
So, moving on...
sys.platform returns 'linux2'
the eggbot enumerates as /dev/ttyACM0 as expected
I am running inkscape-0.48.3.1 which is actually newer than the 0.48.2 version you quoted. So, I thought that I might as well downgrade and see if that helps. Here is where things start to get exciting...
My system is running newer versions of the compilers and glib than inkscape-0.48.2 source can handle. I was able to solve most of the source code problems with the following script fu in a custom ebuild:
find . -type f -exec sed -i "/gstdio.h/! s%glib/g.*.h%glib.h%" {} \;
find . -type f -exec sed -i "s%(_(%((%" {} \;
newer version of glib disallows calling glib/g*.h and requires you call <glib.h> instead. There is one interesting exception though, and that is <glib/gstdio.h>
So things started building away until way late in the game where it dies with the following errors (one here as an example):
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::parse(Object*, GBool)':
extension/internal/pdfinput/pdf-parser.cpp:370:52: error: invalid conversion from 'int' to 'ErrorCategory' [-fpermissive]
extension/internal/pdfinput/pdf-parser.cpp:370:52: error: invalid conversion from 'char*' to 'int' [-fpermissive]
extension/internal/pdfinput/pdf-parser.cpp:370:52: error: too few arguments to function 'void error(ErrorCategory, int, const char*, ...)'
/usr/include/poppler/Error.h:54:13: note: declared here
It turns out that this error is, if I understand it correctly, all bound up with changes to poppler (I am running poppler-0.20.4 BTW). So, this is a show-stopper, because I cannot safely downgrade my systems glib and poppler to accommodate the older version of inkscape without risking mucking all sorts of things.
If you really are willing to setup a development machine to run Gentoo for testing, I will see what I can do to help. As a note, Gentoo is far from being the easiest linux distribution to install, but once you do get a configured sustem it is trivial to keep it up to date with security patches, etc., because "portage" manages a complete dependency graph of all package revisions and rebuilds packages automatically when updates to dependencies are posted. I have been able to keep my laptop uptodate for the last 5 years with only one serious hickup. If you do start banging on this I will offer to write an eggbot ebuild to help build, maintain, and distribute the changes.
Once again I am sorry for how my "beast" comment came across. As a note, when I first got the eggbot it was just to play with (so I had very little motivation to get it all working, and add to that the fact that I normally only play with things like this as I am winding down at the end of the night -- like right now at 2:30am). If I recall correctly I did contact one of the forums sometime back in 2010, but was not able to work through whatever the issues were at that time. So, I have been taking this down and play with it every once and awhile and put it back in a box for 3 to 6 months at a time until I decide to poke at it again. I was hoping to work on a holiday gift where I could have used it. That is why I picked it up again. For all I know something might have been damaged in my last half-dozen moves...
If not, if you start with the livecd and follow the instructions http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1 then you will have to install xorg-server, kde-meta, and then inkscape. I can send you my world build file from one of my machines, and that might make building the packages faster, but will be a lot more that you really need for a test bench.
https://answers.launchpad.net/inkscape/+question/215655 Can you give that fix a try and see if it makes any difference?
As a note, you can also use another trick that I do not know if it will work in this case (ie have not tried it yet) setting the hardcoded python above to "/usr/env python2" which will find the installed version 2 of pythong (wether the default is 2.6, 2.7, or installed in some place like /opt).
So, no. Still not joy.
BTW, where are you located? I am in the Washington DC area at the moment, heading into the the New Orleans area for the holidays. If you are within 100 mils of there (or other destinations I will be traveling for fun and/or work) I can look into arranging a meetup to configure a Gentoo box.
BTW, what happened when you tried before? The common mistake is not to build/install a kernel properly. Depending on how far you got I can walk you through it (and to recover from the point you last got). Anyway, let me know...
Gentoo does not have a binary install for inkscape, but I will look around and see if I can find a prebuilt binary and try installing it.
more later,
EBo --
ps: No, Sunnyvale is not so close to DC, but it is closer than Perth! ;-)
Anyway, thought I would update you, and thank you once again for taking the time to look at this.
Something that would be helpful would be if you or someone else could describe how to run the extensions standalone (outside of Inkscape) so I can run it in a debugger and single step through the code. If that is not possible, then I can pepper the code with bread crumbs to isolate where it is dieing. Do you have other suggetions besides the interface to pyserial? As a note, I am in meetings the rest of the week, then I go on holiday/vacation, and possibly some work travel. I've put the EB in with my travel things, but do not expect that I will have to much time to work on it...
Thanks again!