Crash - Inkscape 0.48.4 to OpenSCAD_converter

Asked by James Waldby

On 5 March 2016 I used the 'Ubuntu Software Center' to install inkscape on my Ubuntu 14.04 / Linux 3.13.0-79 system and tried to use it to convert a 2D drawing to 3D but got a crash as described below.

inkscape --version shows: Inkscape 0.48.4 r9939 (Jan 22 2014)

I then downloaded Inkscape_to_OpenSCAD_converter.zip from http://www.thingiverse.com/thing:24808 and unzipped it then unzipped paths2openscad-2.zip and copied paths2openscad.inx and paths2openscad.py into ~/.config/inkscape/extensions
after which ls -lgG shows:
total 32
-rwxr-xr-x 1 2550 Jun 15 2012 paths2openscad.inx
-rwxr-xr-x 1 26181 Jun 15 2012 paths2openscad.py

Then on a terminal screen I entered
    inkscape t1e.svg &

where t1e.svg is the following 6-line .svg file.

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="7mm" height="5mm" viewBox="0 0 7 5" version="1.1">
<g id="surface7">
<path style="fill:green;" d="M 3 3 v -1 h 2 v 1 Z "/>
</g>
</svg>

In inkscape I clicked View, Display Mode, Outline to see the green rectangle's outline path.

Then I clicked Extensions, Generate from Path, Paths to OpenSCAD...
at which point an error message box appeared, saying:
    Inkscape encountered an internal error and will close now.

and the following appeared on the terminal screen:

terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct null not valid

Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.

Next, on a terminal screen I entered:
   gdb inkscape
and then
   run t1e.svg
and clicked stuff as before, with following output:

 Starting program: /usr/bin/inkscape t1e.svg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe754d700 (LWP 26782)]
[New Thread 0x7fffe6d4c700 (LWP 26783)]
[New Thread 0x7fffdd607700 (LWP 26784)]
[New Thread 0x7fffdce06700 (LWP 26785)]
[New Thread 0x7fffd3b86700 (LWP 26786)]
[Thread 0x7fffdce06700 (LWP 26785) exited]
[Thread 0x7fffd3b86700 (LWP 26786) exited]
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct null not valid

Program received signal SIGABRT, Aborted.
0x00007ffff07d3cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff07d3cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff07d70d8 in __GI_abort () at abort.c:89
#2 0x00007ffff12fc535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff12fa6d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff12fa703 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff12fa922 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff134c1c7 in std::__throw_logic_error(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007ffff13579f1 in char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x00007ffff1357d88 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9 0x00007ffff6ec59ce in Glib::ustring::ustring(char const*) () from /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1
#10 0x000000000077af44 in Inkscape::Extension::ParamDescription::get_widget(SPDocument*, Inkscape::XML::Node*, sigc::signal<void, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>*) ()
#11 0x0000000000778ca9 in Inkscape::Extension::ParamNotebookPage::get_widget(SPDocument*, Inkscape::XML::Node*, sigc::signal<void, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>*) ()
#12 0x0000000000779168 in Inkscape::Extension::ParamNotebook::get_widget(SPDocument*, Inkscape::XML::Node*, sigc::signal<void, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>*) ()
#13 0x0000000000774cd7 in Inkscape::Extension::Extension::autogui(SPDocument*, Inkscape::XML::Node*, sigc::signal<void, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>*) ()
#14 0x0000000000acc431 in Inkscape::Extension::PrefDialog::PrefDialog(Glib::ustring, char const*, Gtk::Widget*, Inkscape::Extension::Effect*) ()
#15 0x0000000000783197 in Inkscape::Extension::Effect::prefs(Inkscape::UI::View::View*) ()
#16 0x00000000007c204c in sp_action_perform(SPAction*, void*) ()
#17 0x00007ffff49993b8 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff49aad3d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff49b2a29 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007ffff49b2ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007fffe87fb390 in ?? () from /usr/lib/x86_64-linux-gnu/libunity-gtk2-parser.so.0
#22 0x00007ffff59cece7 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#23 0x00007ffff4426ce5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#24 0x00007ffff4427048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff442730a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff5d8f447 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#27 0x000000000062b6bc in sp_main_gui(int, char const**) ()
#28 0x000000000060f0df in main ()
(gdb)

Is there a way around this problem?

Note, some various system data follows (cut and paste from sysinfo)
Ubuntu 14.04 (trusty)
Gnome 3.8.4 (Ubuntu 2015-12-02)
Kernel 3.13.0-79-generic (#123-Ubuntu SMP Fri Feb 19 14:27:58 UTC 2016)
Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
15958 MiB 41% free

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Hachmann
Solved:
Last query:
Last reply:
Revision history for this message
James Waldby (j13) said :
#1

Apparently the zip files linked at http://www.thingiverse.com/thing:24808 are obsolete. I located more-recent copies of paths2openscad.inx and paths2openscad.py at https://github.com/l0b0/paths2openscad and with them in ~/.config/inkscape/extensions in place of the old files, the conversion appeared to work.

Revision history for this message
Best Hachmann (marenhachmann) said :
#2

Hi James,

it's not only the zip files that are obsolete, it's also your Inkscape version... 0.48.4 is really old. 0.48.5 has been released in the mean time, and also 0.91. Now Inkscape developers are working on 0.92.

Ubuntu seems to have slept a little to not even include it into their backports repo... For Linux Mint, it's available...

(though it may be that the extension has not been updated to 0.91 yet, which would cause it to not work with 0.91)

So, if you can, I would suggest you at least update to Inkscape 0.48.5, which fixes lots of bugs (but I guess you would have to compile from source in that case).

Here's a tutorial how to get the current 0.91 to your Ubuntu: http://ubuntuhandbook.org/index.php/2015/01/upgrade-to-inkscape-0-91-ubuntu-14-04/ (but it may well break an outdated extension. Try to find out for which Inkscape version the extension was written by asking the person who authored it).

Kind regards,
 Maren

Revision history for this message
James Waldby (j13) said :
#3

Thanks Hachmann, that solved my question.