Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on startup when second monitor is connected to a USB dock #44778

Open
DCamoz opened this issue Dec 29, 2020 · 8 comments
Open

Crash on startup when second monitor is connected to a USB dock #44778

DCamoz opened this issue Dec 29, 2020 · 8 comments

Comments

@DCamoz
Copy link

DCamoz commented Dec 29, 2020

Godot version:
v3.2.3 (Godot_v3.2.3-stable_win64.exe)

OS/device including version:
Windows 10 Version 2004
Intel UHD Graphics 630 / GeForce GTX 1650 (on a laptop)
Dell Universal Dock D6000

Issue description:
Godot crashes on startup when a second monitor is connected through a Dell USB-C dock. Running Godot from the command prompt, it crashes without any errors.

Other things I have tried:

  1. Godot launches fine if the second monitor is connected directly to the HDMI port on the laptop.
  2. Having the USB hub connected without any monitors connected to it does not cause the issue.
  3. On the USB hub, it doesn't matter whether the monitor is connected to a HDMI or DisplayPort (it crashes on either one).
  4. If Godot is launched, and the monitor is only then connected to the USB hub, Godot stays open. However, when a project is created, it crashes (without an error).

Steps to reproduce:
Have a monitor connected through the USB dock, start Godot.

@DCamoz DCamoz changed the title Crash on startup when second monitor is connected to a USB hub Crash on startup when second monitor is connected to a USB dock Dec 29, 2020
@Calinou
Copy link
Member

Calinou commented Dec 29, 2020

Can you get a backtrace from a debug build? You can find precompiled debug builds here.

To get the backtrace, run the Godot binary from a terminal and look at the output when it crashes.

@DCamoz
Copy link
Author

DCamoz commented Dec 29, 2020

Here it is:

Godot Engine v3.2.2.stable.custom_build.6a9fbafcb - https://godotengine.org
CrashHandlerException: Program crashed
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[0] ???
[1] DumpRegistryKeyDefinitions
[2] DumpRegistryKeyDefinitions
[3] DumpRegistryKeyDefinitions
[4] DumpRegistryKeyDefinitions
[5] DrvDescribePixelFormat
[6] wglCopyContext
[7] wglSwapMultipleBuffers
[8] wglCopyContext
[9] wglGetPixelFormat
[10] wglDescribePixelFormat
[11] wglChoosePixelFormat
[12] ChoosePixelFormat
[13] ContextGL_Windows::initialize (C:\godot\platform\windows\context_gl_windows.cpp:157)
[14] OS_Windows::initialize (C:\godot\platform\windows\os_windows.cpp:1607)
[15] Main::setup2 (C:\godot\main\main.cpp:1255)
[16] Main::setup (C:\godot\main\main.cpp:1199)
[17] widechar_main (C:\godot\platform\windows\godot_windows.cpp:150)
[18] _main (C:\godot\platform\windows\godot_windows.cpp:184)
[19] main (C:\godot\platform\windows\godot_windows.cpp:196)
[20] __scrt_common_main_seh (d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[21] BaseThreadInitThunk
-- END OF BACKTRACE --

@Calinou
Copy link
Member

Calinou commented Dec 29, 2020

@DCamoz Does it work better if you force Godot to run on the IGP (right-click the executable and choose Run with graphics processor > Integrated graphics)? Or force it to run on the NVIDIA graphics card?

@DCamoz
Copy link
Author

DCamoz commented Dec 29, 2020

I didn't have the context menu option, but I set the GPU through Settings > Display > Graphics Settings, selecting the executable and choosing the Integrated card. With the Intel card it worked fine, it started up successfully and I was able to create a new project and go into the editor. Forcing to run on the NVIDIA card, it still crashes.

@Calinou
Copy link
Member

Calinou commented Dec 29, 2020

With the Intel card it worked fine, it started up successfully and I was able to create a new project and go into the editor. Forcing to run on the NVIDIA card, it still crashes.

Can you reproduce this issue with other 3D applications such as Blender or games?

@DCamoz
Copy link
Author

DCamoz commented Dec 29, 2020

I have not had any issues except for one game (Battle Brothers). I just tested with Unity (it works) and Blender (it crashes).

When I check the display adapter assigned to each screen, I get "Intel UHD Graphics 630" on the laptop screen and on a monitor connected to the HDMI port on the laptop itself, and "DisplayLink USB Device" on a monitor connected to the USB dock.

Doing some more digging / testing, I found a work-around. I can launch Godot with a monitor connected to the dock if I set the "main display" to either the main laptop screen, or to a monitor connected to the HDMI on the laptop itself. To change the main display: Settings > System > Display, select the monitor, check "Make this my main display". After that, I can move Godot (with the editor open) to any screen without any issues. This also allows me to launch Blender and Battle Brothers.

This solves my immediate issue, but it would be interesting to find out why it crashes if the main display is connected to the dock, if for no other reason than to point to this work-around.

@ghost
Copy link

ghost commented Dec 30, 2020

I'm wondering if it might be related to: #20566

Is there reliance somewhere on always correct results from the OS polling of USB devices?

@ai21m024
Copy link

When starting Godot when my USB-HDMI Adapter (JUA350) is plugged in, Godot instantly crashes. Only "Godot Engine v3.4.2.stable.official.45eaa2daf - https://godotengine.org" is printed in the console.
When plugging it in after Godot started it works fine.

Windows 10 Pro
Godot v3.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants