inkscape crashes when making svg nested elements

Bug #587897 reported by pkbrister on 2010-05-31
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Johan Engelen

Bug Description

Kubuntu 9.10
Inkscape 0.47

Whenever a nested <svg> has an 'x' or 'y' attribute different from zero (ie. its displaced from the origin), the program crashes with "inkscape encountered an internal error and will now close".

Same thing happens both when trying to open a file with such characteristic or when trying to make it inside the program.

The output of my gdb:

(gdb) run "/home/nacho/Juego web/aventura.svg"
Starting program: /usr/bin/inkscape "/home/nacho/Juego web/aventura.svg"
[Thread debugging using libthread_db enabled]
[New Thread 0xb59e4b70 (LWP 9059)]
inkscape: /usr/include/boost/optional/optional.hpp:588: typename boost::optional_detail::optional_base<T>::pointer_type boost::optional<T>::operator->() [with T = Geom::D2<Geom::Interval>]: Assertion `this->is_initialized()' failed.

Program received signal SIGABRT, Aborted.
0x0012d422 in __kernel_vsyscall ()
(gdb) bt

#0 0x0012d422 in __kernel_vsyscall ()
#1 0x019884d1 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0x0198b932 in *__GI_abort () at abort.c:92
#3 0x01981648 in *__GI___assert_fail (assertion=0x86dfe98 "this->is_initialized()", file=0x86e03bc "/usr/include/boost/optional/optional.hpp", line=588,
    function=0x87ed720 "typename boost::optional_detail::optional_base<T>::pointer_type boost::optional<T>::operator->() [with T = Geom::D2<Geom::Interval>]")
    at assert.c:81
#4 0x085529b1 in ?? ()
#5 0x08107994 in ?? ()
#6 0x080f6b76 in ?? ()
#7 0x08107994 in ?? ()
#8 0x080f6b76 in ?? ()
#9 0x081186ae in ?? ()
#10 0x08107994 in ?? ()
#11 0x080f6b76 in ?? ()
#12 0x081186ae in ?? ()
#13 0x08107994 in ?? ()
#14 0x080f6b76 in ?? ()
#15 0x081186ae in ?? ()
#16 0x08107994 in ?? ()
#17 0x0808dce1 in ?? ()
#18 0x0808dd27 in ?? ()
#19 0x0809299f in ?? ()
#20 0x08092ed7 in ?? ()
#21 0x081911e1 in ?? ()
#22 0x00e5c9fc in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#23 0x00e4f072 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#24 0x00e647a8 in ?? () from /usr/lib/libgobject-2.0.so.0
#25 0x00e65b2d in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#26 0x00e65fb6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#27 0x007fa88a in gtk_button_clicked () from /usr/lib/libgtk-x11-2.0.so.0
#28 0x007fbea8 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#29 0x00e5c9fc in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#30 0x00e4d6f9 in ?? () from /usr/lib/libgobject-2.0.so.0
#31 0x00e4f072 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#32 0x00e640b0 in ?? () from /usr/lib/libgobject-2.0.so.0
#33 0x00e65b2d in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#34 0x00e65fb6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#35 0x007fa92a in gtk_button_released () from /usr/lib/libgtk-x11-2.0.so.0
#36 0x007fa963 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#37 0x008ba474 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#38 0x00e4d6f9 in ?? () from /usr/lib/libgobject-2.0.so.0
#39 0x00e4f072 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#40 0x00e6449e in ?? () from /usr/lib/libgobject-2.0.so.0
#41 0x00e659b8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#42 0x00e65fb6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#43 0x009d695e in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#44 0x008b2c20 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#45 0x008b3ea9 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#46 0x00b9365a in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#47 0x00ecee88 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#48 0x00ed2730 in ?? () from /lib/libglib-2.0.so.0
#49 0x00ed2b9f in g_main_loop_run () from /lib/libglib-2.0.so.0
#50 0x008b4419 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#51 0x002fb5e7 in Gtk::Main::run_impl() () from /usr/lib/libgtkmm-2.4.so.1
#52 0x002fb3e2 in Gtk::Main::run() () from /usr/lib/libgtkmm-2.4.so.1
#53 0x0808863b in ?? ()
#54 0x08164f9a in ?? ()
#55 0x08087ac2 in ?? ()
#56 0x01974b56 in __libc_start_main (main=0x80876f0, argc=2, ubp_av=0xbffff434, init=0x86dfd60, fini=0x86dfd50, rtld_fini=0x11dd20 <_dl_fini>,
    stack_end=0xbffff42c) at libc-start.c:220
#57 0x08086b71 in ?? ()

Related branches

su_v (suv-lp) on 2010-06-01
tags: added: crash svg
su_v (suv-lp) wrote :

Can you attach a sample file that crashes Inkscape? Did you create the nested SVG nodes in Inkscape's XML Edior or with an external text or XML editor?

Note: Inkscape does not fully support nested <svg> elements [1], but it should not crash when trying to read a file with unsupported SVG structure.

[1] <https://bugs.launchpad.net/inkscape/+bug/167229/comments/1>

Changed in inkscape:
importance: Undecided → High
pkbrister (pkbrister) wrote :

It makes no difference if the nested <svg> is generated externally or throught the XML editor in inkscape. If both attributes in the attached file are set to zero inkscape will open the file. If I try then to change it inside the XML editor it will crash.

su_v (suv-lp) wrote :

reproduced with Inkscape 0.47+devel r9462 on OS X 10.5.8:
Inkscape crashes as early as selecting "nested SVG.svg" in the file chooser.

no crash after changing
     x="200"
to
     x="0"
before opening the file.

Changed in inkscape:
status: New → Confirmed
su_v (suv-lp) wrote :

Other SVG viewers (tested with Squiggle (Batik 1.7), Firefox 3.5.9, Safari 4.0.5, Opera 10.53 and rsvg-view 2.26.2) open the file without error.

Johan Engelen (johanengelen) wrote :

Fixed it. (but the fix is in code only for ellipses, are other objects crashing aswell?) (r9844)

Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
status: Confirmed → Incomplete
Johan Engelen (johanengelen) wrote :

Changed bug status to Incomplete, please check whether the bug is gone now.

su_v (suv-lp) wrote :

Crash no longer reproduced with Inkscape 0.48+devel r9854 on OS X 10.5.8

Files tested:
<https://bugs.launchpad.net/inkscape/+bug/587897/+attachment/1411675/+files/nested%20SVG.svg>
<https://bugs.launchpad.net/inkscape/+bug/496756/+attachment/1071909/+files/496756-PlanetCute.xaml>
<https://bugs.launchpad.net/inkscape/+bug/597112/+attachment/1432622/+files/svg-2.svg>

> are other objects crashing as well?
- The file from duplicate bug #597112 uses <circle>, <rect> and <text> objects and no longer crashes with r9854.
- The XAML file from duplicate bug #496756 when imported to Inkscape (and saved as SVG) also includes several basic SVG types (<ellipse>, <rect>, <path>) and no longer crashes with r9854.

su_v (suv-lp) wrote :

inkscape trunk: r9844
inkscape 0.48.x: r9695

Changed in inkscape:
assignee: Johan Engelen (johanengelen) → nobody
milestone: none → 0.48.1
status: Incomplete → Fix Committed
su_v (suv-lp) wrote :

reverting unintentional assignment change (sorry).

Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
jazzynico (jazzynico) on 2011-03-05
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers