summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-09-04 17:19:03 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2023-09-04 21:41:21 +0200
commit51de048ae97cbd371457dbc07120e30db9ee4187 (patch)
tree5fd5b2ba7de7e7ebf3de4c5451f5de4cfeb66ba3 /accessibility
parentbfa9d01920e7e042a83627d7fa4e78c70bc7ece5 (diff)
tdf#157088 a11y: Dispose list items with list
Don't only clear, but also dispose the list items when the `VCLXAccessibleList` gets disposed. Interestingly, there was already a comment saying // Dispose all items in the list. , but that wasn't done so far... Fixes a crash on exit with the below backtrace after using the font color toolbox item with the qt6 VCL plugin and Orca running: 1 __pthread_kill_implementation pthread_kill.c 44 0x7fe2a2ea80fc 2 __pthread_kill_internal pthread_kill.c 78 0x7fe2a2ea815f 3 __GI_raise raise.c 26 0x7fe2a2e5a472 4 __GI_abort abort.c 79 0x7fe2a2e444b2 5 __assert_fail_base assert.c 92 0x7fe2a2e443d5 6 __assert_fail assert.c 101 0x7fe2a2e533a2 7 (anonymous namespace)::implLookupClient accessibleeventnotifier.cxx 140 0x7fe2a21138a4 8 comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing accessibleeventnotifier.cxx 185 0x7fe2a2113bb8 9 VCLXAccessibleListItem::disposing vclxaccessiblelistitem.cxx 164 0x7fe26870cb58 10 cppu::WeakAggComponentImplHelperBase::dispose implbase.cxx 230 0x7fe2a1c755e3 11 cppu::WeakAggComponentImplHelperBase::release implbase.cxx 204 0x7fe2a1c75312 12 cppu::WeakAggComponentImplHelper6<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::accessibility::XAccessibleText, com::sun::star::lang::XServiceInfo>::release compbase6.hxx 142 0x7fe26870fc0c 13 com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>::~Reference Reference.hxx 114 0x7fe28f2428a7 14 QtAccessibleWidget::~QtAccessibleWidget QtAccessibleWidget.hxx 39 0x7fe28f262cf9 15 QtAccessibleWidget::~QtAccessibleWidget QtAccessibleWidget.hxx 39 0x7fe28f262dd0 16 QAccessibleCache::deleteInterface qaccessiblecache.cpp 173 0x7fe28e0c8e4b 17 QAccessibleCache::~QAccessibleCache qaccessiblecache.cpp 31 0x7fe28e0c845c 18 QAccessibleCache::~QAccessibleCache qaccessiblecache.cpp 32 0x7fe28e0c84e2 19 cleanupAccessibleCache qaccessiblecache.cpp 24 0x7fe28e0c83c8 20 qt_call_post_routines qcoreapplication.cpp 327 0x7fe28e9a4593 21 QApplication::~QApplication qapplication.cpp 663 0x7fe28cf9dff6 22 QApplication::~QApplication qapplication.cpp 717 0x7fe28cf9e2f4 23 std::default_delete<QApplication>::operator() unique_ptr.h 99 0x7fe28f2cf3ae 24 std::__uniq_ptr_impl<QApplication, std::default_delete<QApplication>>::reset unique_ptr.h 211 0x7fe28f2cf7f6 25 std::unique_ptr<QApplication, std::default_delete<QApplication>>::reset unique_ptr.h 509 0x7fe28f2cd72d 26 QtInstance::~QtInstance QtInstance.cxx 273 0x7fe28f2c614f 27 QtInstance::~QtInstance QtInstance.cxx 274 0x7fe28f2c6226 28 DestroySalInstance salplug.cxx 389 0x7fe299a62611 29 DeInitVCL svmain.cxx 600 0x7fe299b41226 30 ImplSVMain svmain.cxx 229 0x7fe299b3f9f7 31 SVMain svmain.cxx 236 0x7fe299b3fa53 32 soffice_main sofficemain.cxx 94 0x7fe2a30a1b5d 33 sal_main main.c 51 0x55c86565c9d4 34 main main.c 49 0x55c86565c9ba Change-Id: I42ddcf5501ddfb363aeae10a86f1c38251e6793b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156522 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 57f9b1eabcb3..101c5815c0ac 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <comphelper/types.hxx>
#include <o3tl/safeint.hxx>
#include <vcl/svapp.hxx>
#include <vcl/toolkit/combobox.hxx>
@@ -107,6 +108,8 @@ void SAL_CALL VCLXAccessibleList::disposing()
VCLXAccessibleComponent::disposing();
// Dispose all items in the list.
+ for (Reference<XAccessible>& rxChild : m_aAccessibleChildren)
+ comphelper::disposeComponent(rxChild);
m_aAccessibleChildren.clear();