Always getting 'Fatal error in gc' Too many heap sections

Neko.exe gives me this error whenever I’m running a build from scratch for either neko or html5 output. It causes the build to fail. When I re-run it, the build successfully finishes. Although for html5, the swf set to generate=true does not get its classes generated. Not sure if these two are related.

I’m running windows 7 64-bit with 16GB of RAM. I saw a steam thread with a similar error and their solution was to increase a memory setting in windows. Mine however is already set to 20GB.

When neko crashes it has dedicated 800MB (private bytes) of memory and has requested 900MB (virtual size)

I’m no where near close to using up all my RAM. Any ideas? Using Neko 2.1.0

And just if anyone asks, I’m not creating anything in a loop, all I have is a small swf file with maybe 50 symbols and a main class that tries to load one of the symbols from the swf to the screen.

Sorry for the topic revival but I recently came into this issue (by launching the process swf command).

I had some classes exported from the swf (checked “export in frame 1”) and the issue occurred. As soon as I unchecked “export in frame 1” it works.

EDIT : no I’m wrong. It seems that I also removed a class from export. So there is no workaround by unchecking “export in frame 1”. This class is the problem. When I check “export for action script” for this particular MovieClip, the problem occurs.

I think we need to look at our SWF generation code, and make some optimizations to reduce the amount of memory it uses. I think it keeps all the generated bitmaps in memory before writing them all at the end, which I can see can be a problem for large SWFs (though I haven’t encountered it personally for some reason, even on very large projects)

So finally I found a fix on my FLA. I’ve just clean it a little (remove some useless keyframes and empty layers on the MovieClip that was the source of the bug).