Too many heap sections

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
arcadian83
Posts: 3
Joined: Sat Apr 17, 2010 4:54 am

Too many heap sections

Postby arcadian83 » Sat Apr 17, 2010 5:09 am

Hi all,

I'm working with a somewhat large (1.4MB) .svg file. As it grew larger I started occasionally getting crashes with the message "Too many heap sections", usually upon changing the zoom level. I saved frequently and continued to add to it, but gradually the crashes became for frequent. Now at 1.4MB I cannot change the zoom level a single time without it crashing, nor can I perform other, simpler actions like hiding a layer or using "vacuum defs". This renders the file unusable.

Scouring the internet, I found that this appears to have to do with the garbage collection mechanic, but I could not find a solution anywhere.

I intend if possible to grow the image much larger. It makes heavy use of cloning patterned objects, might this be a problem?

Has anyone else encountered this problem, or know of a way to solve it?
Thanks in advance.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Too many heap sections

Postby brynn » Sat Apr 17, 2010 8:44 am

Image Welcome to our forums!

I can't speak to the heap sections or garbage collecting. But I'm curious why hiding layers or using vacuum defs makes the file "unusable"? Is it just the nature of the image that it can't be divided into layers? I definitely understand how that could be the case. Just don't understand how vacuum defs causes a problem? I can also see how vacuum defs just doesn't help, but making the file unusable is what I'm not getting.

You can probably find some discussions about this issue at Launchpad, the Inkscape bug tracker. I wouldn't be surprised if ~suv (one of our resident bug tracking experts) shows up and posts some links for you to specific bugs :mrgreen: You can also find some older discussions in the mailing list archives. But :oops: I seem to have lost my link to that website. However, this page contains all the info about joining the various mailing lists: http://inkscape.org/mailing_lists.php?lang=en (maybe a link to the archives is on that page?).

That is if you haven't already found these resources :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Too many heap sections

Postby ~suv » Sun Apr 18, 2010 3:51 pm

Bug #168914 in Inkscape: “Too many heap sections

According to one of the developers this problem should be solved or at least improved in the new development snapshot builds (0.47+devel) available from inkscape.modevia.com. Please be aware that these are unstable builds:
Since these are at the very shiny sharp bleeding edge of the current development process, there will be many bugs, inconsistencies, and unfinished parts. We do not consider these to be finished products ourselves, so please don't consider them to be that way either. These are here to provide executable versions of the current development process for testing for those people who wish to participate in open source and to be engaged with the development process. And to participate, we mean help us in debugging the beast.

arcadian83
Posts: 3
Joined: Sat Apr 17, 2010 4:54 am

Re: Too many heap sections

Postby arcadian83 » Mon Apr 19, 2010 2:56 pm

Thank you so much for your attention and help, brynn and ~suv. In the development snapshot there are no crashes! :)

But- it's much slower, and when I looked at my memory usage in the Windows task manager, it was using roughly 1GB of memory (for this 1.5MB file). Is this typical of a development snapshot?

Will this fix be available in a stable release in 0.48, or sooner? I'd like to share this file as a project with fellow online collaborators, but it would be inconvenient to have to ask them to use a dev snapshot.

Thanks again, I'm glad Inkscape has such a helpful community.

arcadian83
Posts: 3
Joined: Sat Apr 17, 2010 4:54 am

Patterns caused the slowness

Postby arcadian83 » Thu Apr 22, 2010 1:58 pm

I think I found the solution to my performance and to some extent crashing problems! :)

My file is a map composed of tiles, thousands and thousands of squares. The squares are largely clones of originals that are in the map legend. That they are clones is a good thing, they are fast and light and change with the original.

The problem was that the originals were patterns. Simple patterns composed of a flat color with the name of the type of tile on them, but patterns nonetheless. Upon removing the patterning, the performance improved dramatically, like night and day. I consider it a sacrifice to lose the patterns, because I wanted to be able to differentiate the tiles at a glance without having to memorize which color is which, but it's a sacrifice I'm willing to make for the project to remain scalable. Consider the fast rendering of cloned patterns my little addition to the wish-list. ;)

Along with the performance boost, I found that I no longer get the "Too many heap sections" error in the stable release, for now. Memory-intensive operations like exporting to a gigantic .png still cause it, and as the map grows it may return, but at least I know I can use the dev snapshot.

Oh, quick question: When de-patterning, I noticed that some of my clones no longer descended from their root ancestor. I think this was caused by an ancestor in the middle being deleted. Is there a way to prevent such disconnection, like making the grandparent the new parent upon the parent's deletion? Or even reconnect an already disconnected clone?

Thanks again!

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Too many heap sections

Postby flamingolady » Tue Aug 24, 2010 2:04 pm

Arcadian -just wanted to say that I am getting the 'too many heap sections' msgs too, and I haven't done any vacuuming of defs. I'm not even sure what a heap section is, but it is happening far too often. I don't really have an answer for you, but here's what I do now. I ended up grouping some of my objects once done with that part of the drawing (e.g. was making a person and I grouped together the arms and legs and placed them on one layer). Then when the file started crashing too frequently I opened a new file and moved just the grouped items over, but, I still keep an ungrouped file if I ever need to make changes. Another trick is to export some layers that you know are finished as a bitmap file, open the bitmap and use it, that makes the file smaller. Again, make a new file, so you can still make changes if needed. So, now I have 2 or 3 files per drawing, I name then accordingly, e.g. 'teen character 1 grouped.svg', 'teen arms and legs 1 in layers.svg', 'teen arms.png', or 'teen finished drawing 1.svg'.
I am so hoping the makers can make some changes to this issue too.
dee


Return to “Discuss Software Issues”