Skip to content

frontend: Fix removal of missing plugins - #14008

Merged
RytoEX merged 1 commit into
obsproject:masterfrom
Warchamp7:plugin-removal-bugs
Oct 8, 2026
Merged

RytoEX merged 1 commit into
obsproject:masterfrom
Warchamp7:plugin-removal-bugs

Conversation

@Warchamp7

Copy link
Copy Markdown
Member

Description

Updates the plugin manager window rows to use a local copy of ModuleInfo.

Passing around a pointer to the actual entry within the modules_ vector felt like a sensible optimization for updating the enabled state of entries. However deleting entries from the Missing category means pointers to anything after the deleted entry become incorrect or invalidated.

Adjusting the Entry struct to make a copy of the data seemed better than switching containers to keep the pointer stuff working.

Branch includes the changes in #14001 so that will need to be merged first and this PR rebased.

Motivation and Context

Fixes an issue when removing Missing items from the plugin cache, as each removal would cause the remove buttons after that one to point to the wrong entry.

Fixes #14005

How Has This Been Tested?

Removed a bunch of items from the plugin manager window, ensured the right entry was removed each time.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Warchamp7 Warchamp7 added this to the OBS Studio 33.0 milestone Oct 7, 2026
@Warchamp7 Warchamp7 added kind/bug Categorizes issue or PR as related to a bug. area/ui-ux Anything to do with changes or additions to UI/UX elements. labels Oct 7, 2026
@github-project-automation github-project-automation Bot moved this to Ready For Review in 33.0 Release Tracker Oct 7, 2026
@Warchamp7
Warchamp7 force-pushed the plugin-removal-bugs branch from 6061cce to 2106432 Compare October 7, 2026 21:15
@FiniteSingularity

Copy link
Copy Markdown
Contributor

I tried several times with module.json files with missing plugins, and it worked great for all of them. Functionality-wise, I was not able to have it fail like before, so looks good here.

@RytoEX
RytoEX requested review from PatTheMav and RytoEX October 7, 2026 23:27

@PatTheMav PatTheMav left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that seems fine - if it had been a heavier object we'd need to use a shared pointer and safe weak pointers, but it seems cheap enough to just copy.

@RytoEX

RytoEX commented Oct 8, 2026

Copy link
Copy Markdown
Member

LGTM please rebase.

Updates the plugin manager window rows to use a local copy of
ModuleInfo.

Passing around a pointer to the actual entry within the modules_ vector
felt like a sensible optimization for updating the enabled state of
entries. However when deleting entries from the Missing category it
means pointers to anything after the deleted entry become incorrect or
invalidated.
@Warchamp7
Warchamp7 force-pushed the plugin-removal-bugs branch from 2106432 to 328b180 Compare October 8, 2026 17:39
@RytoEX
RytoEX merged commit 7c188a7 into obsproject:master Oct 8, 2026
15 checks passed
@Warchamp7
Warchamp7 deleted the plugin-removal-bugs branch October 8, 2026 19:39
vpacher pushed a commit to vpacher/obs-studio that referenced this pull request Oct 16, 2026
…ng plugins (obs-rust#1080)

* test/cmocka: Safe Mode reports a plugin load failure and lists plugins as Missing

test_plugin_manager builds the real frontend/plugin-manager sources
(PluginManager, PluginManagerWindow, InstalledPluginRow) with Idian
against stand-ins for the frontend app and the libobs module calls, on
Qt's offscreen platform.

A core-only load (Safe Mode, --only-bundled-plugins) leaves the load
state at Failure, so OBS shows the "plugins failed to load" dialog on
every such start. In both modes the Plugin Manager lists the cached
third-party plugins as Missing, with a trash button that deletes their
saved settings. Guards: a full load still reports a plugin failure, and
on a normal start a plugin that is gone is still Missing.

Upstream: obsproject/obs-studio#13948.

Refs obs-rust#1079.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test/cmocka: Removing a Missing plugin makes later rows act on the wrong plugin

Each Plugin Manager row keeps a pointer into the window's module list.
Removing a Missing entry erases it from that list, so every later row
now points at the next plugin. Removing ghost-a and then ghost-c removes
plugin-x instead of ghost-c, and after removing ghost-a, turning
plugin-x off turns plugin-y off. Guard: turning a loaded plugin off and
on again asks for a restart only while it is off.

Upstream: obsproject/obs-studio#14005.

Refs obs-rust#1079.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* frontend: Fix failed plugin popup in safe mode

loadState_ defaults to Failure was not being set after core success.

Port of obsproject/obs-studio@c887ec94e9 (obsproject/obs-studio#14001,
for obsproject/obs-studio#13948). A core-only load (Safe Mode,
--only-bundled-plugins) now reports Success, so OBS no longer shows the
"plugins failed to load" dialog on such starts.

Refs obs-rust#1079.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* frontend: Fix display of plugins in safe mode

The Status enum is renamed to Category as it's more appropriate.
Adds handling for plugins in safe mode by always putting them in the
Installed category since we can't know if they're Errored or Missing.

Also displays the Disabled indicator for all plugins in safe mode.

Port of obsproject/obs-studio@ace39800c4 (obsproject/obs-studio#14001,
for obsproject/obs-studio#13948).

Refs obs-rust#1079.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* frontend: Treat --only-bundled-plugins like Safe Mode in the plugin manager

--only-bundled-plugins also loads only the bundled modules, but the
Plugin Manager listed every cached third-party plugin as Missing, with a
trash button that deletes its saved settings. List them as installed and
disabled, as in Safe Mode, and show a notice that names the flag.
PluginManagerWindow::thirdPartyPluginsSkipped() covers both modes.

Refs obs-rust#1079.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* frontend: Fix removal of missing plugins

Updates the plugin manager window rows to use a local copy of
ModuleInfo.

Passing around a pointer to the actual entry within the modules_ vector
felt like a sensible optimization for updating the enabled state of
entries. However when deleting entries from the Missing category it
means pointers to anything after the deleted entry become incorrect or
invalidated.

Port of obsproject/obs-studio@7c188a79aa (obsproject/obs-studio#14008,
for obsproject/obs-studio#14005). Each row now finds its plugin in the
window's module list by name, so removing a Missing entry no longer
makes the later trash buttons and toggles act on the next plugin.

Difference from upstream: isEnabledPluginsChanged() reads the enabled
state from modules_, which the toggles now change, instead of from the
rows' copies, which keep the state at launch. Upstream reads the copies,
so turning a plugin off no longer showed the restart notice or asked to
restart when the window was saved (test_plugin_manager's
toggle_asks_for_a_restart).

Fixes obs-rust#1079.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Warchamp7 <warchamp2003@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ui-ux Anything to do with changes or additions to UI/UX elements. kind/bug Categorizes issue or PR as related to a bug.

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

Plugin Manager Frontend: Trash can button for missing plugins doesn't always remove from Plugin Manager

4 participants