Repeated allocations of large blocks and 'std::bad_alloc' crashes inkscape while opening SVG files and converting to PNG
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
High
|
Unassigned |
Bug Description
I am using ubuntu 10.10 [32-bit],
kernel 2.6.35-23-generic
inkscape 0.48,
I have 3gb of DDR2 ram, and 8.5gb swap.
I've tried several ways through inkscape to open an SVG file, [from Openstreetmap, 18mb - available at http://
at various points in my workflows and inkscape crashes.
Below are each of crashes and my described workflows.
*** When I open inkscape in the command line, the inkscape gui appears and after selecting the file [previews are turned off],
inkscape crashes before the file is opened and I receive the following output in the terminal [This output is also attached to this bugreport as "inkscape-error1":
WARNING **: GC Warning: Repeated allocation of very large block (appr. size 28672):
May lead to memory leak and poor performance.
GLib-ERROR **: /build/
aborting...
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.
Segmentation fault
**** I then decided to try to open inkscape without going through the command line, through my gnome desktop menu.
After opening the svg file, inkscape is not response for over 60 seconds, however, the file appeared on the screen.
When I try to export a bitmap [through the export bitmap menu] the export bitmap menu appears and I am able to select the parameters [the size, dpi, etc], but upon clicking on export, a small textbox
appears 'Inkscape encountered an internal error and will close now.' and inkscape crashes.
*****
Next, I decided to open inkscape through gdb. Inkscape's gui appeared. I opened the svg in the open menu and the window no longer responded.
I have attached the output from gdb as 'inkscape-error2. The output is also below:
gdb /usr/bin/inkscape
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://
Reading symbols from /usr/bin/
(gdb) run
Starting program: /usr/bin/inkscape
[Thread debugging using libthread_db enabled]
[New Thread 0xb4c33b70 (LWP 13393)]
[New Thread 0xb4432b70 (LWP 13394)]
[Thread 0xb4432b70 (LWP 13394) exited]
[New Thread 0xb4432b70 (LWP 13398)]
[New Thread 0xb3affb70 (LWP 13399)]
[New Thread 0xb32feb70 (LWP 13400)]
[Thread 0xb32feb70 (LWP 13400) exited]
[Thread 0xb3affb70 (LWP 13399) exited]
[Thread 0xb4c33b70 (LWP 13393) exited]
[Thread 0xb4432b70 (LWP 13398) exited]
[New Thread 0xb4432b70 (LWP 13410)]
[New Thread 0xb4c33b70 (LWP 13411)]
[New Thread 0xb3affb70 (LWP 13412)]
[New Thread 0xb32feb70 (LWP 13413)]
[New Thread 0xb2afdb70 (LWP 13414)]
[New Thread 0xb22fcb70 (LWP 13415)]
[New Thread 0xb1afbb70 (LWP 13416)]
[New Thread 0xb12fab70 (LWP 13417)]
[New Thread 0xb0af9b70 (LWP 13418)]
[New Thread 0xb02f8b70 (LWP 13419)]
[Thread 0xb4432b70 (LWP 13410) exited]
[Thread 0xb1afbb70 (LWP 13416) exited]
[Thread 0xb3affb70 (LWP 13412) exited]
[Thread 0xb02f8b70 (LWP 13419) exited]
[Thread 0xb0af9b70 (LWP 13418) exited]
[Thread 0xb32feb70 (LWP 13413) exited]
[Thread 0xb2afdb70 (LWP 13414) exited]
[Thread 0xb12fab70 (LWP 13417) exited]
[Thread 0xb4c33b70 (LWP 13411) exited]
[Thread 0xb22fcb70 (LWP 13415) exited]
[New Thread 0xb22fcb70 (LWP 13609)]
** (inkscape:13381): WARNING **: GC Warning: Out of Memory! Returning NIL!
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Program received signal SIGABRT, Aborted.
0x0012e416 in __kernel_vsyscall ()
(gdb) bt
#0 0x0012e416 in __kernel_vsyscall ()
#1 0x01c7c941 in raise () from /lib/libc.so.6
#2 0x01c7fe42 in abort () from /lib/libc.so.6
#3 0x01bdf055 in __gnu_cxx:
from /usr/lib/
#4 0x01bdcf35 in ?? () from /usr/lib/
#5 0x01bdcf72 in std::terminate() () from /usr/lib/
#6 0x01bdd0e1 in __cxa_throw () from /usr/lib/
#7 0x08275147 in ?? ()
#8 0x08117e9f in ?? ()
#9 0x0811521c in ?? ()
#10 0x081ac744 in ?? ()
#11 0x081a2b9b in ?? ()
#12 0x081a5370 in ?? ()
#13 0x081a2b9b in ?? ()
#14 0x081a5370 in ?? ()
#15 0x081a2b9b in ?? ()
#16 0x081a5370 in ?? ()
#17 0x081a2b9b in ?? ()
#18 0x081a5370 in ?? ()
#19 0x081a2b9b in ?? ()
#20 0x085d9128 in ?? ()
#21 0x081ca715 in ?? ()
#22 0x081cebbd in ?? ()
#23 0x081ca715 in ?? ()
#24 0x081cebbd in ?? ()
#25 0x081ca715 in ?? ()
#26 0x081ce479 in ?? ()
#27 0x081ce9ce in ?? ()
#28 0x00fd6841 in ?? () from /lib/libglib-
#29 0x00fd8855 in g_main_
#30 0x00fdc668 in ?? () from /lib/libglib-
#31 0x00fdcba7 in g_main_loop_run () from /lib/libglib-
#32 0x009201d9 in gtk_main () from /usr/lib/
#33 0x003073b7 in Gtk::Main:
#34 0x003071b2 in Gtk::Main::run() () from /usr/lib/
#35 0x0808542b in ?? ()
#36 0x0816ce2a in ?? ()
#37 0x0808485a in ?? ()
#38 0x01c68ce7 in __libc_start_main () from /lib/libc.so.6
#39 0x08083871 in ?? ()
*******
Lastly, I then tried to convert this SVG to png through the following command in the terminal: inkscape -d 300 -e output.png version2-draft2.svg
the output was the following [also has been attached as inkscape-error3 to this bugreport.
DPI: 300
Background RRGGBBAA: ffffff00
Area 0:0:11790.3:9592.56 exported to 39301 x 31975 pixels (300 dpi)
Bitmap saved as: output.png
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
May lead to memory leak and poor performance.
** (inkscape:12341): WARNING **: GC Warning: Out of Memory! Returning NIL!
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
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.
** Message: Error: Inkscape encountered an internal error and will close now.
Attaching the crash logs for reference.