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
57.29k stars 7.72k forks source link

Window and display captures disappear after undo/redo. #5516

Open CodeYan01 opened 2 years ago

CodeYan01 commented 2 years ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

27.1.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/FJ-gpQ3roLx5boRD

OBS Studio Crash Log URL

No response

Expected Behavior

When undoing, the window and display captures should still stay fine, even if they were resized.

Current Behavior

When the window capture was resized, then undo'ed, the feed from the window capture disappeared and its source size became 0 x 0. The only way to bring it back is by selecting a different scene and going back, or bringing it out to program output.

Steps to Reproduce

  1. Have a scene (scene 1) with a window capture, and another (scene 2) with anything else.
  2. Turn on Studio Mode.
  3. Set up your window capture to capture any window, using the Windows 10 Graphics Capture (doesn't happen with BitBlt).
  4. Transition to Scene 2.
  5. On Scene 1, move anything (could be the window capture, or anything else; it happened even if I moved only a color source).
  6. Undo with Ctrl+Z. Notice that the window capture just turns black, although its bounding box does indeed get undo'ed (only if Bounding Box Type is not "No Bounds"; otherwise, there is no bounding box).
  7. Edit Transform and notice that the source size becomes 0 x 0.
  8. Redo with Ctrl+Y and see that the redo did work, but the capture is still black.
  9. Select Scene 2 and go back to Scene 1. The capture should work again.
  10. Try the steps again with a desktop capture, using Windows 10 Capture (I'm not sure about DXGI Desktop Duplication because it doesn't work on my laptop, I'm assuming due to 2 gpus).

Anything else we should know?

Seems to work fine with BitBlt (tested with notepad, not really sure about other windows since I always use the Windows 10 capture method). Even if only other sources are moved then undo'ed, window captures using Windows 10 capture break.

bavario-lginc commented 2 years ago

Can confirm that this happens in Studio Mode, with both Display and Window Capture. Although strangely, clicking on the source settings will start the capture again, but only until you close the properties window.

flaeri commented 1 year ago

I manage to reproduce the issue, even without undo/redo. I was adding the sources in studio mode, and upon exiting studio mode, and resising a different source, the window capture (WGC) snapped to 0x0. Using 29 beta2.

ErrorCode313 commented 1 year ago

Also having this issue in Studio mode without redo/undo with both browser and window sources. Using 28.1.2