Unity stutters, and it's not the game.

Hello,

I’ve got a weird problem here… not quite a very important problem, but an annoying one nevertheless.

Every now and then, Unity will stutter when playing the project… it’s not a steady framerate drop, it’s more like every 100th frame taking 10x longer to finish than the others, which leads to a really annoying stuttering…

My immediate first thought was that something in my project was causing it… maybe some script is working with really small numbers, and causing slowdowns due to denormal values… or some Unity method is far heavier than I thought it to be…

But, having no mind to go through almost 40000 lines of code, I decided to try the easy things first, and restarted Unity. :wink:

Restarting Unity seems to fix the problem. And it’s more apparent that it’s not the game from the fact that switching to other scenes seems to have no effect on the stutters… my main scene, with it’'s procedural terrain and complicated physics setup, stutters just as bad as an auxiliary scene that is only used to unit-test some game components… So it’s NOT the game.

Anyhow, I wasn’t having any such trouble a few months ago when I started working with Unity… so I wonder what could be causing it…

Could it be version 3.3? The project started on 3.1, and we upgraded when the new versions came out.
Or could it be some external service, like Dropbox, which is syncing the project across and keeping it backed up. (I’ve tried cutting out dropbox, to see if it would make a difference, but it didn’t produce any consistent effect, and it’s far too necessary to be just cutoff)

Also, most times, the stuttering can be fixed by restarting Unity, or having it recompile a script… So I’m pretty certain at this point that the problem isn’t the game…

Has anyone had this problem too? Any thoughts about what could be causing it?

Here’s a brief description of my setup (hardware and programs running in the background), if it helps:

Rig: Intel Core i7 920, 6GB DDR3 ram, Geforce GTX460, plenty of disk space left.
Setup: Win 7 x64, Unity 3.3, Visual Studio 2010, DropBox, Teamviewer, Skype

Thanks in advance for any help

Cheers

Yep had this, posted about it, posted bug report. No reply from Unity to either.
Stability and stuttering went down hill for me after 3.1 I think (win vista/7 64bit)

Hmm, so it IS Unity then… good to know… at least it isn’t something in my code :wink:

I guess then we hope that 3.4 will have this fixed.

Thanks!!

Cheers

I have the same problem but much worse i have HUGE frame rate drop when i click on simple object on the scene its selecting after 5 / 6 sec.
Or when i try to type something than the letters appear after 2 / 3 sec. Its incredible frustrating.
Even when i start new project and there is nothing on the scene its the same frame rate drop.

This sounds exactly like a problem I had. It stutters a bunch, and restarting fixes it for me too.

Certainty freaked me out for a good 10 minutes or so, me thinking that something I had added had broken my game. I’ve be running 3.0.0 for awhile, just recently got around to installing 3.3.0, so it’s probably an issue that came with it.

It works like a cham on my Mac. But not on my lapto with Vista. I though I had some… nasty malware or virus (which is still quite possible), so I’ll check if the stutter problem happens with other programs too…

It can’t be malware-related if it’s something that happens consistently for many users… Plus, only Unity is affected, and only while in play mode.

It’s definitely some internal problem in Unity… maybe it’s a 3.3 bug…

At least, on the bright side, it doesn’t affect performance on the builds :slight_smile:
I can live with restarting Unity every now and then, until a fix comes… I’m just happy it isn’t script-related :wink:

Cheers

For me this effect always not only in play mode and restarting Unity not always help.

The only way to track any bugs down is by reporting the bug. Include a scene/project and perhaps even make a video of the problem or take screenshots along. Describe the problem in every detail possible to help narrow it down.

I get this stutter after plenty of runs on the editor. I think it is due to garbage collection issues.

I have this problem too. Its good to know that it is Unity related, i thought that i had too many prefabs in scene for while. I get same performance spikes like you wrote Harvester. It has started after 3.1 patch. Anyone got solution for that? It is starting to get really annoying, i have that spikes every 4 seconds, so i even musnt move too for too big distance or nothing gets updated and it throws me back on old place.