Maintenance notice: These forum archives are read-only, and will be removed shortly. Please visit our forums at their new location,

inkscape extensions

edited November 2012 in General
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-

Any suggestions?  I've poked at this off and off for weeks.


  • I have not come across this error, and I have not had any other reports of this error.   

    Do the other extensions work normally?

    Does the error occur only for a certain set of input SVG files?

    Do you have any issues with *released* versions of Inkscape?  I have heard of other existing issues with 0.48.3, although none of them were eggbot related.  What OS?
  • Windell, thanks for the reply.  I am running the Gentoo Linux distribution with a 3.4.9 kernel.  I should be able to easily downgrade the version to whatever you suggest.  I can also downgrade the kernel if necessary.

    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:

    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?
  • Also, where can I find the documentation on the setup (baud, parity, stop-bits, and commands that can be sent to the board via a hyper type terminal)?  I remember seeing something where we are supposed to be able to talk to the board directly...
  • oops.  Sorry, I am dead tired and missing things.  I have not had a need to use inkscape for anything in over a year and do not know if there is any issues with my plugins.  I do know that I can run egmazing and several other extensions and they behave as expected.  If there is a problem I do not know.  It is likely though that I will need to jump back into writing programs to interface with ImageMagic and Inkscape later than sooner.  I may have more to add at that time.
  • edited November 2012
    It would have been kind of you to contact us for assistance before getting to the point--years later --that you're calling it a "beast." Ouch.

    To begin with, try downloading the current version of Inkscape (0.48.2), and release 2.2.1 of the Eggbot extensions (zip file):  
    Make sure that you only have one copy of these extensions on your computer, restart inkscape, and try our "hello world" example file.

    While we used Ubuntu to develop the Eggbot extensions for Inkscape (and then ported to Windows and Mac), I do not have direct experience with Gentoo.  However, we have not heard any other reports of trouble with Gentoo, nor of the "logic_error" that you're describing in this or other contexts.   

    I'm not sure what the root cause could be.   That error is not thrown by our extension, or by Inkscape when it runs other extensions.  So we know that Inkscape is mostly working, and that the python subsystem that it uses is mostly working.  We also know that the error is not being generated within our extension, but somehow by something that our extension is doing that the others are not-- which could be the use of pyserial, or scanning for serial ports, or perhaps something about the parameters that the extension takes.  

    If your eggbot enumerates to /dev/ttyACM0 under Gentoo, that's the same base string as under Ubuntu, and so it should-- in principle --be able to find it there.   However, I wonder if the "sys.platform" variable returned is different under Gentoo, and this is somehow causing a problem.    

    Could you check what the sys.platform variable actually is on your OS?  To do so, run python from the command line, type "import sys" and then "sys.platform" .

    The OS is detected in the 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 
    elif platform == 'linux2':
    to instead read:
    elif platform == 'linux2' or platform == 'linux3':
    Otherwise, I may need to set up a computer here to figure out what the issue is.
  • First please accept my apologies.  When I used the term "beast" I had not meant it to be disparaging.  Rereading the post (after some sleep) I see where it could be taken that way.  Sorry about that.

    So, moving on...

    sys.platform returns 'linux2'

    the eggbot enumerates as /dev/ttyACM0 as expected

    I am running inkscape- 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... 

  • Well, after working at it for a couple of hours, I now clearly understand why Ubuntu is so popular.  If you didn't have a counterexample, I'd suspect that Gentoo doesn't actually work....
  • huh?  Oh you mean problems setting up a testbed.  If there is a time we can we can sync up I can help walk you through it.  Can you email e off list?

    If not, if you start with the livecd and follow the instructions ; 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.
  • edited December 2012
    As I said, if there weren't a counterexample... and yes, my comment was written after trying to follow that guide and not ending up with a working system. (It would be convenient if there were a real installer for Gentoo.)

    Anyway, I did come across something else interesting: It looks like Gentoo may default to Python 3, when we actually need to be running Python 2 for the extensions to work properly:

    Can you give that fix a try and see if it makes any difference?
  • I use eselect all the time.  Actually I already had it set to 2.7.3 (as suggested in one suggestion) without success.  I also tried to add the python-interpreter="/usr/bin/python2.7"  as well (again without success).

    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...
  • We've used a similar hardcoded python trick to get Inkscape extensions (in general) to run under some recent versions of Mac OS, each release of which seems to temporarily break Inkscape extensions.

    We're located in Sunnyvale, CA, so not very close to DC.  ;)

    On my install attempt, I was unable to boot from the so-called "install CD," but not able to get a network connection, which is needed to finish it. Tried following several guides for installing, but no joy so far.  

    I'm not able to commit a lot of time to that part (installing gentoo) of the project right now.  Do you know if there any compiled/"binary" version of Inkscape available that you could test?    
  • sorry for the delay I am scrambling to get stuff done for work before vacation, and I was just asked to make a couple of trips for work into Africa...  I understand about the time crunch, and frankly I am impressed that you were even willing to try to setup a testbead.  What hardware specs does that machine have (net connection in specific)?  If you are willing to poke at it again, just let me know when and I will see if I can breakaway at the same time and make myself available via phone/web.  Another idea just came to mind.  Have you ever tried setting up virtual macjhiens via virtualbox, VMWare, or qemu?  I have set up testbeds that way on an occasion or two.  I do not remember having to set up kde/inkscape inside of one though, just bridging against Plan 9, Win*, and linux, and various build specialized configurations (like x486/x686 builds)...

    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! ;-)
  • A couple of notes, I tried running a number of supposed "static" binary builds to find that it could not find the already installed version of libpopt.  I tried three different rpm version, and finally gave up.  I may try setting up a virtual machine, but that will be in a month or two (unless I blow the dust off of a Win* laptop and see if I can git it working there).
  • A quick note, I dusted off a laptop (with Win7 on it) that I've only turned on may 3 times in the last year) updated security, the OS, and installed Inkscape.  I got everything to work with Inkscape 0.48.2.  So, the machine is working.  I would still like to get the extension working on my Linux laptop, but that is running

    Anyway, thought I would update you, and thank you once again for taking the time to look at this.
  • Well, that is good news-- I'm glad to hear that *at least* the hardware is okay.  

    (Again, I'll hopefully have more time for Eggbots and setting up a testbed once our holiday rush is over-- we're in full-on production mode on the Digi-comp, working 20 hours a day or so.)

    I wonder if you could possibly run some debugging tests on your machine, by making modifications to the Eggbot Control python script, to hopefully narrow down what the root cause might be.  It could be an issue having to do with pyserial, or perhaps there's an actual bug in our code that's causing it.  Have you had any experience with python?
  • Windell, do not worry about the holiday delay I *fully* understand. I've only got a couple hundred hours of python development, but 10's of thousand of hours doing C/C++/Fortan and more than 40 other languages.  I currently work under contract as a senior programmer for NASA, and am one of the developers for LinuxCNC.  So yes, I should be to do some debugging (given the time - which is currently almost nil).  One of my major job focuses just took an interesting turn and I will probably be working overtime for the foreseeable future... Realistically I will likely only have at most an hour or so a night to work on any of my projects as I am winding down before bed (~1am). 

    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!
  • I had the same trouble (but with Fedora, and inkscape 0.48.4).  As a hack, I deleted lines 31-33 of eggbot.inx.  The problem appears to be the empty _param section.for instructions_setup2.  I know nothing about inkscape extensions, but based it off of a fix from someone with a different unrelated extension but same error on newer inkscape.  You might want to update the download with a proper fix (or if this fix is correct) so people don't have to run old versions of inkscape.
  • For the record, we did update the extensions with the change suggested by jlauro, which was necessary to fix a change in Inkscape as of 0.48.4.  This fix is included with extensions version 2.3.4 and higher.
Sign In or Register to comment.