Inkscape requires large-config support in libgc

Bug #168914 reported by Joveres on 2007-09-27
130
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Alex Valavanis
Inkscape Devlibs
Critical
Krzysztof Kosinski
inkscape (Debian)
Fix Released
Unknown
inkscape (Ubuntu)
Medium
Unassigned
libgc (Debian)
Fix Released
Unknown
libgc (Ubuntu)
Medium
Unassigned

Bug Description

When opening a svg-file of about 22 MB
(http://www.xs4all.nl/~overes/svg.zip) Inkscape gives the following error:
Fatal error in gc
Too many heap sections

gdb output:
Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c901231 in ntdll!DbgUiConnectToDbg () from ntdll.dll

gdb bt:
#0 0x7c901231 in ntdll!DbgUiConnectToDbg () from ntdll.dll
#1 0x00daa23c in intl!bind_textdomain_codeset ()
#2 0x0112a6f5 in intl!bind_textdomain_codeset ()
#3 0x00800001 in intl!bind_textdomain_codeset ()
#4 0x00003000 in ?? ()
#5 0x00000040 in ?? ()
#6 0x00000000 in ?? () from
#7 0x00800000 in intl!bind_textdomain_codeset ()
#8 0x0023eb08 in ?? ()
#9 0x00da8000 in intl!bind_textdomain_codeset ()
#10 0x00800000 in intl!bind_textdomain_codeset ()
#11 0x00000001 in ?? ()
#12 0x00000092 in ?? ()
#13 0x0000003c in ?? ()
#14 0x00000092 in ?? ()
#15 0x00000000 in ?? () from
#16 0x0023eb18 in ?? ()
#17 0x00dac9cc in intl!bind_textdomain_codeset ()
#18 0x00000092 in ?? ()
#19 0x00000001 in ?? ()
#20 0x0023eb08 in ?? ()
#21 0x00000001 in ?? ()
#22 0x00000001 in ?? ()

w32 Inkscape0709251607.7z

inkscape.exe -z -w 8192 -h 256
--export-area=0.000000:850.354267:878.910000:877.785049
--export-png="img.png" "z17.svg"

If have no idea of this is also occurring on other platforms, maybe someone
can test it.

Related branches

Joveres (joveres) wrote :

Originator: YES

File Added: gdbbtoutput.txt

Originator: NO

mental, please have a look at this gc error

Mental-users (mental-users) wrote :

Originator: NO

Sounds like libgc in the Win32 lib bundle needs to be compiled with
LARGE_CONFIG defined.

c.f.
http://osdir.com/ml/programming.garbage-collection.boehmgc/2006-01/msg00006.html

vonHalenbach (lustik) on 2007-12-28
Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Scott (lscottgibson) wrote :

Has the change mentioned above been made? I get the same crash when trying to import a large 6MB pdf, that renders fine in the thumbnail view in the pdf import settings dialog. Please let me know.

atarian (atarian) wrote :

I have re-duplicated the "Too many heap sections" GCC error when opening above file with fresh SVN build under Windows XP w. SP/2. This has yet to be fixed, appearently.

pschonmann (pschonmann) wrote :

Im using inkscape to render tiles for Openstreetmap and ive got too many heap section too. There is some debug from cmdline. I use Inkscape 0.46+devel, built Apr 1 2008, WXP SP2 langusage CSY

G:\GPSaWardriving\Utility\tilesAtHome>tilesGen.pl
- Using working directory c:\temp\
- Inkscape version 0.46
- rendering using Osmarender/XSLT
- xmlstarlet version 1.0.1
- zip is present
going to use optipng
- Pngcrush version 1.6.4
- OptiPNG version 0.5.5
- Uploading with username "PetrS"
- Deleting ZIP files after upload
- Configured Layer: default
- Configured Layer: maplint
- Configured Layer: captionless
This is version 7329 (Poynton) of tilesgen running on MSWin32
[#1 0% jobinit] Doing tileset 1231,1513 (zoom 12) (area around 42.455879,-71.762695)
[#1 0% Preproc] Downloading: Map data for default,maplint,captionless to c:\temp\data-304596-1.osm
[#1 0% Preproc] Checking for UTF-8 errors in c:\temp\data-304596.osm...
[#1 100% default] Finished 1231,1513 for layer default
[#1 0% maplint] Rendering...
  The following command produced an error message:
   "F:\progra~1\inkscape\inkscape" -z -w 256 -h 256 --export-area=0.000000:0.000000:878.910000:878.628733 --export-png="C:\temp\304596\304596_part-pfJyDO.png" "c:\temp\output-304596-z12.svg" > C:\temp\304596-e9xDoa.stdout
  Debug output follows:
  |
  | ** (inkscape.exe:312664): WARNING **: Nebylo mo×nÚ nahrßt soubor chyb rozÜÝ°enÝ 'F:\Documents and Settings\fatbozz\Data aplikacÝ\Inkscape\extension-errors.log'
Additional info about the Error(s):

[#1 0% maplint] "F:\progra~1\inkscape\inkscape" -z -w 256 -h 256 --export-area=0.000000:0.000000:878.910000:878.628733 --export-png="C:\temp\304596\304596_part-pfJyDO.png" "c:\temp\output-304596-z12.svg" > C:\temp\304596-e9xDoa.stdout failed
[#1 0% maplint] Putting Job 1231,1513 back to server

svg2png failed

The following command produced an error message:
   "F:\progra~1\inkscape\inkscape" -z -w 256 -h 256 --export-area=0.000000:0.000000:878.910000:878.6
28733 --export-png="C:\temp\304596\304596_part-pfJyDO.png" "c:\temp\output-304596-z12.svg" > C:\temp
\304596-e9xDoa.stdout
  Debug output follows:
  |
  | ** (inkscape.exe:312664): WARNING **: Nebylo mo×nÚ nahrßt soubor chyb rozÜÝ°enÝ 'F:\Documents an
d Settings\fatbozz\Data aplikacÝ\Inkscape\extension-errors.log'

Additional info about the Error(s):

[#1 0% maplint] "F:\progra~1\inkscape\inkscape" -z -w 256 -h 256 --export-area=0.000000:0.000000:
878.910000:878.628733 --export-png="C:\temp\304596\304596_part-pfJyDO.png" "c:\temp\output-304596-z1
2.svg" > C:\temp\304596-e9xDoa.stdout failed
[#1 0% maplint] Putting Job 1231,1513 back to server

svg2png failed

djodjo (jduron) wrote :

What's new with this bug?? I have the same problem with Inkscape (version 0.46)

It seems the bug is not yet corrected??

Djo

tags: added: crash
Kjohrf (kjohrf) wrote :

I'm getting a "too many heap sections" crash on 0.47pre4 on Win XP. My SVG file is only about 300K.

It happens when sometimes when I group two objects together, or if I get that far, when I move the resulting group around.

The top-level group is generaly composed of these objects (each is a group itself):

Group 1: A group of about 150 tiles clones. Each is a sphere with no stroke.

Group 2: A group of about 35 objects. Most are simple rectanges with a patterns that I made. The pattern is a small rectangle with a grid of rectangular tiled clones. The grid is about 7 x 8 or so. Two of the objects in Group 2 are more complex objects that are groups themselves. Some of the objects in these groups have similar tiled clone patterns, or a moderately large number of (simple) objects.

If it doesn't crash, it often gets very close. Looks like libgc is using 130M or so, from the About Memory command.

Hope this helps.

linas (linasvepstas) wrote :

Has anyone tried using a newer version of the GC? Current ubuntu version is 6.8, but version 7.1 has been out for more than a year ... The source download page is

http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/

the GC itself is described at

http://www.hpl.hp.com/personal/Hans_Boehm/gc/

vietnam (vietnam-ro2005) wrote :

Nomebody have an answer for this ? I have a 2 Mb PDF (ex Dwg file ) that i cant open it with Inkscape portable or inkscape 0.47 because of the Too Many Heap Sections. I tried to Compile the binary for Windows, but this seems imposible because http://wiki.inkscape.org/wiki/index.php/Win32Port

    Patch The Source Code

    Using TortoiseSVN:

    Tortoise makes patching quite easy. Follow these steps;

    1. Find your patch. Windows Patches to the main SVN are now being kept in a folder under your main working directory called packaging\win32\patches. If you download or make a subsequent patch, put it in this directory to keep things orderly. It should be called {patchname}.patch or {patchname}.diff

The packaging\win32\patches folder does not exist.

I don`t want to use Autocad or other high end software to built an open source map of Romania. i want ot create a open source map with a open source program.

Changed in inkscape-devlibs:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Krzysztof Kosinski (tweenk)
Krzysztof Kosinski (tweenk) wrote :

With libgc 7.1 compiled with MinGW and this configure line:
./configure --enable-large-config --disable-shared --disable-threads --prefix=/c/devlibs-update
the file opens correctly, but trying to export it results in an out of memory error. This is different 0.47-3, which gives a "Too many heap sections" message box after a few minutes of pondering the file.

Krzysztof Kosinski (tweenk) wrote :

Should be fixed in devlibs r12.

Changed in inkscape-devlibs:
status: Confirmed → Fix Committed
Changed in inkscape:
status: Confirmed → Invalid
Changed in inkscape (Debian):
status: Unknown → Confirmed
Dave Gilbert (ubuntu-treblig) wrote :

I've triggered this on current Lucid; with a 60MB svg file from 'perf' timechart. inkscape 0.47.0-1ubuntu, libgc1c2 1:6.8-1.2ubuntu1

Dave

su_v (suv-lp) wrote :

Reverting status back to 'Confirmed' in Inkscape, because there are other platforms than Windows reporting the same error.

Changed in inkscape:
status: Invalid → Confirmed
Robert Saunders (veryrobert) wrote :

Using Kubuntu Lucid 10.04.
Rebuilding libgc1c2 with "-DLARGE_CONFIG" enabled DOES stop inkscape crashing with too many heap sections message (on my previously affected 43MB file).
The file now works as normal in Inkscape GUI.
However as Krzysztof Kosinski found in Windows, Inkscape still fails to export the file as bitmap from within the GUI. (A partial bitmap is created and then CPU load decreases as if the job was completed (and Inkscape export dialog closes the export in progress notification) but RAM use continued to steadily and slowly increase (3GB+) until I closed Inkscape.)
Export as bitmap from the command line DOES work as normal (although I have only tested this on the one file of mine mentioned).
For people wanting to try it:
Instructions for rebuilding libgc in Ubuntu, Debian and Gentoo are available at:
http://wiki.openstreetmap.org/wiki/Tiles@home/Install_Guide#Ubuntu_10.04_LTS
A more beginner-friendly version of the above (just for Lucid) is at:
http://veryrobert.com/2010/08/12/how-to-compile-libgc-on-ubuntu-re-inkscape-heap-sections-crash/

Wolfgang Glas (wglas) wrote :

Wouldn't it be nice, if the ubuntu guy updated their libgc1c2 in order to be compiled with "-DLARGE_CONFIG" ?

This way inkscape would simply work for most users, not even thos beeing familiar with build tools.

Alternatively, some could provide for a "-DLARGE_CONFIG"-version in a PPA in the meanwhile.

  Regards, Wolfgang

Krzysztof Kosinski (tweenk) wrote :

I think this issue might go away when I merge my Cairo rendering branch, because we won't be using libgc for pixblock allocation any more then.

Changed in inkscape-devlibs:
status: Fix Committed → Fix Released
Changed in inkscape:
assignee: Ishmal (ishmal) → nobody
Alex Valavanis (valavanisalex) wrote :

I see this bug in inkscape_0.48.0-1ubuntu1.1, with libgc_1:6.8-1.2ubuntu2 in Ubuntu Maverick.

@Krzysztof - It looks like you fixed this for windows users by patching gc in devlibs (r12). Can anything be done in Inkscape to avoid triggering this problem for linux users? If not, I guess we'll need to make sure that the libgc package has LARGE_CONFIG defined.

ruru (ruru) wrote :

Just got this error opening a 46.7 MB svg. Same system specs as previous poster.

Changed in inkscape (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in libgc (Ubuntu):
status: New → Confirmed
Changed in libgc (Debian):
status: Unknown → New
summary: - Too many heap sections
+ Inkscape requires large-config support in libgc
Changed in libgc (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Changed in libgc (Debian):
status: New → Unknown
Changed in libgc (Debian):
status: Unknown → Confirmed
Alex Valavanis (valavanisalex) wrote :

Upgrading to the latest Debian/Ubuntu libgc package version (libgc1c2_7.1-7) fixes this problem. As far as I can tell, the package was not compiled with large-config support, so I guess that the fix has come from the default settings in upstream libgc.

I have tested this with the SVG files from the bug description and comment #6.

Changed in inkscape (Ubuntu):
status: Triaged → Fix Released
Changed in libgc (Ubuntu):
status: Triaged → Fix Released
Alex Valavanis (valavanisalex) wrote :

@upstream - This bug is no longer an issue for Windows/Debian/Ubuntu users, following libgc updates. Is there anything that could be done in Inkscape itself to improve the situation for people with old versions of libgc? If not, I suggest marking this as invalid in Inkscape.

Changed in inkscape:
status: Confirmed → Incomplete
Alex Valavanis (valavanisalex) wrote :

Actually, "fixing" this problem in Inkscape should be as simple as bumping the version requirement of libgc to >=7.1. Is this likely to cause any problems for anyone?

Changed in inkscape (Debian):
status: Confirmed → Fix Released
Changed in libgc (Debian):
status: Confirmed → Fix Released
Alex Valavanis (valavanisalex) wrote :

Setting this to triaged: it should be fixed eventually on all platforms by bumping the libgc version dependency.

Changed in inkscape:
status: Incomplete → Triaged
su_v (suv-lp) wrote :

> "fixing" this problem in Inkscape should be as simple as bumping
> the version requirement of libgc to >=7.1. Is this likely to cause
> any problems for anyone?

@Alex - this question came up yesterday on irc (whether to close this report or not), and kaeso has added the dependency to
<http://wiki.inkscape.org/wiki/index.php/Tracking_Dependencies>.

|23:25| < kaeso> regarding <https://bugs.launchpad.net/inkscape/+bug/168914>, should we bump libgc requirements or mark it invalid as a packaging issue?
|23:31| < su_v> kaeso: maybe add dep to <http://wiki.inkscape.org/wiki/index.php/Tracking_Dependencies> first and check version/status on various distros?
|23:33| < su_v> (note: I don't know what or how Inkscape currently checks or requires for libgc)
|23:38| < kaeso> su-v: >= 6.4

Alex Valavanis (valavanisalex) wrote :

Looks like it would affect quite a few distros if we bumped to 7.1 :-s

Luca Bruno (lucab) wrote :

Sorry for the delay, I was still updating the table.
It looks like bumping libgc would impact Debian stable plus Ubuntu 10.x and 11.04.
I'd say we'd better wait some time (eg. 2013) to update our dependency.

Daniel Thomas (drt24) wrote :

I am getting this problem on Ubuntu 12.04.1 with libgc1c2 version 1:7.1-8ubuntu0.12.04.1 it looks to be happening when inkscape needs to use more than 8GB to render the file (a 40MB svg) (which should be fine, the VM has 16GB).

[snip many of the following]
** (inkscape:19363): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 16384):
 May lead to memory leak and poor performance.

Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS

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.

Alex Valavanis (valavanisalex) wrote :

Can I propose bumping the libgc version requirement to 7.1 in trunk now? The only tracked distros that would be affected are Debian Stable and Ubuntu Lucid, which are already unsupported for trunk builds.

Martin Owens (doctormo) wrote :

Alex Valavanis - I say, fix this bug :-)

Luca Bruno (lucab) wrote :

This was fixed by @valavanisalex in r12155 and wiki already updated accordingly.
Both Debian and Ubuntu got newer stable/LTS with at least 7.1, so this won't be a problem.

Changed in inkscape:
status: Triaged → Fix Committed
milestone: none → 0.49
assignee: nobody → Alex Valavanis (valavanisalex)
rjaduthie (rjaduthie) wrote :

This problem has appeared on my system. The Boehm Garbage Collector (Boehm gc, libgc) is version 7.2d-r1. The OS I am using is Sabayon 13.10. Inkscape is at version 0.48.4-r1.

The operation I am attempting is the command line conversion of an SVG to an EPS. The SVG is 174.3 MB in size (yes, it's pretty big). When running from a instance of 'konsole' within the KDE desktop, the instance of Inkscape exits without any warning apart from "Killed". When running from an X Session, the message is:

"Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
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."

Another SVG of size 139MB manages to convert successfully (after a long wait).

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.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.