Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Source Mirror keeps an additional reference to the original Source #32

Closed
Xaymar opened this issue Jan 23, 2019 · 2 comments
Closed

Source Mirror keeps an additional reference to the original Source #32

Xaymar opened this issue Jan 23, 2019 · 2 comments
Labels
bug Bugs such as crashing, freezing, broken functionality, etc.

Comments

@Xaymar
Copy link
Owner

Xaymar commented Jan 23, 2019

Describe the bug
If Source Mirror is used and saved into a config file, the next time OBS Studio is started there will be an extra reference to the mirrored Source. This reference will never be released.

To Reproduce

  1. Add a Source Mirror
  2. Configure it to mirror any source.
  3. Restart OBS Studio without crashing (hopefully)
  4. Try and get OBS Studio to release the mirrored source.
  5. Fail because the mirrored source can't be released as it has too many references.
  6. Crash on exit

Expected behavior
Sources should be cleaned up as soon as they are no longer used. There should not be an additional reference to a source in this case.

Desktop (please complete the following information):

  • Operating System: Windows
  • Kernel Version: 1809 17763.253
  • Plugin Version: f910312
@Xaymar Xaymar added bug Bugs such as crashing, freezing, broken functionality, etc. prio:high labels Jan 23, 2019
@Xaymar Xaymar added this to the 0.5.0 milestone Jan 23, 2019
@Xaymar
Copy link
Owner Author

Xaymar commented Jan 23, 2019

This is currently considered blocking. It is 100% reproducible and causes file corruption if it happens often enough.

Xaymar added a commit that referenced this issue Jan 23, 2019
There was no proper implementation for all copy and move constructors and operators before, which meant that occasionally the default behavior took over. This is not what we want, as the default behavior doesn't deal well with reference counted pointers.

Related: #32, #15
Xaymar added a commit that referenced this issue Jan 23, 2019
There was no proper implementation for all copy and move constructors and operators before, which meant that occasionally the default behavior took over. This is not what we want, as the default behavior doesn't deal well with reference counted pointers.

Related: #32, #15
Xaymar added a commit that referenced this issue Jan 23, 2019
There was no proper implementation for all copy and move constructors and operators before, which meant that occasionally the default behavior took over. This is not what we want, as the default behavior doesn't deal well with reference counted pointers.

Related: #32, #33
@Xaymar
Copy link
Owner Author

Xaymar commented Jan 23, 2019

Fixed bugs:

  • obs::source now has proper move and copy constructors and operators. (9848c5a)
  • obs::audio_capture was upgraded to util::event and obs::source and now has deleted move and copy constructors and operators. (911b8a1)
  • Source Mirror now only keeps the correct number of references to sources, releasing them as expected. (73b96b8)

https://youtu.be/Sq4Vjxp0VuQ

@Xaymar Xaymar closed this as completed Jan 23, 2019
Repository owner locked as resolved and limited conversation to collaborators Apr 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bugs such as crashing, freezing, broken functionality, etc.
Projects
None yet
Development

No branches or pull requests

1 participant