Windows standalone build GLCore crash on startup on high refresh-rate monitors

The standalone windows player crashes when using OpenGLCore API on high refresh-rate monitors (100/120/144Hz). It appears to crash when Unity is trying to create a device context so no window is created, only an error dialog appears stating that it has repeatedly failed to create a window of the correct resolution (1920x1080).

Has anyone else had this problem? Or are you able to test if the same issue occurs for you?

I have tested with Unity 2019.1.8f and the problem still exists. This problem does not exist for Unity 2018.3.1f1 or older versions of 2018, however it seems to have been introduced into Unity in a version after 2018.3.1 but I am unsure exactly when.

I have been trying to find a work-around or some setting within Unity that would address this issue but have come up empty, and I can’t figure out why Unity wouldn’t work for this limited set of refresh-rates.

To reproduce:

  • Create a new project
  • Change the Player Settings → Other Settings → Auto Graphics API for Windows, to use OpenGLCore by default
  • Create a standalone windows build
  • Run the executable on any PC with a high refresh-rate monitor an observe the crash

I have tested using:

  • Razer Blade 15 laptop (RTX 2070 GPU + 144Hz in-built monitor (running at 144Hz)) running Windows 10
  • Multiple Dell Dual Xeon desktops with NVidia Quadro M6000 GPU + 144Hz monitor (running at 100Hz or 120Hz, but seems to work at 60/80/144Hz) running Windows 7 & 10 (tested under both windows versions)

All have latest nvidia drivers and windows updates. The issue does not appear using D3D11/12, or when using lower refresh-rate monitors or having the refresh-rate of the monitors reduced (reducing a monitor to 60/80Hz works, but 120Hz is required for stereoscopic quad-buffering).

I’ve narrowed down that this issue was introduced in Unity 2018.3.6, and still exists in 2019.1, 2019.2 and 2019.3.

4689908--442376--Capture.PNG

Before 2018.3.6 there is no issue using OpenGLCore API on high refresh-rate monitors.

4689908–442379–log.txt (11.8 KB)

Is there a reason you’re using OpenGL? Generally we very much advice against that on Windows.

Mainly for OpenGL quad-buffer and NV-Sync support using nvidia Quadro GPUs in a large cluster (56x HD displays).

We have our own low-level native plugins and clustering solution that works great in unity, but as of Unity 2018.3.6 we can’t run Unity using OpenGL. This is even when using a fresh project without any plugins (heck, without even anything added to the project or scene).

The error logs and dialog aren’t much help, considering it just repeats that it failed to set the resolution. But if we drop the display down to 60Hz (which means stereoscopic is not possible) it works under OpenGL.

If we run our own OpenGL apps (C++, no Unity) there isn’t any issue. It just seems like maybe there was some small issue introduced in 2018.3.6 that effects the OpenGL context creation, and that bug has stuck around since (still there in the latest 2019 release, alpha and betas).

Alright, I’ll see what we can do about this.

1 Like

Cheers for looking into this. We’d love to be able to upgrade the Unity version that all our labs use. I’ll keep an eye on patch notes.

Also, I had submitted a bug on this which I’ve included more logs from testing. Fogbugz ID 1165399.

Hey, thanks for following up. I actually fixed this a week ago and I’m in the process of backporting it.

Many many thanks, awesome news!

I’m actually curious, what was the issue exactly? Just a simple enumeration/display modes issue?

Yeah. DXGI uses Rationals (Numerator/Denominator) to represent refresh rates, while GDI uses rounded refresh rates. GDI is only used when switching display modes for OpenGL, and it would choke when fed data taken from DXGI since it would be one off (59994/1000 would become 59 Hz while GDI expected it to be 60 Hz).

Ok cheers. That also explains some of the numbers we were seeing with other systems. Thanks for chasing this up.

Would this bug be the same as Unity Issue Tracker - Built Projects crash when using OpenGL with refresh rate over 60Hz and resolution over 1080p ?

Was it fixed in 2019.1.12f1? (the bug listing says “Fixed in 2019.1 and 2019.3”). Or is it still being rolled out? I didn’t see it mentioned in release notes and the problem still shows up in a test I did just then with a new project :frowning:

I’m just wondering if there are any available beta/alpha/release versions that I can grab which have the issue fixed for testing.

It landed to Unity 2019.1.13f1, 2019.2.1f1 and 2019.3.0a11. None of them are out yet but 2019.3 and 2019.1 ones should come out very shortly.

Awesome, thanks again!

i am facing this issue even i’m not using OpenGlCore default DX11 i tried to switch to DX12 but no luck giving me same error, unity 2018 is working fine tried lot of games they are working fine too arkham city,asylum,bioshock etc, when i report this problem to unity they said “we can’t reproduce this problem problem will be in drivers” i tried every driver available for GPU. Not to mention i break my windows twice in this changing driver process
my laptop is lenovo W520

quadro 2000M 2GB
Screen res is: 1080X1920
i7 2nd gen

4810157--460439--upload_2019-8-1_14-49-46.png

That sounds like a different issue. Can you create a new thread about it?

2019.3.0a11 is now out. You can use that to test!

And it just got merged into 2018.4.6f1, which should be out in around a week or so.

Tested, and I can confirm the fix works. Cheers for looking into it!

i have, no one replied on it

https://discussions.unity.com/t/741363

You posted to the wrong forum… Anyway I’ll move the thread and respond.