obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.36k stars 7.99k forks source link

Process does not exit when OBS is running #7676

Open tyronx opened 2 years ago

tyronx commented 2 years ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

28.0.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/9gtwgOD7ziok9DEm

OBS Studio Crash Log URL

No response

Expected Behavior

My games process exits properly.

Current Behavior

My games process does not exit properly

Steps to Reproduce

  1. Buy and Install Vintage Story - https://www.vintagestory.at/
  2. Start OBS configure game window capture, match VintageStory.exe
  3. Start Vintage Story
  4. Exit Vintage Story
  5. Game keeps running as an invisible process in the task manager

Anything else we should know?

Hello, gamedev here. I develop a PC game in C#/OpenGL with the OpenTK framework. Whenever OBS is launched (not even actively recording), exiting my game becomes impossible. It leaves behind a process in the task manager and the capture preview in OBS also becomes stuck. I'm on Windows 10 Pro and OBS 28.0.3 without any plugins, just the default installation. I tried multiple ways to exit the game (window.Exit(), Environment.Exit(0), Process.GetCurrentProcess().Kill();) but none seem to properly exit with OBS started. Without OBS the game exits just fine. How can I debug this?

PatTheMav commented 1 year ago

@tyronx Could you please confirm if this is still an issue with the most recent OBS version?

At the time of writing we are not aware of any major issues with our OpenGL hook (or more specifically any issue about games terminating that we attached to).

Given that you use a third party library to implement OpenGL support, the issue could either reside inside that library or in your application - one way to debug this would be to set appropriate breakpoints in the IDE of your choice to go through the steps your program takes when being terminated and at which point it hangs or doesn't proceed (and whether that's a call in your own code, the framework code, or somewhere else).

Please be aware that we cannot give support for how your code interacts with graphics APIs, but if there is indeed an issue with our graphics-hook, we'd need some specific information about where it breaks or what it is breaking.