Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

weird error message?

Discussion in 'Editor & General Support' started by besuser, Oct 16, 2007.

  1. besuser

    besuser

    Joined:
    Oct 9, 2007
    Posts:
    292
    Has anyone ever seen this error in the console window?:

    Screen position out of view frustum (mouse pos 369.000000, 169.000000) (Camera rect 0 0 658 402)

    I keep getting it in the console window, but everything seems to be okay. I'm running the trial version of Unity 2.0 pro. I just want to know if something is wrong and needs to be fixed.

    Thanks.
     
  2. terransage

    terransage

    Joined:
    Jul 17, 2006
    Posts:
    290
    I'm getting the same message (with different coordinates) in the upgraded 2.0 Pro version, but don't see any problems occurring in my world. I'd also like to know if this is a critical error.
     
  3. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    985
    I think it may be from converting the mouse point to a ray. When you are using the editor the mouse goes outside the view frustum of the camera? Seem reasonable. It also seems to have no side effects for me other than the thrown error.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    I got that error once, but I'm not sure what caused it, and it hasn't happened again.

    --Eric
     
  5. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    i have the same error too, like to turn it off

    Norby
     
  6. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    If you can reproduce it, send a bug report with the project folder and the exact steps to reproduce it. We have seen the error a couple of times, but were never able to reproduce it.
     
  7. DGuy

    DGuy

    Joined:
    Feb 7, 2007
    Posts:
    187
    Just ran into this same message ...

    1) Start a new project

    2) Select the Main Camera

    3) Set the near clip plane to zero OR set the near clip plane equal to the far clip plane.

    4) Click inside the Scene view. This should cause the "Screen position out of view frustum" message.

    I also noticed that after step #3 above, with either near=0 OR near=far, the view frustum is no longer drawn in the scene view.

    Maybe this is Unity's way of complaining that "There is no view frustum".

    Should I submit this as a bug?
     
  8. Julia

    Julia

    Joined:
    May 15, 2008
    Posts:
    1
    I got the same error and i turned it off with switching the scene and the game view.

    Julia
     
  9. Nevers

    Nevers

    Joined:
    May 6, 2008
    Posts:
    39
    i get the same message

    i dragged a fbx model into the scene view ( it was really really small )
    i right clicked on the scene view, probably scrolled a little and pressed f
    then i got the error
     
  10. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    I get it sometimes, but it usually doesnt take much to make it go away.

    yeah I know thats not very helpful but just helping UT get an idea of how common it is. I only get it occasionally

    AC
     
  11. Joe-Robins

    Joe-Robins

    Unity Technologies

    Joined:
    Apr 21, 2008
    Posts:
    430
    I got the same error importing some FBX files... if I can't see the object, then press f to focus on it, it comes up with that error
     
  12. wiserd

    wiserd

    Joined:
    Jan 14, 2009
    Posts:
    47
    I have the same problem. It started when I tried to focus on an elipsoid particle emitter. Now the emitter doesn't appear in the game (just scene view) and the error keeps coming up.
     
  13. Shaneo

    Shaneo

    Joined:
    Apr 2, 2009
    Posts:
    50
    Just got this bug for the first time today. I hit F to focus on an object that was way off screen (i was manually moving it with code and had a bug :oops: ) and then this error wouldn't go away, even after restarting Unity. I finally focused on an object in view and that fixed the error.

    It's pretty easy to reproduce.
    1) set an objects position to 10000000
    2) press F to focus on that object
    3) watch the error "Screen position out of view frustum" print over and over

    To make it go away, just focus the scene view on an object that's not so far from the origin.

    The camera does some pretty strange things when it's that far away. It even eventually crashed Unity on me.
     
  14. fursund

    fursund

    Joined:
    Dec 2, 2008
    Posts:
    30
    @Shaneo
    Thanks for narrowing the issue down. We would be really happy if you could add these reproduction steps to a bug report somehow, then we have it in our database and can further escalate the bug to the developers.
     
  15. Augustum

    Augustum

    Joined:
    Feb 11, 2008
    Posts:
    55
    I totally had this happen, focused as the previous posts said and it went away.

    Thanks for the tips y'all - this error scared me! :eek:
     
  16. whyroc

    whyroc

    Joined:
    May 1, 2009
    Posts:
    2
    Unity 2.5 trial ... Tips didn't work for me, It just crashed whenever I clicked the scene view.

    Finally fixed by reverting the window layout to factory default.
     
  17. blackwind

    blackwind

    Joined:
    Oct 16, 2008
    Posts:
    58
    i'm also getting this error on unity iphone 1.02.

    I only changed the values on the "normalized view port rect" of the default main camera, an set to ortographic mode.

    I reverted all the values to default and i cant get rid of that error.
    What should i do?
    does this really affects on something?
     
  18. blackwind

    blackwind

    Joined:
    Oct 16, 2008
    Posts:
    58
    i dont now if it was a coincidence that i installed the iphone 3.0 sdk AFTER that error, but i couldnt even run my app.

    I had to start a new project from scratch.

    Fortunately, it was just a new test i was doing. But what if it was part of and advanced project?

    Does the unity team have some kind of support for that?
     
  19. EFlynn

    EFlynn

    Joined:
    Feb 17, 2009
    Posts:
    5
    I also encountered this error. I don't have a sample project, but here's a description:

    I was manually updating verts on a mesh, getting values from a float[5] array. I had x, y, apparent width, height and real width in there. I then scaled it via a function that only returned a float[4]. I was still trying to access index 4 on the newly returned float[4] array.

    Odd thing was, it worked just fine on the Mac version, but as soon as I tried it on a Windows Unity install, the problem (this error) cropped up.

    Once I fixed the bounds, it went away.
     
  20. RElam

    RElam

    Joined:
    Nov 16, 2009
    Posts:
    375
    Hmm, I've no idea what kicks this in, seems almost random, but the water prefab kicks it in for me. Here's the relevant stack...

    Code (csharp):
    1. Screen position out of view frustum (screen pos 256.000000, 0.000000, 3044.492188) (Camera rect 0 0 256 256)
    2. UnityEngine.Camera:Render()
    3. UnityEngine.Camera:Render()
    4. Water:OnWillRenderObject() (at Assets\Pro Standard Assets\Water\Sources\Water.cs:97)
    5. UnityEditor.Handles:Internal_DrawCamera(Camera, Int32)
    6. UnityEditor.Handles:Internal_DrawCamera(Camera, Int32)
    7. UnityEditor.Handles:DrawCamera(Rect, Camera, Int32)
    8. UnityEditor.SceneView:OnGUI()
     
  21. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    Just posting to say I see this too occasionally. I wouldn't know how to recreate it myself, but it looks like some of the previous posters managed to narrow it down to something reproducible.
     
  22. RElam

    RElam

    Joined:
    Nov 16, 2009
    Posts:
    375
    Well, sadly not as much as I'd hoped, I just restarted Unity and now it's not doing it, oh well.
     
  23. ahmetDP_1

    ahmetDP_1

    Joined:
    Sep 23, 2010
    Posts:
    113
    I can reproduce this error. I have a ortho camera, and if I make its size value 0. The same error appears.

    So it would be useful to check camera values. Obviously when we get this error, means that we have misconfigured a camera setting value.
     
  24. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    Unity pro waters kicked it for me too
     
  25. gevatter

    gevatter

    Joined:
    Sep 15, 2011
    Posts:
    1
    I have the same error, but it only occurs if I use this code line:

    _save_placedBuildObjectsArray[0] = currentGameDatabase.placedBuildObjects["BUILD"+cnt][0];

    The error pointed me to this code line inside a whole different script:

    Ray ray = (camera.ScreenPointToRay(Input.mousePosition));
     
  26. PeteRoobol

    PeteRoobol

    Joined:
    May 7, 2009
    Posts:
    7
    Its a unity bug, for us to reproduce- using Unity pro water- the error "Screen position out of view frustum" occurs when the Scene view is along the x or z axis (parallel) switching this view to perspective or y stops the error...

    Bug filed.
     
  27. Jason-RT-Bond

    Jason-RT-Bond

    Joined:
    Mar 26, 2012
    Posts:
    89
    This thread is old, I realise, but the issue still occurs in this same situation with Pro water and a scene view parallel with the Z axis (set to orthographic and in the "back" view). Rotating the scene view fixed it.

    Unity 4.2 in Windows, using Pro water included in"Real Nature Pack 2: Autumn v2" (from the asset store).
     
  28. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    We have seen this recently as well (latest version of Unity Pro). We are not using the Pro Water but a equivalent method to get reflections (camera rendering into a buffer). We have yet to isolate what might be causing it, but it is seemingly random.

    Is this an editor error only or will it trigger in standalone mode as well, and if so is it critical (will it crash the game)?
     
  29. Tristan-CodeHatch

    Tristan-CodeHatch

    Joined:
    Nov 18, 2013
    Posts:
    3
    My team and I were also having this error spam out console occasionally so we decided to fix the error once and for all.

    After some searching around the project we found that disabling a camera fixed the problem. We were expecting it had something to do with the camera. We narrowed the problem down to the Projection type on the camera and found that changing it from perspective to ortho and back fixed the errors. Not sure how this fixes it but it must perform some code behind the scenes when this value is changed.

    We have put together a script that simply changes each camera's projection type then back again so unity will perform it's background code.

    Code (csharp):
    1.  
    2.     public class FixFrustrum : EditorWindow {
    3.         private static bool firstUpdateCalled;
    4.  
    5.         [PostProcessScene]
    6.         [MenuItem( "Tools/Fix Frustrum Errors", false, 1 )]
    7.         public static void FixFrustrumErrors() {
    8.             EditorApplication.update += Update;
    9.         }
    10.  
    11.         private static void Update() {
    12.             if( !firstUpdateCalled ) {
    13.                 firstUpdateCalled = true;
    14.                 foreach( Camera cam in Camera.allCameras )
    15.                     cam.orthographic = !cam.orthographic;
    16.             } else {
    17.                 foreach( Camera cam in Camera.allCameras )
    18.                     cam.orthographic = !cam.orthographic;
    19.  
    20.                 firstUpdateCalled = false;
    21.                 EditorApplication.update -= Update;
    22.             }
    23.         }
    24.     }
    25.  
     
  30. ABerlemont

    ABerlemont

    Joined:
    Sep 27, 2012
    Posts:
    67
    If that helps :
    I have that error when Camera.main.orthographicSize is set to 0 and the mouse cursor is in game viewport (at runtime).
     
  31. valerik

    valerik

    Joined:
    Aug 8, 2013
    Posts:
    11
    Same problem here, with Unity 4.3 and Orthello 2.9v
    I have it when I open unity, Camera.main.orthographicSize starts to NaN as value.
    No way to fix it, I saved my GameObject with size at 384 (the value I need) but every time I open the project size is again NaN.
     
  32. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    301
    Getting this like crazy when trying to change FOV on the fly.

    The screen goes "gray" and nothing is viewable..

    tryed with clipping planes around .1 up to 1, also noticed the coordinates change when i move the mouse,
    it's producing 100's of errors pr sec. (I'm guessing one pr frame)

    Excakt error msg is

    Screen position out of view frustum (screen pos 115.000000, 347.000000) (Camera rect 0 0 1111 625)
    UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)

    screen pos coordinates change when i move the mouse.
     
  33. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    I'm getting this error.
    It just started. The scene was working fine and I hadn't done anything to it to cause an error!
     
  34. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    Restart unity, try loading a different scene possibly. Any more details you could give? Thanks!

    -Viper
     
  35. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Unity Pro v 4.5.5
    Its a terrain scene, 1 terrain, a bunch of Standard Asset trees and shrubs from Unity, Pro daylight water, Standard First Person Controller. One camera on the controller and one that actually I don't need in this scene so maybe I should take it out. It was perfectly fine for several days though, I haven't fiddled with anything today when this started.
    Unity waterfall. A couple of things off the Asset store.

    I clear the errors, then they come back.
    They don't seem to stop me doing anything so far, I can make a build ok. They just make me nervous...

    Thanks Viper
     
  36. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    Which errors are you getting? Save the scene and slowly start removing prefabs from the scene starting with water prefabs and see if that fixes the issue. If I remember correctly I think one of the issues was with a unity pro water texture sending out errors. Let me know if you want me to take a look at it!

    Good luck!
    -Viper
     
  37. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Hi Viper,

    Thank you, I'd love you to look at it but its part of a huge project currently running to nearly 4gigs of Assets. Optimization looms in the near future! I could try and put together just this scene in another project and see if it replicates the same error and if it does upload that maybe.

    Here is some info on the Unity Waterfall asset in case that jogs your memory?
    It uses UV scroller which I've used in the past and had no problems with.

    The other Water Asset is the Unity Pro Daylight Water which again has been perfectly well behaved in other scenes although now I come to think of it I think I have see the odd yellow error on the console relating to refraction in this one...as they were yellow, and I couldn't figure out what the problem was, I just cleared them. They only popped up from time to time. Was it the Pro Daylight Water you tracked this down to can you remember at all?

    Thank you so much!

    cheers
     

    Attached Files:

  38. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    If you double click the error it will take you to the script and then you can see which assets use that script. Just remove those assets temporarily and see if that clears the issue. Also if I remember correctly the scripts that throw warnings are the ones that threw his error.

    Hope it helps,
    -Viper
     
    Last edited: Nov 29, 2014
  39. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Of course!
    Yup, it's water.cs

    Not anywhere like an experienced enough coder to have any idea what it's problem is though.
    The errors are on lines 97 (four times) and 119 (twice) does it mean anything to you?
    Will try removing things but thats basically just the sea.
    Thank you very much!
     

    Attached Files:

  40. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    The amount of times it appears is just how many times the error was thrown. I'm on my phone so quickly skimming the code it looked to be fine so it may just be a variable or the way the prefab is set up. Hard to say. Does it work with this script removed?
     
  41. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Sorry, no rush really, finish your phone call.

    The scene works with the errors, I just have error messages.
    If I remove the script I don't get the error messages or the water surface effects obviously.
    As far as I can tell its just the standard prefab.
     

    Attached Files:

  42. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    Haha I mean I'm working from my phone currently so no worries, just can't try anything on my own. I don't know the default settings for the water script off the top of my head but try changing some of the settings for the script and see if it fixes the issue.

    Also, try creating a new scene and just add the water prefab and see if it throws errors still.

    -Viper

    Edit: do you have more than one camera object?
     
    Last edited: Nov 29, 2014
  43. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Ah ha!
    Deleted second camera, problem appears to be solved!
    The water works fine in other scenes, and its just this one that has two cameras.
    I will play for a bit and see if it comes back but I hope thats the fix.
    And it would make sense!

    Thanks Viper!
     
  44. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    Haha nice! I was reading through those errors again and it was just an idea that crossed my mind because people occasionally leave the default camera in the scene and just drag the first person prefab and what happens is that script uses camera position and orientation and with 2 cameras it basically doesn't understand which to use.

    Glad we got it working man! Happy coding!
    -Viper

    Let me know if you ever have any more questions or issues! PM or email me and I'll be happy to help! ViperCodeGames@gmail.com
     
  45. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Update.

    Spoke too soon!!
    Its back, all the same errors.
    Second camera still deleted.

    Wahhh!

    Its not actually stopping me doing anything though at the moment.
    Thanks hugely for all your help Viper. Its really great of you to take the time.
    I'm going to try some of your suggestions and see if I can get it to go away again.

    Its often little things that screw everything up.
    The other night I couldn't figure out why my boat kept sinking when it had been working perfectly before. Eventually I realized it was just very slightly hitting another collider at start up which was messing up the buoyancy script and all I had to do was physically move it by a tiny, tiny bit and everything worked fine.

    Have a great evening!
    Cheers
     
  46. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    Ah darn man! Let me know if you can figure it out or have any other questions!

    -Viper
     
  47. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    I'll give it a go over the next couple of days and if I can't figure it from trying some of your suggestions above I will definitely take you up on your kind offer.

    Thank you so much for all your help!
     
  48. ViperCode_

    ViperCode_

    Joined:
    Apr 11, 2011
    Posts:
    19
    No problem! Good luck!