Search Unity

Unity 4.3 error - rect[2] == rt->GetGLWidth() rect[3] == rt->GetGLHeight()

Discussion in 'Editor & General Support' started by badbod99, Nov 12, 2013.

  1. badbod99

    badbod99

    Joined:
    May 3, 2011
    Posts:
    36
    Getting this error spammed on the console in Unity 4.3 on certain projects.

    Any ideas?
     
  2. JamesMakesGamesLtd

    JamesMakesGamesLtd

    Joined:
    Aug 22, 2012
    Posts:
    34
    Same here. Spams the console with:

    Code (csharp):
    1. rect[2] == rt->GetGLWidth()  rect[3] == rt->GetGLHeight()

    UPDATE: Fixed this. It was to do with a saved layout I had. I changed my window layout to one of the defaults and the error stopped.

    UPDATE UPDATE: Is actually when any layout contains a game view with the aspect ratio set to 16:9 or 16:10
    Seems like you can now manually set specifc resolutions in this tab, tried setting one up for 1600x900 and it still gives me the error. Basically, you can't letterbox the active game portion of the game window without getting that error.


    ADDITIONAL :) : OK, some more messing around and: I CAN have a 16:9 ratio without getting the error, but I can't maximise the game window if I do (else it throws the error).
     
    Last edited: Nov 12, 2013
  3. badbod99

    badbod99

    Joined:
    May 3, 2011
    Posts:
    36
    Found it is coming from the AntiAliasingAsPostEffect Image Effect on an Orthographic camera. Will raise a bug.

    EDIT: Actually, you're right BRShins, it was the Layout. Strange that disabling the post effect stopped the error too.

    EDIT 2: Error still occurs with 16:9 or 16:10 aspect (not with free aspect) game views. Disabling the AntiAliasingAsPostEffect makes the error go away.

    EDIT 3: Recreated in a simple project. Orthographic Depth-Only camera with AntiAliasingAsPostEffect.
     
    Last edited: Nov 12, 2013
  4. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    350
    Same here. The camera is Perspective in my case, the rest is the same (Depth-Only with FSAA effect). I already reported the bug. I made a small test-scene: http://t.co/E3WiaWC2qV - if the error doesn't appear, just resize the Game view dynamically.
     
  5. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi, I am also having this error. Using a default layout DID work, but the problem is that I am developing for the Oculus Rift, and when I put the Game window on my extended display (the rift) I get the same error

    "rect[2] == rt->GetGLWidth() rect[3] == rt->GetGLHeight()"

    Destroys performance. I am also getting this bizarre error message:

    "fence == expectedFence"


    If I discover any fixes I will post them here
     
  6. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    325
    Yeah I am getting this error as well. I hope it is limited to the Editor?
     
  7. CrazyMick

    CrazyMick

    Joined:
    Aug 28, 2012
    Posts:
    3
    I am having the same error on my Android project running in 16:10.
     
  8. EddieCam

    EddieCam

    Joined:
    Oct 28, 2009
    Posts:
    26
    Also get this error, I don't think it's related to the AAPost effect specifically though, get it every time that:
    - game window is set to anything but Free aspect, 5:4, or 3:2,
    - some active camera is Depth Only or No Clear,
    - and the same camera has a script on it that listens to OnRenderImage (even if method block is empty or a straight blit)
     
  9. mamoniem

    mamoniem

    Joined:
    Jul 23, 2012
    Posts:
    174
    it is an Editor GUI error. Always get new ones with the new versions :D. But the game keep running anyway :)
     
  10. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    291
    I'm getting same error.
    Narrowed it down to JS Image effects on main camera.
    If I turn them off spaming stops.

    EDIT: Reported this as a bug.
     
    Last edited: Nov 18, 2013
  11. ArnoC

    ArnoC

    Joined:
    Sep 7, 2013
    Posts:
    10
    Same error here.

    Valyard, could post a link to the bug report please ?
     
  12. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    291
  13. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    same bug here, very annoying.

    I confirm it comes from post-process effect on the camera.
    Currently using those from the Unity's Standard Assets.

    if I unable them, the console stops spamming
     
  14. badbod99

    badbod99

    Joined:
    May 3, 2011
    Posts:
    36
    Still occurring in 4.3.1
     
  15. John-Citizen

    John-Citizen

    Joined:
    Nov 5, 2013
    Posts:
    11
    Using 4.3.1, getting the same error.

    Removing post processing effects gets around the problem, but this isn't much of a solution...
     
  16. casey945

    casey945

    Joined:
    Feb 16, 2009
    Posts:
    46
    Still occurring in 4.3.1
     
  17. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    Still occuring for me, too. I "fixed" it by disabling anti-aliasing in quality settings.
     
  18. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Just started getting this today and it's quite annoying! Does anyone know if it happens in a deployed game?
     
  19. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,518
    Really, really annoying.

    Doesn't stop, just keeps rolling out thousands of errors.
     
  20. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    291
  21. MWMusker

    MWMusker

    Joined:
    Apr 29, 2011
    Posts:
    45
    Ran in to this at work today. 16:9 editor viewport on the vignetting effect, possibly other effects too, I didn't notice until I turned on the console to work on some code.
     
  22. WhiskyJoe

    WhiskyJoe

    Joined:
    Aug 21, 2012
    Posts:
    143
    In the editor, it's causing a pretty severe performance drop. Because I am making use of some platform specific functionality I am not able to create a proper desktop/windows build where I can check if this also has a performance drop there or if it's just an editor thing.

    Can anyone verify this?
     
  23. diamonddust

    diamonddust

    Joined:
    Oct 8, 2012
    Posts:
    6
    I'm playing with my own (very simple) image effects and getting the error. I'm thinking it has to do with the graphics card, is anybody having the problem on a Windows machine?

    I'm running OS X 10.9.1, ATI Radeon HD 5870

    I'm also seeing this in the profiler when it happens:

    $Screen Shot 2014-01-23 at 2.02.02 PM.png
     
  24. h8crew

    h8crew

    Joined:
    Jul 15, 2013
    Posts:
    2
    Have the same error on a 680 GTX. Been like this for months, seems to be caused by many different image effects and I think it 1st showed up in 4.3.0. For the time being I'm taking my maximized window and shrinking it just enough for the error to stop complaining. It is definitely causing huge performance drops as it is printing tens of errors each second.
     
  25. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    Same error here. It's annoying, I really need those effects. I tried different effects: bloom, fisheye, color correction. They all give the same error and when I deploy to my iPhone the screen is plain black (except for my ngui elements).
     
  26. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    For the folks who are asking if this is only happening in the editor, I did a simple test. I used:
    Code (csharp):
    1.  Application.RegisterLogCallback(HandleLog);
    2.  
    and an external text logging system (http://www.valion-game.com/295/use-log4net-for-efficient-logging-in-unity3d/).

    Then I type control-B to build and run my application outside the Unity editor. Looking over the log, I quickly determined that:

    1. This is an ASSERT error. This probably doesn't matter much, but I figured I'd mention it.

    2. It does NOT happen in a normal build. It's just happening in the Unity editor. There were no instances of the "rect[2] == rt->GetGLWidth() rect[3] == rt->GetGLHeight()" problem in my log file. When I run in the Unity editor I get them instantly and pretty much continually.

    This probably explains why UT isn't so concerned about it.

    EDIT: I only tested on PC Standalone. I see that some people are having problems on mobile deployments. Those problems may be unrelated, but I can't speak to that.
     
    Last edited: Feb 10, 2014
    sandolkakos likes this.
  27. Twinsky

    Twinsky

    Joined:
    Dec 16, 2012
    Posts:
    14
    Like others here, I'm running into this problem in Unity 4.3.3 whenever I run a 4:3 aspect ratio using a screen overlay. It's causing problems on iPad, forcing me to remove the effect.

    Why does the issue tracker claim this problem is fixed?
     
  28. kk93

    kk93

    Joined:
    Jan 17, 2014
    Posts:
    55
    Same problem here. It happens to me in every aspect except for free aspect...
     
  29. danilonishimura

    danilonishimura

    Joined:
    Jul 13, 2010
    Posts:
    70
    Actually I noticed that it will always happen when the letter box is vertical. Horizontal bars doesn't cause any errors..
    It doesn't matter which ratio is selected. Free aspect will never cause the error because it'll always fill the entire game view.
     
  30. GermyGames

    GermyGames

    Joined:
    May 20, 2012
    Posts:
    38
    I hope they re-open the issue, it definitely hasn't been fixed :(
     
  31. Griautis

    Griautis

    AI & Physics STE Unity Technologies

    Joined:
    Jan 26, 2013
    Posts:
    63
    Hello everyone,

    The issue has actually been fixed, however at this point our Issue Tracker cannot differentiate between Fixed in released Unity version and Fixed in an upcoming release, this causes some confusion. The bug should be fixed with next non-minor released version of Unity. If you can reproduce it please send a new bug report.

    Best wishes,
    Ugnius
    Unity QA Team
     
  32. apomarinov1

    apomarinov1

    Joined:
    Oct 21, 2012
    Posts:
    66
    Interesting, it started happening to me when I added the WaterPro to my project.
     
  33. sajberek

    sajberek

    Joined:
    Dec 14, 2013
    Posts:
    14
    It happends if your game view is being scaled down. Try to set the game view resolution correctly, the problem should stop.
     
  34. BenKurdziel

    BenKurdziel

    Joined:
    Nov 9, 2012
    Posts:
    8
    Thought I'd give you guys some insight on the issue.

    This is an EDITOR ONLY issue. As you can (or maybe can't :p) tell from the error, it's a C++ error (meaning it's an editor error). Any built version of your projects will be unaffected by it.
     
    muheydari likes this.
  35. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    291
    Thank you, Captain Obvious.
    But this doesn't make this issue less annoying.
     
  36. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    This happened to me when changing game Quality to Beautiful. It was disabling the forced 2x Multi-sampling AA that fixed it.
     
  37. cherub

    cherub

    Joined:
    Apr 26, 2006
    Posts:
    493
    that worked but i dont want to use a default setting. sigh
     
  38. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    I just experienced this error and resolved it by switching layouts, then switching back to my custom layout and (re)saving the layout.

    Nothing to do with any camera effect, etc.

    Note: I also fixed the error by removing my Pro license and reverting back to free edition.
     
  39. firebelly

    firebelly

    Joined:
    Apr 22, 2013
    Posts:
    12
    Also confirm it was when I added an effect to a camera. In my case, blur.
     
  40. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    rect.width <= rt->GetGLWidth() && rect.height <= rt->GetGLHeight()

    upload_2015-10-15_14-11-54.png
     
  41. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Please report this as a bug, but's probably cleared on restarting Unity. Do you change fov much?
     
  42. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Hi, not at all. I will see if I can track it down to a single object...
    Seems to be camera related you are hinting. WIll check that out