-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(client): Issues when updating installed plugins #5152
FIX(client): Issues when updating installed plugins #5152
Conversation
Is there some nightly Installer I can download for testing? |
Yes, you can download it from Azure Pipelines. |
Yes but which one? The latest i see is from friday - is the code already there (i assume no, since its from master branch?) |
Ok did a test. The line edit: When i umload the plugin manually before reinstalling, the shutdown is called. |
That's weird. The shutdown message of your plugin was always printed for me but the file still kept being locked 👀 |
Really, weird. I really have no clue what could cause dll locking, but i will try to search the interwebs for it. |
mumble/src/mumble/PluginManager.cpp Lines 549 to 562 in cc03756
Line 108 in baedddd
@Krzmbrzl Is perhaps the shared pointer being used somewhere? |
I did observe it when installing the plugin because I saw it before closing Mumble.
That was what I thought at first as well but
|
Whats different at your test plugin? |
I don't know. It was the ACRE2 plugin that I tested this with and with that it just worked as expected 🤷 |
At least this tells its plugin sided. |
Ok, i opened hbeni/fgcom-mumble#131 for further tracking. |
Okay after a fair amount of troubleshooting it turned out that the issue was indeed on the plugin's side (more specifically an issue with OpenSSL). Thus I am merging this now. |
The first issue was that the old plugin would simply get overwritten without at least warning the user that such a thing will take place. With this commit this is still not guaranteed as plugins can be installed in different directories in which case no warning is emitted (the user will end up with two versions of the plugin installed in parallel). The second issue was that if a plugin was loaded while it is being updated, on some OS (e.g. Windows) the corresponding library file is locked and can thus not be overwritten. Therefore plugins are now explicitly cleared before an overwrite is attempted.
38b1bef
to
4712665
Compare
What kind of issue with OpenSSL? |
See here: hbeni/fgcom-mumble#131 (comment) TLDR; the windows plugin dll got locked and not released when unloading, preventing the updater from replacing the plugin with the new version. |
Oh, I see. For reference: microsoft/vcpkg#12056 |
PR mumble-voip#5152 overhauled the code for the plugin installer such that it can completely unload a plugin before attempting to overwrite it. However when the installer is called from the updater, that doesn't work since the installer itself was still holding a handle to that plugin, preventing it from unloading. Therefore this commit makes sure that the installer releases its handle before calling the installer. Fixes mumble-voip#4946
PR #5152 overhauled the code for the plugin installer such that it can completely unload a plugin before attempting to overwrite it. However when the installer is called from the updater, that doesn't work since the installer itself was still holding a handle to that plugin, preventing it from unloading. Therefore this commit makes sure that the installer releases its handle before calling the installer. Fixes #4946
PR mumble-voip#5152 overhauled the code for the plugin installer such that it can completely unload a plugin before attempting to overwrite it. However when the installer is called from the updater, that doesn't work since the installer itself was still holding a handle to that plugin, preventing it from unloading. Therefore this commit makes sure that the installer releases its handle before calling the installer. Fixes mumble-voip#4946
The first issue was that the old plugin would simply get overwritten
without at least warning the user that such a thing will take place.
With this commit this is still not guaranteed as plugins can be
installed in different directories in which case no warning is emitted
(the user will end up with two versions of the plugin installed in
parallel).
The second issue was that if a plugin was loaded while it is being
updated, on some OS (e.g. Windows) the corresponding library file is
locked and can thus not be overwritten. Therefore plugins are now
explicitly cleared before an overwrite is attempted.
Checks