Repository navigation
frontend: Fix removal of missing plugins - #14008
Merged
Merged
Conversation
Warchamp7
force-pushed
the
plugin-removal-bugs
branch
from
October 7, 2026 21:15
6061cce to
2106432
Compare
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. |
PatTheMav
approved these changes
Oct 8, 2026
PatTheMav
left a comment
Member
There was a problem hiding this comment.
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.
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
force-pushed
the
plugin-removal-bugs
branch
from
October 8, 2026 17:39
2106432 to
328b180
Compare
RytoEX
approved these changes
Oct 8, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Checklist: