- Home /
gc: too many threads, crash using Unity 4.2
When I work in the editor of the new Unity 4.2, the editor crashes pretty quickly with the error gc: too many threads. I can't find a specific action that causes this nor do I know what is actually the cause of this. I've never had any problems before (actually, in 3.5 Unity would crash frequently due to memory leaks, but not nearly as often as this). My system should be powerful enough and I don't notice Unity taking up an extreme amount of memory when this happens.
I have already tried removing and reinstalling Unity, but it did not help. Working on a different project also did not help.
I searched around a bit, but it does not seem like are many people suffering from this same problem.
Any suggestions?
Additional Information: Lenovo w520 Windows 7 x64
To be honest i've worked with a lot of different Unity versions (started with 2.6 i guess) and even on different hardware and OS and i never had an "unexpected" crash. Here at home i still have a quite old WinXP 32Bit dual core with 3GB memory and i've run all Unity versions (even at the same time) without any problems. At work i have a Win7 machine and never had a crash.
Too many threads sounds suspicious. Do you use any kind of threads in your game (explicit or implicit!)? A lot people are not aware of the fact that almost all "async" callbacks in .NET are implemented via a seperate thread.
You gave not much information about your project / system / ...
Does this also happen when you work in an "empty" project? Empty means really empty. No frameworks like NGUI, .... since they implement a lot editor features. It's difficult to track down such problems especially when you can't nail it down to a certain action / script / asset / component.
ps. I never experianced a crash due to a memory leak in Unity. Are you sure that it's not you that causes the memory leak due to misusing the API like duplicating materials meshes at edit mode, ....?
Yes, I can confirm that it happens in an empty project. I created a new project, added only a cube GameObject, moved the x-position slider back and forth a few times, and then I got the error and Unity shutdown. The editor was still in scene view, I did not press Play or anything, so I am pretty sure it does not have anything to with my own code/projects. This of course, leaves me clueless, since I did not find a solution yet. I will update my graphics card drivers now, because you never know. (Edit: That didn't help) Thanks for your comment.
I am facing the same scenario, except Win8 x64. It's a development machine so RA$$anonymous$$/CPU/GPU are all very up to date and I've never experienced this issue on a build before 4.2. Right now 4.2 is unusable on my system because it'll crash within two $$anonymous$$utes of being launched. Any info would help greatly if someone figures this out.
It seems very much like the problem exists only with a second monitor attached.
Answer by pojoih · Sep 24, 2013 at 11:54 AM
I now have the same problem. Dell XPS 15 with Intel HD3000 and Geforce with Optimus. Laptop and Second Monitor on Displayport, which is connected to the Intel Graphics Card functions well BUT when I'm connecting my Oculus Rift with HDMI (connectet to Nvidia Card) as third monitor Unity crashes 5 seconds after start with "too many threats". Seems to have something to do with Nvidia Optimus, when I'm connecting Oculus to Displayport without anything on HDMI everything is okay again.
Answer by mndcr · Oct 14, 2013 at 02:16 PM
Same problem here, however, I figured out that it only happens when running Unity on my Non-Primary Monitor. Running it on my primary Monitor works.
Answer by mihai9323 · Nov 10, 2013 at 01:54 PM
I have the same problem. The " gc: too many threads" error appears every time I try to use Unity with 2 monitors. It happens even on an empty project... On the other hand Unity runs perfectly when I use only one monitor. I installed the latest drivers for my graphic card, but nothing changed. I also reinstalled Unity, but the problem continues. I have a Lenovo w520 Windows 7 x64 laptop with a Nvidia Quadro 1000M graphics card.
$$anonymous$$ake sure (In Windows Display Screen Settings where you setup multiple monitors) that the screen where you run Unity is the "Primary $$anonymous$$onitor" (and never run Unity on the other screen!). This perfectly solved the problem here.
Answer by stealann · Nov 17, 2013 at 03:09 AM
In my case, I use Quadro 2000M as GC and double-screened with a cintiq screen. Even I run Unity on the primary screen which I set it to the laptop screen. The error happens continuously when I found that in "Set PhysX Configuration" in NVidia Control Panel, the quadro seems is in charge of the attended screen while the integrated graphics card is in charge of the laptop screen. So after I set the attend screen the primary one and run unity on that, the error never happened again!
Answer by tyoungjr · Jan 07, 2014 at 03:15 AM
Yep yep same problem here. Running a GeForce GT 555m, I'm connecting with an HDMI to an LED TV.