diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-11 09:27:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-11 10:50:03 +0200 |
commit | d309298d1f70f4ffbf699b1aa1b2bfe08be8c4ef (patch) | |
tree | ae4270374e447851af40986cc788be40be19dfdb /svx/source | |
parent | 35845a056e332c1d78d536b613aeb3183af09a91 (diff) |
tdf#155235 Draw crashes on close: SIGSEGV in SalInstance:GetYieldMutex()
This is a regression from
commit 3b7db802731826b6cc3b55100470b0c61c1f2dfa
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu May 4 10:06:14 2023 +0200
tdf#105404 [API CHANGE] add index to accessiblity change event
The list of children in DocumentFocusListener is getting out of sync
because something is not sending add/remove events for accessible
objects, a problem which was hidden before the commit above.
I can't find the add/remove problem, so do the next best thing - fix the
dispose methods of various accessible objects so that they clear
references to other objects, which results in the relevant objects being
destructed in an order which does not lead to crashes.
Change-Id: Iac7f48d6e3f2bdf30edb5c7fd3c5de861aec4b7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 4 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleShapeTreeInfo.cxx | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index ec9ba6efa410..e3116a9762b7 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -887,6 +887,10 @@ void AccessibleShape::disposing (const lang::EventObject& aEvent) { TOOLS_WARN_EXCEPTION("svx", "caught exception while disposing"); } + mpChildrenManager.reset(); + mxShape.clear(); + maShapeTreeInfo.dispose(); + mpText.reset(); } // document::XShapeEventListener diff --git a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx index df6136f94528..70fd6e44d820 100644 --- a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx +++ b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx @@ -74,8 +74,11 @@ AccessibleShapeTreeInfo& AccessibleShapeTreeInfo::operator= (const AccessibleSha AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo() { - SolarMutexGuard g; - mpWindow.reset(); + if (mpWindow) + { + SolarMutexGuard g; + mpWindow.reset(); + } } void AccessibleShapeTreeInfo::SetDocumentWindow ( |