Out of memory crash while importing large pdf

Bug #367779 reported by craigleat on 2009-04-27
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ujjwala Potluri

Bug Description

Running Inkscape r21233 (self compiled) on Ubuntu 7.10
gc 6.8
cairo 1.8.6
poppler 0.10.6
glib 2.20.1

App crashes while importing a PDF with a large bitmap. PDF is 110Mb.

I watched the memory usage during the import and inkscape gobbles up nearly 2Gb of RAM.

I could put the PDF on a ftp server. Let me know if there is anyone interested in testing.

$ ulimit -d

Back trace is attached.

craigleat (craig-leat) wrote :
theAdib (theadib) wrote :

Please could you provide the svg and the image that crashes inkscape?

tags: added: cairo crash exporting pdf
Changed in inkscape:
importance: Undecided → High
milestone: none → 0.47
status: New → Triaged
tags: added: import poppler
removed: cairo exporting
summary: - Out of memory crash
+ Out of memory crash while importing large pdf
theAdib (theadib) wrote :

Sorry, I mean the pdf that crashes while importing. If you can not push to Launchpad, do you have a ftp service?

craigleat (craig-leat) wrote :

To reproduce the crash do the following:

1. Start a new drawing
2. Set document properties to A2 landscape
3. Import the attached file: A2 Test map.pdf
4. Leave PDF import settings at the default values and click OK
5. Wait several minutes and Inkscape crashes

craigleat (craig-leat) wrote :

I have attached another smaller PDF map generated by a different app (Ghostscript). Opening the PDF crashes Inkscape, this time with a polite dialog stating that Inkscape has suffered an internal error. The terminal output seems the same: "GC Warning: Out of memory!"

craigleat (craig-leat) wrote :

I finally managed to create a PDF that Inkscape will open by removing entities from the original map. I also managed to save the PDF as an Inkscape SVG. However, Inkscape still crashes while working with this SVG.

Terminal output:
$ ./inkscape

** (inkscape:6627): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
        May lead to memory leak and poor performance.

** (inkscape:6627): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
        May lead to memory leak and poor performance.

** (inkscape:6627): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
        May lead to memory leak and poor performance.

** (inkscape:6627): 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 document locations:
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.
Aborted (core dumped)

tags: added: importing
removed: import
su_v (suv-lp) on 2009-10-05
tags: added: performance
ScislaC (scislac) on 2009-11-24
Changed in inkscape:
milestone: 0.47 → none
jazzynico (jazzynico) wrote :

Reproduced on WIndows XP, Inkscape 0.48.2 and trunk revision 10923.

Steven (t-mail-p) wrote :

This svg crashes Inkscape 0.48.4 r9939

Win7 64bit
4gig ram

Frank Niemann (3-info-p) wrote :

Bug still around on Inkscape 0.48.4 running on Windows 7 (64 bit).

This 3MB file crashes:

File size, though, can't be the main issue, as this 7 MB file is imported without problems (though it takes a little while):


Furthermore, the issue can't be related to multi-page PDF. Importing the map on p.2 from the following 6 MB PDF works without problems


The map on p.9 of this 3 MB document, however, lets inkscape crash:


Finally, a case of an import that does not crash, but is displaying incompletely (background picture missing)

Import was always done using standard parameters (precision coarse/ 2.0; replace flow text by standard text, replace PDFfonts, embed pictures).

Changed in inkscape:
assignee: nobody → Ujjwala Potluri (ujjwalapotluri)

I tried the PDf file (20 MB size, filename "A2 Test Map.zip") on Windows 7 Home Premium (64 bit) with 8 GB RAM and it freezes Inkscape 0.91 64 bit.

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