Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX(plugins): Unset active positional plugin on unloading it #6602

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sqwishy
Copy link
Contributor

@sqwishy sqwishy commented Oct 6, 2024

If a plugin is providing positional audio data and it becomes unloaded, such as by disabling the plugin in the settings GUI, the plugin manager may still interact with the plugin through m_activePositionalDataPlugin.

This looks unintentional and, in debug mode, this fails an assertion in the plugin fairly quickly: assertPluginLoaded(this).

Also, the plugin manager shutdown is moved earlier, since quitting mumble and shutting down the plugin manager while a plugin is linked causes it the plugin manager to log a message through the global Log instance and for the Log instance to display a message on the main window. So bot the Log and the main window must still exist.

Checks


I haven't checked what this does in a release build or on any stable branches. I only noticed this assertion tripped on master if a plugin is un-enabled while it is linked.

And I'm not quite sure if moving where the plugin manager is deconstructed is quite right or if you have a different idea in mind. But if the log is destroyed before the plugin manager, it will try to log about the link lost when unloading an active plugin and crash. If the main window isn't around while logging it can crash trying to display the log in the main window.

If a plugin is providing positional audio data and it becomes unloaded,
such as by disabling the plugin in the settings GUI, the plugin manager
may still interact with the plugin through m_activePositionalDataPlugin.

This looks unintentional and, in debug mode, this fails an assertion in
the plugin fairly quickly: `assertPluginLoaded(this)`.

Also, the plugin manager shutdown is moved earlier, since quitting
mumble and shutting down the plugin manager while a plugin is linked
causes it the plugin manager to log a message through the global Log
instance and for the Log instance to display a message on the main
window. So bot the Log and the main window must still exist.
@sqwishy
Copy link
Contributor Author

sqwishy commented Oct 8, 2024

I happened to notice that #6549 sounds related, and this might fix that issue.

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

Successfully merging this pull request may close these issues.

2 participants