diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-04-21 10:31:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-04-21 11:44:51 +0200 |
commit | 48d07b42b38fa30f9b0cc0459eac5d182f995a36 (patch) | |
tree | b1fe8656ae968c68e3bd38e3ca575bf4cbeb152c /desktop | |
parent | b6a237ad1f5957b9d32bca7e41aa4a2b3bed01fc (diff) |
rhbz#2075918: Join ExtensionCmdQueue::Thread
...so that it can't still run when the main thread is already in DeInitVCL, and
this thread would crash with SIGSEGV at
> #6 0x00007fe79001ac74 in dp_gui::TheExtensionManager::modified (this=<optimized out>) at /usr/src/debug/libreoffice-7.3.2.2-1.fc36.x86_64/desktop/source/deployment/gui/dp_gui_theextmgr.cxx:498
> #7 0x00007fe790834a0b in operator() (__closure=<optimized out>, xListener=...) at /usr/src/debug/libreoffice-7.3.2.2-1.fc36.x86_64/desktop/source/deployment/manager/dp_extensionmanager.cxx:1416
> #8 cppu::OInterfaceContainerHelper::forEach<com::sun::star::util::XModifyListener, dp_manager::ExtensionManager::fireModified()::<lambda(const com::sun::star::uno::Reference<com::sun::star::util::XModifyListener>&)> > (func=..., this=<optimized out>) at /usr/src/debug/libreoffice-7.3.2.2-1.fc36.x86_64/include/cppuhelper/interfacecontainer.h:292
> #9 dp_manager::ExtensionManager::fireModified (this=0x5613a450e050) at /usr/src/debug/libreoffice-7.3.2.2-1.fc36.x86_64/desktop/source/deployment/manager/dp_extensionmanager.cxx:1414
> #10 0x00007fe79082d907 in dp_manager::ExtensionManager::activateExtension (this=0x5613a450e050, identifier=..., fileName=..., bUserDisabled=<optimized out>, bStartup=<optimized out>, xAbortChannel=..., xCmdEnv=...) at /usr/src/debug/libreoffice-7.3.2.2-1.fc36.x86_64/desktop/source/deployment/manager/dp_extensionmanager.cxx:425
> #11 0x00007fe790830b5f in dp_manager::ExtensionManager::addExtension (this=0x5613a450e050, url=..., properties=..., repository=..., xAbortChannel=..., xCmdEnv=...) at /usr/src/debug/libreoffice-7.3.2.2-1.fc36.x86_64/desktop/source/deployment/manager/dp_extensionmanager.cxx:721
> #12 0x00007fe79002d628 in dp_gui::ExtensionCmdQueue::Thread::_addExtension (bWarnUser=<optimized out>, rRepository=..., rPackageURL=..., rCmdEnv=..., this=0x5613a4753490) at /usr/src/debug/libreoffice-7.3.2.2-1.fc36.x86_64/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:870
> #13 dp_gui::ExtensionCmdQueue::Thread::execute (this=0x5613a4753490) at /usr/src/debug/libreoffice-7.3.2.2-1.fc36.x86_64/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:744
(Which can apparently happen when you quit/restart LO quickly enough after
installing an extension through "Tools - Extension Manager...")
The join was missing ever since the code's introduction in
f167d090345c9c7950665e50006aff4fc0ace078 "INTEGRATION: CWS extmgrui01" (there
originally was an unused stopAndWait that would have joined, but which got
removed in 0014f10d9237e82357e11aedecca817f67827536 "#i105556#: remove unused
code", but there doesn't appear to be at least any obvious reason why joining in
~ExtensionCmdQueue should cause problems (at least with the recent fixes
2dce6754355a06e567427c39154d8747538864b1 "Reliably stop
ExtensionCmdQueue::Thread::execute" and 057f504e6518d1cefd141713c98a15cf9160e676
"Use the sander std::condition_variable semantics in
ExtensionCmdQueue::Thread".)
Change-Id: Iaad47fb77feed529dadf230088e1cb8ffccc80c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133248
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 8 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx | 5 |
2 files changed, 2 insertions, 11 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index fa76e9c7d37f..cd60d78f7421 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -1059,7 +1059,8 @@ ExtensionCmdQueue::ExtensionCmdQueue( DialogHelper * pDialogHelper, } ExtensionCmdQueue::~ExtensionCmdQueue() { - stop(); + m_thread->stop(); + m_thread->join(); } void ExtensionCmdQueue::addExtension( const OUString & extensionURL, @@ -1095,11 +1096,6 @@ void ExtensionCmdQueue::syncRepositories( const uno::Reference< uno::XComponentC dp_misc::syncRepositories( false, new ProgressCmdEnv( xContext, nullptr, "Extension Manager" ) ); } -void ExtensionCmdQueue::stop() -{ - m_thread->stop(); -} - bool ExtensionCmdQueue::isBusy() { return m_thread->isBusy(); diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx index c88e1223f357..3703d1e8c52c 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx @@ -75,11 +75,6 @@ public: void checkForUpdates( std::vector< css::uno::Reference< css::deployment::XPackage > > && vList ); void acceptLicense( const css::uno::Reference< css::deployment::XPackage > &rPackage ); static void syncRepositories( const css::uno::Reference< css::uno::XComponentContext > & xContext ); - /** - This call does not block. It signals the internal thread - that it should install the remaining extensions and then terminate. - */ - void stop(); bool isBusy(); private: |