crash when operating on large eps data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned |
Bug Description
Inkscape crash when replicating attached EPS above 5 times (to create production mask). The issue repeats always with noticable memory consumption, but increasing swap space does not help. I am using port version of inkscape-0.48.0_3 on FreeBSD 8.2-RELEASE. Please advise as this blocks my work :-) Below is the gdb output. Because gdb tells something is wrong with the stack I also mark this as potential security issue.
Best regards,
Tomek Cedro
%gdb inkscape
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-
(gdb) run
Starting program:
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) q
%rm inkscape
%gdb inkscape | tee inkscape-
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-
(gdb) run
Starting program: /usr/local/
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New LWP 100150]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 2ae01140 (LWP 100150)]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 30a88300 (LWP 100231)]
[New Thread 30a88080 (LWP 100232)]
[New Thread 30a87540 (LWP 100233)]
[New Thread 30a87180 (LWP 100234)]
[New Thread 30a872c0 (LWP 100235)]
[Thread 30a88080 (LWP 100232) exited]
[Thread 30a872c0 (LWP 100235) exited]
[Thread 30a87180 (LWP 100234) exited]
[Thread 30a88300 (LWP 100231) exited]
[Thread 30a87540 (LWP 100233) exited]
[New Thread 30a88080 (LWP 100231)]
[New Thread 30a872c0 (LWP 100232)]
[New Thread 30a87180 (LWP 100233)]
[New Thread 30a88300 (LWP 100234)]
[New Thread 30a87540 (LWP 100235)]
[New Thread 4d19c0c0 (LWP 100236)]
[New Thread 4d19bf80 (LWP 100237)]
[New Thread 4d19bd00 (LWP 100238)]
[New Thread 4d19ba80 (LWP 100239)]
[New Thread 4d19be40 (LWP 100240)]
[Thread 30a872c0 (LWP 100232) exited]
[Thread 30a88080 (LWP 100231) exited]
[Thread 30a87540 (LWP 100235) exited]
[Thread 4d19bd00 (LWP 100238) exited]
[Thread 30a87180 (LWP 100233) exited]
[Thread 4d19bf80 (LWP 100237) exited]
[Thread 4d19c0c0 (LWP 100236) exited]
[Thread 30a88300 (LWP 100234) exited]
[Thread 4d19be40 (LWP 100240) exited]
[Thread 4d19ba80 (LWP 100239) exited]
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Program received signal SIGABRT, Aborted.
[Switching to Thread 2ae01140 (LWP 100150)]
0x2a63366b in thr_kill () from /lib/libc.so.7
(gdb) bt
#0 0x2a63366b in thr_kill () from /lib/libc.so.7
#1 0x2a5d9916 in pthread_kill () from /lib/libthr.so.3
#2 0x2a5d7393 in raise () from /lib/libthr.so.3
#3 0x2a6d66ca in abort () from /lib/libc.so.7
#4 0x2a536a10 in __gnu_cxx:
#5 0x2a53b21a in std::set_unexpected () from /usr/lib/
#6 0x2a53b262 in std::terminate () from /usr/lib/
#7 0x2a53b15a in __cxa_throw () from /usr/lib/
#8 0x2a58fcfe in operator new () from /usr/lib/
#9 0x080d4a20 in std::vector<char const*, std::allocator<char const*> >::_M_insert_aux ()
#10 0x08132bf0 in std::_List_
#11 0x08104260 in std::vector<char, std::allocator<
#12 0x08106a20 in std::vector<char, std::allocator<
#13 0x08104260 in std::vector<char, std::allocator<
#14 0x08106a20 in std::vector<char, std::allocator<
#15 0x08104260 in std::vector<char, std::allocator<
#16 0x080d26fb in std::vector<char const*, std::allocator<char const*> >::_M_insert_aux ()
#17 0x0860a79e in std::_Rb_tree<int, int, std::_Identity<
#18 0x08602aee in std::_Rb_tree<int, int, std::_Identity<
#19 0x080960e1 in std::list<
#20 0x0827e713 in Glib::PropertyP
#21 0x29a10db3 in g_closure_invoke () from /usr/local/
#22 0x29a2791b in g_signal_
#23 0x29a290b1 in g_signal_
#24 0x294291d1 in gtk_signal_emit () from /usr/local/
#25 0x0862c926 in std::operator+
#26 0x0862cbb7 in std::operator+
#27 0x0827e97c in Glib::PropertyP
#28 0x29a0f677 in g_value_
#29 0x29a10db3 in g_closure_invoke () from /usr/local/
#30 0x29a27cd9 in g_signal_
#31 0x29a290b1 in g_signal_
#32 0x294291d1 in gtk_signal_emit () from /usr/local/
#33 0x081e5340 in std::vector<double, std::allocator<
#34 0x081e7ee2 in std::vector<double, std::allocator<
#35 0x2929c094 in gtk_marshal_
#36 0x29a0f677 in g_value_
#37 0x29a10db3 in g_closure_invoke () from /usr/local/
#38 0x29a27cd9 in g_signal_
#39 0x29a290b1 in g_signal_
#40 0x29a29665 in g_signal_emit () from /usr/local/
#41 0x293c3126 in gtk_widget_
#42 0x29294bfe in gtk_propagate_event () from /usr/local/
#43 0x29296082 in gtk_main_do_event () from /usr/local/
#44 0x2957c49a in gdk_add_
#45 0x29a91969 in g_main_
#46 0x29a94ee6 in g_main_
#47 0x29a95227 in g_main_loop_run () from /usr/local/
#48 0x29296504 in gtk_main () from /usr/local/
#49 0x28b59937 in Gtk::Main::run_impl () from /usr/local/
#50 0x28b59722 in Gtk::Main::run () from /usr/local/
#51 0x0808c674 in ?? ()
#52 0x08182831 in sigc::visit_
#53 0x08089f3d in ?? ()
#54 0x08089197 in ?? ()
#55 0x00000001 in ?? ()
#56 0xbfbfeb70 in ?? ()
#57 0xbfbfeb78 in ?? ()
#58 0xbfbfeb50 in ?? ()
#59 0xbfbfeb6c in ?? ()
#60 0x00000000 in ?? ()
#61 0xbfbfeb68 in ?? ()
#62 0x08089108 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(gdb)
tags: | added: crash performance |
The EPS files imports with an (sorry for the wording) with an enormous bloat due to the dense hatching with individual horizontal lines so dense that it looks like a solid filling at zoom level 1:1).
Importing 5 such EPS files (just a single import of the file you attached, saved as SVG, has a file size of 15.9 MB and contains 55'517 paths) is very likely to exceed Inkscape's capacity or exhaust available memory and crash in the end with a memory error.
Duplicating or even cloning the group multiple times (i.e. a single EPS file imported into an empty Inkscape document instead of repeated imports, and then cloned (Alt+D) and laid out as needed for the "production mask") will not greatly improve the situation AFAICT (if you actually only need several copies of the same design on one sheet without editing each imported design individually):
With a single imported file and 5 clones of the top-level group (~333'100 paths to render, even though file size will no grow significantly beyond the 15.9MB since clones are single objects linking to the original without replicating its SVG structure in the file), Inkscape 0.48.2 on Mac OS X 10.5.8 (i396) with 2GB RAM consumes so much of the available memory that the whole system slows down close to a stand still, and even very basic operations in Inkscape can take minutes before the screen updates. I didn't see Inkscape crash due to memory-related issues (though I did force quit it since I needed to continue working with other applications).
With current trunk (new cairo renderer and rendering cache) performance has improved, but with 8 clones of a single imported EPS file, the memory consumption of Inkscape is getting as huge, and operations in Inkscape (in outline view mode) are still very slow (tested with revision 10588, because later revisions will not handle such a large amount of stroked paths well at the moment).
Additionally, since you seem to use an older version of Inkscape (0.48.0) on linux, it is possible that you are affected by /bugs.launchpad .net/inkscape/ +bug/168914>
Bug #168914 in Inkscape: “Inkscape requires large-config support in libgc”
<https:/
> Please advise as this blocks my work (…)
Possibly you need to consider using a real CAD application (which Inkscape does not aim nor claim to be), or - with regard to generating the original EPS file - you could test whether not using such dense hatching with closely spaced horizontal lines (using solid filled areas instead) will improve the handling in Inkscape (unless ofc those lines are an integral part of the design and not intended to imitate a solid fill).