Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
browsebox a11y: Don't report EditBrowseBoxTableCell as its own parent
The EditBrowseBoxTableCell ctor's first param is the parent, the second one is the owner. The EditBrowseBoxTableCellAccess is the owner, but not the parent, which means that the params were passed in the wrong order. Since EditBrowseBoxTableCellAccess::getAccessibleContext returns the EditBrowseBoxTableCell, this would result in the EditBrowseBoxTableCell reporting itself as its own parent. This results in infinite recursion when trying to walk up the a11y hierarchy starting at the EditBrowseBoxTableCell. Switch the order of the first 2 params to fix that. This addresses a preexisting issue that was now triggering a crash as described in commit 261dd0fd48b2e2c284485c25feade854154595aa Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Jan 31 11:40:09 2025 +0100 browsebox a11y: Use comphelper::OAccessibleComponentHelper [...] Sample scenario for BrowseBox: 1) Start Base, create a new database 2) With the "Tables" section enabled, click on "Create Table in Design View..." 3) in Accerciser's treeview of the LO a11y, navigate through the a11y objects of the table and its children A quick test with Orca [...] triggered a crash for the BrowseBox case. The underlying problem is a preexisting issue however, and will be addressed in an upcoming commit. Sample backtrace: Thread 1 received signal SIGSEGV, Segmentation fault. 0x00007fd5a4700cde in std::scoped_lock<std::mutex>::scoped_lock (this=0x7ffe58c71100, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/mutex:787 787 { _M_device.lock(); } (rr) bt #0 0x00007fd5a4700cde in std::scoped_lock<std::mutex>::scoped_lock (this=0x7ffe58c71100, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/mutex:787 #1 0x00007fd5a47402e4 in cppu::getTypeEntries (cd=0x7fd59e2da610 <cppu::detail::ImplClassData<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>, com::sun::star::accessibility::XAccessibleComponent>::operator()()::s_cd>) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase_ex.cxx:69 #2 0x00007fd5a473f399 in cppu::queryDeepNoXInterface (pDemandedTDR=0x55ca49389ab0, cd=0x7fd59e2da610 <cppu::detail::ImplClassData<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>, com::sun::star::accessibility::XAccessibleComponent>::operator()()::s_cd>, that=0x55ca4a156260) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase_ex.cxx:148 #3 0x00007fd5a473f917 in cppu::ImplHelper_queryNoXInterface (rType=invalid uno::Type, cd=0x7fd59e2da610 <cppu::detail::ImplClassData<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>, com::sun::star::accessibility::XAccessibleComponent>::operator()()::s_cd>, that=0x55ca4a156260) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase_ex.cxx:225 #4 0x00007fd59ccdac55 in cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>::queryInterface (this=0x55ca4a156260, aType=invalid uno::Type) at include/cppuhelper/implbase.hxx:165 #5 0x00007fd59ccd8375 in cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper, com::sun::star::awt::XFocusListener, com::sun::star::lang::XServiceInfo>::queryInterface (this=0x55ca4a156260, aType=invalid uno::Type) at include/cppuhelper/implbase.hxx:166 #6 0x00007fd59ccfab51 in EditBrowseBoxTableCell::queryInterface (this=0x55ca4a156260, _rType=invalid uno::Type) at /home/michi/development/git/libreoffice/vcl/source/accessibility/accessibleeditbrowseboxcell.cxx:62 #7 0x00007fd59ccd9ac5 in com::sun::star::uno::BaseReference::iquery (pInterface=0x55ca4a156260, rType=invalid uno::Type) at include/com/sun/star/uno/Reference.hxx:59 #8 0x00007fd59cce8739 in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext>::iquery (pInterface=0x55ca4a156260) at include/com/sun/star/uno/Reference.hxx:74 #9 0x00007fd59ccfe39c in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext>::query (rRef=...) at include/com/sun/star/uno/Reference.hxx:380 #10 0x00007fd59ccfd0b6 in com::sun::star::uno::WeakReference<com::sun::star::accessibility::XAccessibleContext>::operator com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext> (this=0x55ca4a14a1e0) at include/cppuhelper/weakref.hxx:218 #11 0x00007fd59ccfc4d1 in EditBrowseBoxTableCellAccess::getAccessibleContext (this=0x55ca4a14a1a0) at /home/michi/development/git/libreoffice/vcl/source/accessibility/accessibleeditbrowseboxcell.cxx:202 #12 0x00007fd59ccfc6a4 in non-virtual thunk to EditBrowseBoxTableCellAccess::getAccessibleContext() () at /home/michi/development/git/libreoffice/instdir/program/libvcllo.so #13 0x00007fd5a4ce8642 in comphelper::OCommonAccessibleComponent::implGetParentContext (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:208 #14 0x00007fd5a4ce8bdb in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:238 #15 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #16 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #17 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #18 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #19 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #20 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #21 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #22 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #23 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #24 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #25 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #26 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #27 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #28 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #29 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #30 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #31 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #32 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #33 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #34 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #35 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #36 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #37 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #38 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #39 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #40 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #41 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #42 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #43 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #44 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #45 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #46 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #47 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #48 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 [...] Change-Id: If8b0edba80c804ba621c808495358d6358be96ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181154 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
- Loading branch information