Solving Console Output Errors

Hi, for some time, since the last Unity update (maybe the one before), all my projects have been showing errors that are slowing down the performance of the Editor, and I’m unable to solve them.

These errors seem to come from Unity itself, but any time I have the Scene viewport in focus, or anytime I drag one of Unity’s tool panels/windows, the following errors will repeatedly spam the console:

!IsFinite(outDistanceForSort)
UnityEditor.DockArea:OnGUI()

!IsFinite(outDistanceAlongView)
UnityEditor.DockArea:OnGUI()

After working for about 5 minutes, around 5000-6000 of these errors will have accumulated in the console, and it seems to slow the performance very badly. I had to stop work on my largest project because the Editor becomes completely unusable due to poor performance.

This is the Windows version of the Editor.

If anyone can tell me what the cause of these errors is, or how to fix them, I would appreciate it very much.
Thank you!

Try resetting the Unity layout.

–Eric

i get similar editor errors too…and since they are so cryptic and give no info, i have no idea how to fix them.

If by resetting the layout you mean “revert to factory settings”, this does not fix the issue. The errors still appear, but I also have plugins that require their own window, so working in the default layout isn’t an option anyhow.

These errors also occur whenever I am typing into any text field within Unity. Each key press will create 4 errors at once (so typing a whole string can spawn hundreds). Additionally, after testing a bit more I discovered that something will sometimes cause the errors to simply repeat without any input on my part. The Editor window will be in focus, but even without mouse movement or any keyboard interaction, these errors will just climb and climb.

EDIT: I created a new project with nothing imported, and the errors do not appear. I suspect it is a plugin I have, but I imported each one, one at a time, and after importing and testing dozens of plugins for Unity, the errors never appeared.
Could these errors be caused by residual data from previous projects? All the projects that these errors appear on were started in Unity 3.4 or earlier.

I welcome any further suggestions!

I’ve emailed support and I’ll post back here when I receive a reply.

Thanks for the help and suggestions.

Okay, support helped me identify the issue. I’m still not certain why the problem happened in the first place. What I was told was: “Try checking that your game objects don’t have any NaN (Not a Number, ie. invalid numeric declarations, FYI) values or a script which could be setting a value to NaN. Also, check your camera’s position etc to ensure they’re valid.”

This doesn’t really apply to my scene or the object that was causing the problem (my daycycle system group), but the errors did stop once I deleted it from my scene.

So… @kablammyman - check your objects for any extremely large or extremely small scale values, or any scripts that you might be using to set render queue/sorting depth and the like. Check that you don’t have objects or your camera set to an odd coordinate (like being extremely far from the world origin). That should at least get you started in solving your issues, if they were the same as mine.

I hope you can solve the problems you were faced with as well!