Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Blank Game View

Discussion in 'Editor & General Support' started by SteveJ, Aug 3, 2016.

  1. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Anyone else experiencing the "Blank Game View" feature in 5.4? Only happens when the new scale slider is set above 1x. It generally doesn't happen when first running the game, but just randomly blanks out while running. If you un-maximize and re-maximize the Game window, it comes back again.


    Also getting lots of weird stuff like this happening in the interface quite frequently.

     
    Shushustorm likes this.
  2. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    I haven't run into this yet. Not doing anything very advanced, only 2D with a bit of GUI.

    The second screenshot looks like any regular day for me with public beta 2 of Sierra ;)
     
  3. shawn

    shawn

    Unity Technologies

    Joined:
    Aug 4, 2007
    Posts:
    552
    The first issue you're seeing is known and we're working on a fix now.

    The second issue is different, I believe. We don't have any reports of this, but like @orb mentioned, interesting to know if you're on a Sierra build of macOS.
     
    orb likes this.
  4. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    I too am experiencing the first issue -- often times it seems I'm able to get the game display to work again by switching from Game view to Scene View (or even Asset Store) and back again. I have not experienced the second issue at all.

    I'm on OSX 10.11.6 (El Capitan). Definitely looking forward to a fix for the first issue, though! :)
     
  5. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Running El Capitan 10.11.6.

    It's doing some other glitchy stuff like that second screenshot too - I'll grab a couple more screencaps today and post them.
     
  6. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    Any idea when this might be fixed? Or perhaps any idea what's causing it -- if it's certain/specific code that's triggering it I'd be more than happy to work around it in the meantime if that's possible?

    Is just really starting to drive me nuts heh. :)
     
  7. shawn

    shawn

    Unity Technologies

    Joined:
    Aug 4, 2007
    Posts:
    552
    Nothing to report yet. We'll let this thread know when we have something to report.
     
  8. BrainAndBrain

    BrainAndBrain

    Joined:
    Nov 27, 2014
    Posts:
    115
    Accidentally started a duplicate thread on this issue (even searched for similar threads first—oh well).

    To add to the descriptions of the problem, I've noticed that some time after refreshing the window to get the Game view back, graphical glitches appear all over the Editor, and I will sometimes have problems selecting objects in the Hierarchy. The only real solution is to quit and reopen Unity, which I do multiple times per day.

    Glad this is on Unity's radar.
     
  9. Deleted User

    Deleted User

    Guest

    I have seen this as well, but it just flashed shortly, like for one frame.
     
  10. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    I have the same problem sometimes black game view sometimes graphical glitches (on OSX 10.11.04), could be in conjunction with the Unity remote 5 , but that is just a guess.
     
    Last edited: Aug 12, 2016
  11. xiotex

    xiotex

    Joined:
    Sep 26, 2010
    Posts:
    37
  12. shawn

    shawn

    Unity Technologies

    Joined:
    Aug 4, 2007
    Posts:
    552
  13. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    124
    I have reported in other threads, since this one seems to be the main one now, Yes I experienced issue #1 about once a day at random times and it seems thats its now being worked on. I have experienced issue #2 but only during a build process, my game window (which is on a 2nd monitor and viewable a100% of the time) will glitch out like this, but when the build process ends, it fixes itself. This one I don't worry about as it never hits me during gameplay. MacOS 10.11.6 Late 2013 iMac i7.
     
  14. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    Any chance that you've (Unity Technologies) perhaps at least dialed in on what might be causing this? I'd be more than happy to spend some time trying to change our code a bit to work around it if I had a decent lead on where to perhaps begin looking.

    As much as I love (truly couldn't be more pleased with) the high-DPI support that 5.4 brings, this bug is really driving me up the wall. I'm currently restarting Unity >10 times per day because of it (often just switching views fixes it; but in some cases I even lose the view buttons which requires me to fully restart Unity).

    My lead engineer, running same project & same version of Unity, but via a new iMac (vs my Mac Pro) -- is reporting that he's rarely getting the issue, reportedly <1x per day -- I'm jealous of him... Frustrating! :) Keeping my fingers crossed though!
     
  15. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    124

    I made a custom layout with the windows all like I want them. When my Game window goes blank while in Play mode, I just reset my layout to that custom layout and it resets my blank window back to normal, even if Im in Play Mode I don't have to stop the game. I don't like it either, yesterday I had it go blank every 20 min or so. Very frustrating. But I didn't have to reboot Unity.
     
  16. shawn

    shawn

    Unity Technologies

    Joined:
    Aug 4, 2007
    Posts:
    552
    Unfortunately, still nothing to report. We're actively trying to isolate the bug, but it isn't straightforward. We're only very rarely able to reproduce it, which is significantly slowing things down. If anyone happens to find a more reliable way to reproduce this, it would be a big help.
     
    Shushustorm likes this.
  17. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    124
    I tried many things and its just so random I haven't been able to see any cause and effect situation yet. Is this related to the old OpenGL issue coming back for certain video cards?
     
  18. shawn

    shawn

    Unity Technologies

    Joined:
    Aug 4, 2007
    Posts:
    552
    Definitely seems to be OpenGL related. Not sure if it's an old issue coming back or entirely new yet.
     
  19. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    124

    I wrote an Automator script that booted up Unity with an older version of OpenGL, I will run that again and see if it stays away. Im now running on OpenGL 2.1 depreciated. That was the last work around.
     
  20. Juho_Oravainen

    Juho_Oravainen

    Unity Technologies

    Joined:
    Jun 5, 2014
    Posts:
    42
    Thanks for your help people! As the bug seems to be very rarely reproducing on our end, it'll be very helpful to hear if it still happens when running on old OpenGL. Another thing that would give us some hints is if you could start the editor with -force-gfx-direct flag and tell us if that affects the issue.
     
  21. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    Will give the flag a try over the next couple of hours and report my findings. I don't have a reliable way to reproduce it on-command, but will see what happens and report back.

    FWIW, my lead engineer (not experiencing the issue often) --> Brand new 5K iMac, and AMD Radeon R9 M395X 4096 MB graphics. Meanwhile, I'm lucky to get 20 minutes (especially if I CMD+TAB out & back) without issue; I'm on a 2013 Mac Pro with dual AMD FirePro D500 graphics.

    Will run w/ that flag today and report back... Very much appreciate & thank you guys for the prompt responses and work you're undoubtedly putting into this -- rarely-reproducible bugs aren't much fun I know.
     
  22. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    184
    I just encountered this bug today, but have been working with 5.4 for a while. I encountered the bug right after importing a new environment into the game and baking precomputed gi, adding light probes, and a reflection probe.

    Interestingly, I only seem to get the bug (frequently, actually) on the precomputed gi scene.
    In another scene, where the only difference is environment, the game view stays on. I've left it on for about 10 minutes now and it seems fine. In the other scene, about 5 minutes is more than enough time for the game view to go missing.

    Perhaps that may be a lead? Are you guys using precomputed gi, light probes, or reflection probes?

    I'm on OpenGL 4.1, 5.4.0f3, rMBP 750m 10.11.6
     
    Last edited: Aug 18, 2016
  23. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    After running with the -force-gfx-direct flag for the remainder of the day yesterday (and even letting Play Mode run like that overnight) I'm super happy to report that the issue did not occur even once!

    Obviously not a long-term solution, but in the meantime it'll sure keep my sanity levels closer to normal -- and hopefully it'll give you guys a lead in terms of tracking it down... :)

    Thank you!!
     
  24. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    Just to add on to this based on what sameng mentioned above... We aren't using any of Unity's built-in lighting at all, instead we've got a custom "lighting" system that relies on low-level GL calls and RenderTextures. It was working fine prior to 5.4, and continues to work flawlessly now, aside from this bug so I'm pretty confident we're not "doing something wrong" in terms of our usage of the GL API/class calls.

    I again ran Unity all day yesterday, using the aforementioned flag, and again did not encounter the issue even once; obviously things aren't quite as fast since their's no separate render thread, but it's well worth it for the time-being. :)

    @Unity Technologies --> If there's any additional info we could provide that would be helpful or useful in helping you track down the issue please don't hesitate to ask, more than happy to help in any way we possibly can!

    Thanks again!!
     
  25. shawn

    shawn

    Unity Technologies

    Joined:
    Aug 4, 2007
    Posts:
    552
    Thanks for the info. Definitely looks to be caused by a combination of Multi-threaded Renderer + Apple's OpenGL + Editor. We're still digging, but good to have a temporary workaround now to alleviate some of the pain.
     
  26. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Can confirm that -force-gfx-direct seems to stop the blanking on OSX 10.11.5
     
    Kronnect likes this.
  27. JoshiB19

    JoshiB19

    Joined:
    Aug 23, 2016
    Posts:
    1
    I was experiencing the same problem on my 10.11.3 macbook but i found that simply saving everything then closing unity and reopening it fixed the problem
     
  28. fschneider

    fschneider

    Joined:
    May 26, 2014
    Posts:
    42
    Just ran across the issue (MacBook Air, OS X 10.11.5, Unity 5.4.0f3). Maximizing the game window and then un-maximizing it again seemed to do the trick for me but then this exception occurred:

    RenderTexture warning: Destroying active render texture. Switching to main context.

    [Edit:] Seems to be a side issue, the game would continue without bigger problems.
     
    JoeStrout likes this.
  29. plasticYoda

    plasticYoda

    Joined:
    Aug 20, 2013
    Posts:
    62
    Its been happening to me for a few weeks now - Mac Mini (Late 2012) MacOS 10.11.6 - Unity 5.4.0f3 PE - resetting the layout will restore the game window. Its totally random, didn't happen yesterday, but just happened today. I'll add the flag from above and watch for it occurring.
     
  30. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    In my case it began as soon as I moved to 5.4.

    The scale is always set to 1 and it happens anyways

    I am now on p2 and same issue.

    It is random and it is happening every 10 to 30 minutes.

    My mac:
    10.11.6 (15G31)
    MacBook Pro (Retina, 15-inch, Late 2013)
    2.3 GHz Intel Core i7
    16 GB 1600 MHz DDR3
    NVIDIA GeForce GT 750M 2048 MB
     
  31. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    The only solution is quitting and opening Unity all over again.
     
  32. N-Dream-AG

    N-Dream-AG

    Joined:
    Jul 27, 2015
    Posts:
    16
    Resetting the Layout (Window->Layouts-> choose any layout) fixes it for me, no need to restart the editor.

    For the record, I'm experiencing both the 'blank view' thing and the occasional glitchiness like in the second screen shot of the post above. OSX 10.10.5, Unity 5.4.0p3
     
    BijayStha and jeffsherwin like this.
  33. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    @shawn I have this phenomenon too on latest OS X.
    Game window goes black occasionally, while editing or playing inside the editor. I have to close the affected Game window, and create another Game window.

    I do receive an error message :
    RenderTexture warning: Destroying active render texture. Switching to main context.
    As I don't do anything related to RenderTexture, and the error appears after the Game window turns black, I think Unity's internal RenderTexture handling is in trouble(Game view can be zoomed-in in Unity5.4, maybe that causes the problem?)

    Hope this issue would be solved soon.
     
  34. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    I was able to run Unity intermittently for over 24 hours with no problem.

    Before that my game window blacked out at least 4 times.
     
  35. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    I just had my first game view blackout in the 5.5 beta. Bonus: It also blacked out the scene view. Selecting the current layout from the dropdown cleared it.
     
  36. plasticYoda

    plasticYoda

    Joined:
    Aug 20, 2013
    Posts:
    62
    Since running with the flag set, I've not seen the blank screen occur. I'll run it without the flag and see what happens for the rest of the week.
     
  37. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Where do you enter the flag:

    -force-gfx-direct
     
  38. plasticYoda

    plasticYoda

    Joined:
    Aug 20, 2013
    Posts:
    62
    On the Mac version, I use the following command in Terminal:

    /Applications/Unity5.4.0/Unity.app/Contents/MacOS/Unity -force-gfx-direct
     
  39. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Thanks a lot.
     
  40. Catsy99

    Catsy99

    Joined:
    Aug 22, 2015
    Posts:
    16
    Hi, yes, for Unity version 5.4.0, I need to start Unity from the Terminal to remove the issues with my game not displaying (or only partly displaying) when playing my game in the Unity Game window. Running the -force-gfx-direct from the Terminal seems to have fixed the issues, and because I need to use it all the time, from the Terminal, I set the Terminal > Preferences > Profiles > Shell, under the "Startup", checked the "Run command" and set it to this: /Applications/Unity/Unity.app/Contents/MacOS/Unity -force-gfx-direct
    Hope Unity will fix this issue soon, so I won't need to run from the Terminal every time I want to use Unity.
     
  41. coolpowers

    coolpowers

    Joined:
    Mar 23, 2010
    Posts:
    125
    Thank goodness I found this thread and there's a workaround, because I'm currently getting this constantly (about every couple of minutes). If it helps, I'm on a mid 2010 iMac, Radeon 5670 (512mb VRAM). In this project, one of my cameras renders to texture and I display it as a UI RawImage.
     
  42. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170

    When this happens to me, I switch to another window layout and then back. That's restores it but does not solve the problem.

    -rich
     
  43. charmandermon

    charmandermon

    Joined:
    Dec 4, 2011
    Posts:
    352
    @Unity
    This happens to me on all of my projects on all of the 5.4 patches. Sometimes anywhere from every 30 seconds to 2 minutes. It is very often but I don't know how to reproduce it as it appears to be random, and not something that I am physically causing. I would like to offer my computers remotely to you guys if you want to use team viewer and you could use mine to help you solve the issues. Im on mac.

    Thanks!
     
    JoeStrout and Shushustorm like this.
  44. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I am facing both issues of the original post.

    Software used:
    Mac OS 10.11.6
    Unity 5.4.0f3

    Hardware used:
    2015 Macbook Pro, 2.8GHz, 16GB RAM, AMD Radeon R9 M370X 2048MB

    The scaler of the game view zoom feature is set to 1.
    I can only seem to be able to get rid of the issue by actually restarting the whole editor.
    While both issues seem to happen completely at random, the first one shows up after about 2-5 minutes when playing in the editor. It even happened when I just had to stop playing for a while and didn't actually play at all (I did not "pause" the game, however).

    Has anybody tried running the editor in low dpi mode yet? Does the issue show up then, too?
     
    Last edited: Sep 10, 2016
  45. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Still happening with 5.4.1f1. Grr. Argh.
     
  46. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    I'm getting the blackout game window quite often, but have only had the glitched-out editor window one time. I posted detailed info to the Unity bug tracker.

    FWIW, I can reliably (albeit temporarily) clear the problem by closing the current game window and opening a new one; I do not have to restart Unity.

    I've also confirmed, using the Scene view, that the game window is still "working" behind its blackness, which is to say if I drive the player controls, things still respond in the game and move around in the Scene view.

    I appreciate the comments from the Unity team indicating it's being worked on. This is a pretty serious bug, and it's good to know you've got our backs. :)
     
    JoeStrout likes this.
  47. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Alright, I don’t know if the new issue I am running into is related to this one here, but I am posting it here anyway, just to make sure if it's important:

    Sometimes, when using Unity Remote 5, I get a similar problem:
    The whole screen turns grey (only UI elements are rendered over the grey background).
    The issue shows up and goes away from time to time.
    I also don’t really know what’s causing this or how to reliably reproduce it.

    @JoeStrout
    5.4.1f1 is available already? I couldn't find it on the official website.
     
  48. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes, I was forced to upgrade on Friday from 5.3.5 by an Asset Store asset (which I then didn't end up using after all, dangit). 5.4.1f1 is what the fresh installer gave me, along with this bug. :(
     
    Shushustorm likes this.
  49. Juho_Oravainen

    Juho_Oravainen

    Unity Technologies

    Joined:
    Jun 5, 2014
    Posts:
    42
    Hey folks!

    I think we have finally found the root cause for this behavior. It's been a really tough one to catch because of the random nature of the issue (threading bug, yikes). Also because of that, we can't be 100% sure that it is fully fixed until we get the fix to the hands of all you who are facing the bug more frequently. Our internal testing looks promising so far but I'm still asking you to report here if the fix seems to help or not.

    Unfortunately we missed this week's release train so the fix will be included in next week's patch which would be 5.4.1p2 and also 5.5.0b4. Sorry about the another week of delay, but you can use the workaround posted above until that.
     
    NS_28, MrDude, NGC6543 and 7 others like this.
  50. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    Thanks for the good news, @Juho_Oravainen, and congrats on some righteous bug-hunting!