Too many heap sections

Bug #444940 reported by Anthony Jacobs
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

Hello. when I import a large ai file into Inkscape and try to to ungroup it, I frequently get the error 'Too many heap sections' and the program then crashes. Please help!

Revision history for this message
Pablo Trabajos (pajarico) wrote :

Possible duplicate of bug #168914. Please attach the .AI file.

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Pablo Trabajos (pajarico) wrote :

And state what inkscape version are you using.

Revision history for this message
Anthony Jacobs (anthony-jacobs) wrote :

Palblo, I am using version 0.47, but 0.46 does just the same on another computer. I have attached the ai file. Many thanks for your swift reply. Anthony Jacobs.

Changed in inkscape:
status: Incomplete → New
Revision history for this message
Pablo Trabajos (pajarico) wrote :

Confirmed on Win XP SP3, 0.47pre3. It takes several minutes to see the preview window, after hitting ok it takes many minutes to load taking a lot of RAM (1GB when I killed inky from the task manager).

Changed in inkscape:
status: New → Confirmed
tags: added: crash
Revision history for this message
Pablo Trabajos (pajarico) wrote :

Illustrator opens the file without problem.

Revision history for this message
kimmyp (kimpaley) wrote :

I had the same problem on Windows Vista with 0.46.

Revision history for this message
su_v (suv-lp) wrote :

Loading the file with Inkscape 0.46+devel r22413 on OS X 10.5.8 (2MB RAM, 2.4 GHz C2D) took about 5 minutes CPU time, but Inkscape didn't crash. Ungrouping the two main groups again took several minutes but no crash. After saving the file as Inkscape SVG (blows up to 37.5 MB) it opens much faster but still with heavy memory needs and performance issues.

Looking at the structure of the two contained drawings (2 color variations of the same theme), I think Inkscape and SVG are not (yet) the adequate tools to handle such files and should not be advertised to be so - as long as there are no gradient meshes or diffusion curves in the SVG spec. At least it is my understanding that the complexity of the imported PDF is caused by 'translating' any gradients into simulated SVG meshes compounded by hundreds of paths for each shade, grouped and clipped several times, with different levels of opacity(!) applied to groups and/or paths. Looking at the wireframe drawing there seems to be hardly an element that doesn't have at least one clipping mask - which multiplies the complexity, rendering time and file size of the highly detailed drawing.

Revision history for this message
su_v (suv-lp) wrote :

partial screen-shot (ca. 30% or less) of one of the two designs in the drawing (normal and outline mode)

Revision history for this message
Anthony Jacobs (anthony-jacobs) wrote :

It certainly seems that Inkscape on the Mac handles ai files better than Inkscape on a Windows machine. I wonder if Inkscape will ever be able to smoothly handle such incredibly complex ai files? It seems the problem lies in the conversion process. Perhaps a super-fast computer with 4gb or more of ram might help. I have a dual core machine with 2gb and this is insufficient for this conversion process.

Revision history for this message
su_v (suv-lp) wrote :

Can you split up the original drawing in two in AI? Could be that smaller files can be handled better on win32 as well. The import looked visually correct to me (I can't compare with the original in AI), so it might be worth a try.

But it meant a lot of patience (no clicks, just waiting until Inkscape finishes one task), zooming and panning are sloow, and editing is difficult because in the end most objects are composed of small patches (paths with 4 nodes). Shapes and gradient information are visually preserved but can't be edited with the correspondent tools in Inkscape.

I don't know when the resulting (SVG) structure is created (AI's PDF, poppler import, Inkscape/Cairo, …) - maybe an expert will shed some light on this and can pinpoint where Inkscape needs improvement to better handle and edit these imported drawings (without crash).

Revision history for this message
Anthony Jacobs (anthony-jacobs) wrote :

The problem with splitting the original file in two with AI is that I and most other people can't afford Illustrator. In any case, having to buy Illustrator for this purpose rather negates the whole philosophy behind Inky. A simple solution would be for artwork creators to release their work in smaller sized files, so that Inkscape can cope with them. Realistically, this probably will not happen! Personally, I can cope with the slowness (time to make a cup of tea!) but the crashing is frustrating.

su_v (suv-lp)
tags: added: performance
Revision history for this message
su_v (suv-lp) wrote :

I was trying to 'split' the document or reduce it to one half of the included designs so you could test for a 'reasonable' size limit on win32, but so far I ran out of patience ;-) Moving parts like single objects or small groups to a new (hidden) layer takes 30 to 90s, just changing between layers lags considerably, …

There's an another AI file attached to bug #429824 you could use to test Inkscape's performance on win32. The report in 429824 describes a similar issue with big SVG files created by Illustrator - see bug #429824 comment 3 and 6.
<http://launchpadlibrarian.net/31853822/P-kawa2.svg> (1.7 MiB, image/svg+xml)

Revision history for this message
su_v (suv-lp) wrote :

Another similar report, interestingly there the original EPS file created by Illustrator was better handled on import than a converted PDF document (using an online converter for EPS -> PDF):
bug #427003 “Fatal error in gc crash on save”

su_v (suv-lp)
tags: added: win32
Revision history for this message
Rafał Rudzik (rrudzik) wrote :

I have a svg file with over 2 000 000 tags. I can not open it ...

Revision history for this message
Rose-g (rose-g) wrote :

If I open a 20MB svg file on a systems with 8GB RAM (or less) and try to save the file as png inkscape crashes with:

rose@moose:/home/rose/Txt/projects/Diffusion_equation/Report/Scripts/Results(10)$ inkscape diffusion_simulation_2d_10.964782_fltk.svg
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.
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
rose@moose:/home/rose/Txt/projects/Diffusion_equation/Report/Scripts/Results(11)$ cat /proc/meminfo
MemTotal: 8182540 kB
MemFree: 5935432 kB
Buffers: 73756 kB
Cached: 326428 kB
SwapCached: 4572 kB
Active: 550460 kB
Inactive: 971372 kB
Active(anon): 384888 kB
Inactive(anon): 747960 kB
Active(file): 165572 kB
Inactive(file): 223412 kB
Unevictable: 136 kB
Mlocked: 32 kB
SwapTotal: 33575840 kB
SwapFree: 33540216 kB
Dirty: 52 kB
Writeback: 0 kB
AnonPages: 1117252 kB
Mapped: 88076 kB
Shmem: 11092 kB
Slab: 549592 kB
SReclaimable: 509512 kB
SUnreclaim: 40080 kB
KernelStack: 3752 kB
PageTables: 40064 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 37667108 kB
Committed_AS: 2690148 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 131088 kB
VmallocChunk: 34359582704 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 91008 kB
DirectMap2M: 8296448 kB
rose@moose:/home/rose/Txt/projects/Diffusion_equation/Report/Scripts/Res

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Rose,

Which version of libgc do you have? This is probably a duplicate of bug #168914 and should be fixed with libgc >= 7.1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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