Before updating to Windows 10 you may need to return your Pro license. More information here

Is there any solutions for "Too many heap sections" fatal error in gc

Hi, m working on a module where in m recording the behavior of game objects. But during recording m getting this error and it hangs the application. Plz help me to solve this issue. I am using Unity 3.5

more ▼

asked Jun 14, 2012 at 06:52 AM

avatar image

0 58 44 45

Wait, my crystal-ball says: .... not enough information


I guess you create way too much objects or something like that... But you give almost no information. No code, no pc specs, no memory usage. How should we answer this question?

clear and specific questions

Jun 14, 2012 at 06:54 AM Bunny83

Ok,, actually i have some 12 characters(all are human kind characters) and a camera. I Have attached character controller to all these characters. I have given waypoints to every characters through which they will walk on the terrain. All these characters are having some set of animations. Characters will walk, run, crouch based on the logic i have written. when i run my application without recording every thing will work nice for me,, but when i start recoding i ll get this error.

Jun 14, 2012 at 07:32 AM sanj042

@sanj042 Again, not enough information.

It is obvious that your issue is related to the recording. But you gives information on everything except recording!

Jun 14, 2012 at 07:51 AM Kryptos

We have battled the too many heap sections alot and multiple times. It always comes back to our code never releasing object references... so the Garbage Collector cannot release memory.... so we run out of memory when mono tries to allocate heap memory.

When you record information ... do you store the recorded data in memory? If yes, try instead to dump data into a file, clear your data references and call the Garbage Collector.

Please note that you can observe mono heap size (both used and total).

Kind Regards, /Keld

Jun 17, 2012 at 09:48 PM keld-oelykke

So what are you using to "record"? Is it buffering to a disk file or "recording" in memory? What is it recording? Screen captures could get very big very fast for instance.

Jun 17, 2012 at 09:51 PM whydoidoit
show all comments (comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jun 14, 2012 at 06:52 AM

Seen: 3023 times

Last Updated: Jul 07 at 02:04 AM