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 in graphics-hook64.dll on call to vkCreateSwapchainKHR when using Vulkan Direct Display #11581

Open
mbechard opened this issue Dec 2, 2024 · 0 comments · May be fixed by #11583
Open

Comments

@mbechard
Copy link

mbechard commented Dec 2, 2024

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

30.2.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/83BBFOiQVhsO906Y

OBS Studio Crash Log URL

No response

Expected Behavior

This isn't a crash in OBS Studio itself, rather the graphics-hook64.dll causing other applications to crash. OBS doesn't need to be running, just installed. Direct Display is a new Vulkan feature that allows an app to directly output to a monitor without interacting with the Windows desktop. I would not expect graphics-hook64.dll to cause other applications to crash, especially when OBS isn't even active.

Current Behavior

If OBS is installed on the machine, trying to use this feature crashes due to a bug in graphics-hook64.dll. Likely not handling this new extension properly.

Steps to Reproduce

  1. You need Windows 11 Pro for Workstations or Windows 11 Enterprise to reproduce this. This is because the feature to 'remove a monitor from the desktop' is locked behind those versions.
  2. Uninstall OBS, just so we can see the Direct Display working first.
  3. Download and build Nvidia' sample project for Direct Display: https://github.com/nvpro-samples/vk_ddisplay
  4. You can ignore the sections about mosaic and the config files. Just download the https://www.nvidia.com/en-us/drivers/ddisplay-utility/ and open an admin cmd prompt use:
  5. configureDdisplay.exe status to see the displays on the machine
  6. configureDdisplay.exe remove-from-desktop -i 1, for example, to remove monitor index 1 from the desktop.
  7. Run the sample. You should see hairy torus object rotating on the monitor that isn't part of your Windows desktop anymore.
  8. Shut down and install OBS, then try running again. It should crash.

Thanks for looking into this.

Anything else we should know?

No response

mbechard added a commit to mbechard/obs-studio that referenced this issue Dec 3, 2024
Vulkan Direct Display uses extensions:
VK_KHR_display/VK_EXT_direct_mode_display
This workflow allows creating swapchains that arn't active on the
desktop, so they don't have HWNDs.
Avoid trying to create swap_data when a HWND can't be found.

Fixes obsproject#11581
@mbechard mbechard linked a pull request Dec 3, 2024 that will close this issue
6 tasks
@mbechard mbechard changed the title Create in graphics-hook64.dll on call to vkCreateSwapchainKHR when using Vulkan Direct Display Crash in graphics-hook64.dll on call to vkCreateSwapchainKHR when using Vulkan Direct Display Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant