GC gives a fatal error

Hi there,

I’ve encountered a crash (or freeze depending on your point of view) where unity throws a fatal error:
“GC Fatal Error”
“too many root set”

Then unity just freezes and doesn’t quit (with maxed out CPU usage). Have to end the process manually.

It’s the first time unity does that to me and I’m hoping it’s not related to my code/project too much… so what I’m asking is if anyone else got that error and if I should be searching for a problem or is it editor endemic and bad resource management ? (My project is quite big)

Relevant info:
Win Xp
4gb RAM
Unity 3.2 Pro

Thanks.

I have the same error.

Win 7
4gb RAM
Unity 3.2 Pro.

prèsque the same me too.

did you have it before in 3.1?

otherwise post a bug right now.

I got this error once (can’t remember if it was 3.1 or 3.2). I’m not sure what the circumstances were though.

same here…
happened the third time now. always between pressing play and the actual game start.

win7 64bit
unity 3.2 pro

got similar one about gc but about thread and my issue i think was because i was using an insane number of coroutine in parallele, so i i change the doing that and no more error

not sure for everybody else

anyway i dont remember got this doing same on 3.1

“GC Fatal Error”
“too many root set”

I’ve had this error 4/5 times since upgrading to 3.2.

Windows 7, 64 bit, Unity Pro.

I can actually reproduce this pretty consistently. I’m working on a project where I’m tweaking inputs and starting and stopping the editor embedded player repeatedly. After a number of cycles this error will be thrown consistently.

Restart Unity and it’s good for a number of runs after that, then it repeats.

Win7 x64

I don’t know if it happens repetitively after the first instance because when I get this error Unity Editor stops responding. I’ve tried waiting several minutes but it never recovers. I have to bring up the task manager and kill the Unity Editor task, loosing all unsaved work in the process. I save often, but even 10/15 mins of doing the same stuff over again is rather annoying.

Thankfully this doesn’t seem to happen too often. I’ve only encountered it about once a week.

Yeah, I was not clear on that; Unity is locked for me as well. It’s after I kill it and restart that I can repeat the error.

Same here : Fatal error in gc - Too many root sets.

Happens fequently when I have worked a long time ( about 3 hours ) in a project with extensive testing.
Looks like some buffer slowly fills up and gives me this message .

Only solution is to reset app and hoping you have saved the scene.

On win Unity 3.2 pro.

I have the same error, and found this thread via Google.

Mine comes about while working with System.Net.Sockets asynchronous calls. And only after a socket connection is established. What I’ve found, though, is that the error only shows up when running from within the Unity Editor. A build of the same project works fine. When the error message box shows up, I click OK, and Unity freezes. Task Manager shows the CPU usage as pegged for Unity.exe. I then have to “End Process.” One of our other developers is seeing the same behavior on his machine, so it isn’t just me.

The code I’m working with was developed on Unity 3.1 Pro, and worked just fine when run from the Editor. So, all fingers point at some change in 3.2’s garbage collection handling while running from the Editor. I need to reuse this code for a new project, so I may have to revert to 3.1 to keep a steady workflow.

Has anyone submitted this as a bug yet? Since the Unity bug tracker isn’t public, and therefore not searchable, we are left to rely on the forums for avoiding bug submission floods.

Unity 3.2 Pro
Windows XP SP3

Vote for it -

http://feedback.unity3d.com/forums/15792-unity/suggestions/1264705-public-searchable-bug-tracker?ref=title

Still, bug submission floods are likely what they want. The more reports the more likely it’ll get fixed.

Also, for things like this you should be looking it up in Mono’s bug tracker.

Unity saves scene to [projectdir]/Temp/_EditModeScene every time you press play. Yes, it makes no attempt to recover or even tell you about the file, and you can still lose unsaved Project changes. File is deleted as soon as you rerun Unity.

As to the error, I’ve had it even when not playing, just switching from MonoDevelop back to Unity.

I wouldn’t figure it to be a Mono bug, though, as it only happens (in my case, at least) while running from the Unity Editor. Once the project is built as a standalone executable, it works as expected. Makes me think that it is a problem with the Unity Editor. Unless it has to do with some kind of Release vs. Debug thing that I don’t know about.

And I voted for the public tracker.

Just updated to v3.3 hoping there would be some unmentioned fix for my situation in there somewhere. The problem persisted, though. Reverted to v3.1 and all is well again. Oh well.

Same problem here. I alt+tab alot between visual and Unity, and it always happens when I alt+tab back to Unity. Alt-tab triggers it for me, I do not even get start the game simulation.

Windows 7 64 bit, no service pack as of yet.
i7 860 @ 2.80Ghz. 8 GB RAM. ATI Radeon HD 5700.

I also get the error in 3.3… in the same circumstances, at about the same frequency, sometimes without the popup. :frowning:

Is it actually possible to go back to 3.1? Can it read projects from 3.3?