accessibility/source/standard/vclxaccessibletoolbox.cxx | 11 ++++++++--- distro-configs/LibreOfficeLinux.conf | 1 - vcl/source/window/accessibility.cxx | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-)
New commits: commit 33d25f42f0308f1fa8a8212762cd6abc06b33d42 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu Feb 15 13:06:32 2024 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Mar 7 11:58:26 2024 +0100 tdf#159502 remove --without-system-libxml from LibreOfficeLinux.conf configure.ac explicitly excludes libxml from --without-system-libs but this distro-config "helpfully" adds it explicitly, when the system already contains a usable libxml/libxslt anyway. Change-Id: I79d65d9ed9185277ffde8624efc152b290a6ffb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163438 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 6f6364e572a0570fb097fec098314bffadc5b474) (cherry picked from commit 5ffb9f751f782953b382f8be4b6e4649049f7ce0) diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf index db759a8cb4e5..fba02d362d31 100644 --- a/distro-configs/LibreOfficeLinux.conf +++ b/distro-configs/LibreOfficeLinux.conf @@ -4,7 +4,6 @@ --without-system-poppler --without-system-openssl --without-system-libpng ---without-system-libxml --without-system-jpeg --without-system-jars --without-system-postgresql commit baed91da1f9fa0ef91503df8eb68d8fbb1b0e976 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Mar 5 19:21:21 2024 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Mar 7 11:53:08 2024 +0100 vcl,accessibility: try to fix a crash while disposing SvxFontNameBox_Impl This happened in a 6.3 based branch, no idea how to reproduce it. Clearly the SvxFontNameBox_Impl is being disposed and in its base class Window::dispose() when a call to SvxFontNameBox_Impl::CreateAccessible() happens, which seems very suspicious; try to prevent that. mergedlo.dll!ImplListBox::InsertEntry(long nPos, const rtl::OUString & rStr) Zeile 2225 unter d:\lo mergedlo.dll!ComboBox::InsertEntry(const rtl::OUString & rStr, long nPos) Zeile 886 unter d:\lo mergedlo.dll!FontNameBox::Fill(const FontList * pList) Zeile 447 unter d:\lo [Inlineframe] mergedlo.dll!SvxFontNameBox_Impl::Fill(const FontList * pList) Zeile 236 unter d:\lo mergedlo.dll!lcl_GetDocFontList(const FontList * * ppFontList, SvxFontNameBox_Impl * pBox) Zeile 1290 unter d:\lo mergedlo.dll!SvxFontNameBox_Impl::FillList() Zeile 1331 unter d:\lo mergedlo.dll!SvxFontNameBox_Impl::CreateAccessible() Zeile 3739 unter d:\lo mergedlo.dll!vcl::Window::GetAccessible(bool bCreate) Zeile 129 unter d:\lo acclo.dll!VCLXAccessibleToolBox::getAccessibleChild(long i) Zeile 733 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetItemWindowAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 784 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetChildAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 795 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 165 unter d:\lo acclo.dll!VCLXAccessibleToolBox::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 657 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::WindowChildEventListener(VclWindowEvent & rEvent) Zeile 129 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::LinkStubWindowChildEventListener(void * instance, VclWindowEvent & data) Zeile 118 unter d:\lo [Inlineframe] mergedlo.dll!Link<VclWindowEvent &,void>::Call(VclWindowEvent &) Zeile 84 unter d:\lo mergedlo.dll!vcl::Window::CallEventListeners(VclEventId nEvent, void * pData) Zeile 280 unter d:\lo mergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 735 unter d:\lo mergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 747 unter d:\lo mergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2198 unter d:\lo mergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2176 unter d:\lo [Inlineframe] mergedlo.dll!vcl::Window::Hide() Zeile 925 unter d:\lo mergedlo.dll!vcl::Window::dispose() Zeile 402 unter d:\lo mergedlo.dll!Edit::dispose() Zeile 258 unter d:\lo mergedlo.dll!ComboBox::dispose() Zeile 132 unter d:\lo mergedlo.dll!SvxFontNameBox_Impl::dispose() Zeile 1322 unter d:\lo [Inlineframe] mergedlo.dll!VclPtr<SvxFontNameBox_Impl>::disposeAndClear() Zeile 206 unter d:\lo mergedlo.dll!SvxFontNameToolBoxControl::dispose() Zeile 3309 unter d:\lo mergedlo.dll!framework::ToolBarManager::RemoveControllers() Zeile 651 unter d:\lo mergedlo.dll!framework::ToolBarManager::dispose() Zeile 468 unter d:\lo mergedlo.dll!framework::ToolBarWrapper::dispose() Zeile 105 unter d:\lo mergedlo.dll!framework::ToolbarLayoutManager::destroyToolbars() Zeile 666 unter d:\lo mergedlo.dll!framework::ToolbarLayoutManager::reset() Zeile 364 unter d:\lo mergedlo.dll!framework::LayoutManager::implts_reset(bool bAttached) Zeile 458 unter d:\lo mergedlo.dll!framework::LayoutManager::frameAction(const com::sun::star::frame::FrameActionEvent & aEvent) Zeile 2757 unter d:\lo mergedlo.dll!`anonymous namespace'::XFrameImpl::implts_sendFrameActionEvent(const com::sun::star::frame::FrameAction & aAction) Zeile 2952 unter d:\lo mergedlo.dll!`anonymous namespace'::XFrameImpl::setComponent(const com::sun::star::uno::Reference<com::sun::star::awt::XWindow> & xComponentWindow, const com::sun::star::uno::Reference<com::sun::star::frame::XController> & xController) Zeile 1470 unter d:\lo mergedlo.dll!`anonymous namespace'::XFrameImpl::close(unsigned char bDeliverOwnership) Zeile 1701 unter d:\lo mergedlo.dll!framework::pattern::frame::closeIt(const com::sun::star::uno::Reference<com::sun::star::uno::XInterface> & xResource) Zeile 62 unter d:\lo [Inlineframe] mergedlo.dll!framework::CloseDispatcher::implts_closeFrame() Zeile 492 unter d:\lo Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164451 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 825dde03999a55d02e4d5bc88a4d5beacb65e67f) Change-Id: Ie05cd05158df58021d0fb4a19e9e38cd35af2426 (cherry picked from commit ade99ebb4d00f58339c86bcf4c952805ddce922b) diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index a1a2d5b03d54..d7ffc8aa2056 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -660,9 +660,14 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal Reference< XAccessible> xParent = pChild; if ( pItemWindow ) { - xChild = new OToolBoxWindowItem(0,::comphelper::getProcessComponentContext(),pItemWindow->GetAccessible(),xParent); - pItemWindow->SetAccessible(xChild); - pChild->SetChild( xChild ); + auto const xInnerAcc(pItemWindow->GetAccessible()); + if (xInnerAcc) // else child is being disposed - avoid crashing + { + xChild = new OToolBoxWindowItem(0, + ::comphelper::getProcessComponentContext(), xInnerAcc, xParent); + pItemWindow->SetAccessible(xChild); + pChild->SetChild( xChild ); + } } xChild = pChild; if ( nHighlightItemId > ToolBoxItemId(0) && nItemId == nHighlightItemId ) diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index cd6e50eddfe5..642da801a82e 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -69,7 +69,7 @@ css::uno::Reference< css::accessibility::XAccessible > Window::GetAccessible( bo */ if ( !mpWindowImpl ) return css::uno::Reference< css::accessibility::XAccessible >(); - if ( !mpWindowImpl->mxAccessible.is() && bCreate ) + if (!mpWindowImpl->mxAccessible.is() && !mpWindowImpl->mbInDispose && bCreate) mpWindowImpl->mxAccessible = CreateAccessible(); return mpWindowImpl->mxAccessible;