Skip to content

[Source] source is not removed and audio item is not removed from mixer list #3334

Closed

Description

@walker-WSH

Platform

Operating system and version: Win10 x64
OBS Studio version: OBS.25.0.8 x64

Expected Behavior

  1. after removing all sources, related audio items should be removed from audio mixer list;
  2. after removing all sources, when to add new source, there should be no existed source;

Current Behavior

  1. In step (5), audio item is not removed from mixer list;
  2. In step (6), there is existed source.

Steps to Reproduce

  1. add scene-1 and scene-2;
  2. in scene-1, add a group source and a media source, drag media source into group;
  3. in scene-2, add existed group source, add scene source with scene-1;
  4. in scene-2, drag media source out of group source;
  5. in scene-2, remove all sources, check audio mixer list : item of media is not removed (BUG-1);
  6. in scene-1, remove all sources, try to add new media source : there still exist media source even all sources are removed (BUG-2);

Additional information

In step 5 and 6, the two bugs seem caused by disordered reference count of actice_ref and obs_source_t.

operation record:
record.zip

Activity

  1. walker-WSH commented on Aug 26, 2020

    @walker-WSH
    ContributorAuthor

    Another operation can cause the show_refs wrong as well:

    1. add scene1, scene2, scene3;
    2. open multiple view;
    3. in scene1, add a group source;
    4. in scene2, add existed group and scene source with scene1,
    5. in scene3, add existed group and two scene sources with scene1 and scene2;
    6. in scene1, add a camera source, check "Deactivate when not showing", drag camera source into group;
    7. in scene3, delete all sources,
    8. in scene2, delete all sources,
    9. check multiple view, there is no camera view in scene1 (camera's show_refs has been less than 0)

    void obs_source_activate(obs_source_t *source, enum view_type type)
    void obs_source_deactivate(obs_source_t *source, enum view_type type)

    In the two functions, show_refs and activate_refs of all child sources will be ++1 or --1.

    However, currently, there is no logic to make sure ++1 and --1 are paired for all sources.

    Typically steps which causes incorrect reference count:
    (1) lost --1
    a. add group source or scene source, ++1 for all child sources;
    b. remove any child source out of group or scene;
    c. remove group source or scene source, --1 for all child sources (the removed source lost --1)

    (2) lost ++1
    a. add group source or scene source, ++1 for all child sources;
    b. drag any source into group or scene (lost ++1);
    c. remove group source or scene source, --1 for all child sources (the newly added source lost ++1)

    When show_refs or activate_refs is incorrect, many strange features appear, such as:

    1. audio item in mixer list will not be removed (depond on activate_ref);
    2. source won't be render in multiple view (depond on show_refs);
      and so on ~~~

    Can we add any logic to avoid it ?

  2. sebastian-s-beckmann commented on Oct 5, 2022

    @sebastian-s-beckmann
    Member

    We cannot reproduce this issue in OBS 28, and believe it has since been fixed.
    If it's still an issue, please open a new report.

  3. RytoEX commented on Oct 5, 2022

    @RytoEX
    Member

    I cannot seem to reproduce the bug as laid out in the original post. After step 5, I have no items in my audio mixer. As such, I am inclined to agree with @gxalpha above and have this closed. If there are other, distinct issues, please open a new Issue, with Steps to Reproduce, for each distinct bug. Please do not open an Issue that contains multiple separate bugs.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions