Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #13

Closed
wants to merge 1 commit into from
Closed

Conversation

AryyNewbie
Copy link

No description provided.

ghost pushed a commit that referenced this pull request Nov 7, 2016
...to avoid use-after-free, as e.g. happens on macOS with -fsanitize=address in
CppunitTest_sw_mailmerge:

> ==29010==ERROR: AddressSanitizer: heap-use-after-free on address 0x60800088faf8 at pc 0x000118ebc153 bp 0x7fff52f81a40 sp 0x7fff52f81a38
> READ of size 8 at 0x60800088faf8 thread T0
> WARNING: failed decoding unknown ioctl 0x20007454
> WARNING: failed decoding unknown ioctl 0x20007452
>     #0 0x118ebc152 in AquaSalMenu::SetSubMenu(SalMenuItem*, SalMenu*, unsigned int) salmenu.cxx:597
>     #1 0x1177bbefc in Menu::SetPopupMenu(unsigned short, PopupMenu*) menu.cxx:803
>     #2 0x138dccb5a in framework::MenuBarManager::RemoveListener() menubarmanager.cxx:552
>     #3 0x138dcb452 in framework::MenuBarManager::Destroy() menubarmanager.cxx:237
>     #4 0x138dcd6d7 in framework::MenuBarManager::dispose() menubarmanager.cxx:267
>     #5 0x138dccfa2 in framework::MenuBarManager::RemoveListener() menubarmanager.cxx:587
>     #6 0x138dcb452 in framework::MenuBarManager::Destroy() menubarmanager.cxx:237
>     #7 0x138dcd6d7 in framework::MenuBarManager::dispose() menubarmanager.cxx:267
>     #8 0x138e06acf in framework::MenuBarWrapper::dispose() menubarwrapper.cxx:103
>     #9 0x1389c0f67 in framework::LayoutManager::impl_clearUpMenuBar() layoutmanager.cxx:226
>     #10 0x1389c497b in framework::LayoutManager::implts_destroyElements() layoutmanager.cxx:447
>     #11 0x1389c3777 in framework::LayoutManager::implts_reset(bool) layoutmanager.cxx:413
>     #12 0x1389edf4b in framework::LayoutManager::frameAction(com::sun::star::frame::FrameActionEvent const&) layoutmanager.cxx:2811
>     #13 0x138b9e1a8 in (anonymous namespace)::Frame::implts_sendFrameActionEvent(com::sun::star::frame::FrameAction const&) frame.cxx:3110
>     #14 0x138b8219b in (anonymous namespace)::Frame::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) frame.cxx:1557
>     #15 0x138b88545 in (anonymous namespace)::Frame::close(unsigned char) frame.cxx:1801
>     #16 0x12078429a in SfxFrame::DoClose() frame.cxx:127
>     #17 0x120812990 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) viewfrm.cxx:1234
>     #18 0x11ab542d5 in SfxBroadcaster::Broadcast(SfxHint const&) SfxBroadcaster.cxx:50
>     #19 0x1203a0682 in SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) objxtor.cxx:171
>     #20 0x1204453d2 in SfxBaseModel::close(unsigned char) sfxbasemodel.cxx:1372
>     #21 0x1245130d5 in SwXTextDocument::close(unsigned char) unotxdoc.cxx:621
>     #22 0x1247af99b in CloseModelAndDocSh(com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, tools::SvRef<SfxObjectShell>&) unomailmerge.cxx:115
>     #23 0x1247af4bf in DeleteTmpFile_Impl(com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, tools::SvRef<SfxObjectShell>&, rtl::OUString const&) unomailmerge.cxx:342
>     #24 0x1247b6ad6 in SwXMailMerge::execute(com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&) unomailmerge.cxx:814
>     #25 0x1247b9c62 in non-virtual thunk to SwXMailMerge::execute(com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&) unomailmerge.cxx:434
>     #26 0x11eeab4fd in MMTest::executeMailMerge() mailmerge.cxx:179
>     #27 0x11eea2470 in testMultiPageAnchoredDraws::verify() mailmerge.cxx:336
>     #28 0x11ef3be50 in MMTest::executeMailMergeTest(char const*, char const*, char const*, bool, int, char const*) mailmerge.cxx:87
>     #29 0x11ef38af3 in testMultiPageAnchoredDraws::MailMerge() mailmerge.cxx:334
>     #30 0x11ef557b9 in CppUnit::TestCaller<testMultiPageAnchoredDraws>::runTest() TestCaller.h:166
>     #31 0x10cfff749 in CppUnit::TestCaseMethodFunctor::operator()() const TestCase.cpp:32
>     #32 0x110736b67 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) vclbootstrapprotector.cxx:36
>     #33 0x10cfc9c20 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const ProtectorChain.cpp:20
>     #34 0x110498fa7 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unobootstrapprotector.cxx:89
>     #35 0x10cfc9c20 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const ProtectorChain.cpp:20
>     #36 0x10f776880 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unoexceptionprotector.cxx:65
>     #37 0x10cfc9c20 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const ProtectorChain.cpp:20
>     #38 0x10cf64042 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) DefaultProtector.cpp:15
>     #39 0x10cfc9c20 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const ProtectorChain.cpp:20
>     #40 0x10cfc7200 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) ProtectorChain.cpp:77
>     #41 0x10d06f15a in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) TestResult.cpp:181
>     #42 0x10cffd8cd in CppUnit::TestCase::run(CppUnit::TestResult*) TestCase.cpp:91
>     #43 0x10d00097a in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) TestComposite.cpp:64
>     #44 0x10d00045e in CppUnit::TestComposite::run(CppUnit::TestResult*) TestComposite.cpp:23
>     #45 0x10d00097a in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) TestComposite.cpp:64
>     #46 0x10d00045e in CppUnit::TestComposite::run(CppUnit::TestResult*) TestComposite.cpp:23
>     #47 0x10d0990ac in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) TestRunner.cpp:47
>     #48 0x10d06da55 in CppUnit::TestResult::runTest(CppUnit::Test*) TestResult.cpp:148
>     #49 0x10d099ebd in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) TestRunner.cpp:96
>     #50 0x10cc6f509 in (anonymous namespace)::ProtectedFixtureFunctor::run() const cppunittester.cxx:305
>     #51 0x10cc6a0ac in sal_main() cppunittester.cxx:455
>     #52 0x10cc687a6 in main cppunittester.cxx:362
>     #53 0x7fffc9f36254 in start (libdyld.dylib+0x5254)
>
> 0x60800088faf8 is located 88 bytes inside of 96-byte region [0x60800088faa0,0x60800088fb00)
> freed by thread T0 here:
>     #0 0x10d327b6b in wrap__ZdlPv asan_new_delete.cc:179
>     #1 0x118eb3011 in AquaSalMenu::~AquaSalMenu() salmenu.cxx:279
>     #2 0x118eb10de in AquaSalInstance::DestroyMenu(SalMenu*) salmenu.cxx:238
>     #3 0x1177acd1d in Menu::ImplSetSalMenu(SalMenu*) menu.cxx:2342
>     #4 0x1177ab046 in Menu::dispose() menu.cxx:183
>     #5 0x1177d86f5 in PopupMenu::dispose() menu.cxx:2764
>     #6 0x117f99ee2 in VclReferenceBase::disposeOnce() vclreferencebase.cxx:42
>     #7 0x1177bf7d8 in VclPtr<Menu>::disposeAndClear() vclptr.hxx:208
>     #8 0x1177bbbd5 in Menu::SetPopupMenu(unsigned short, PopupMenu*) menu.cxx:788
>     #9 0x138dccb5a in framework::MenuBarManager::RemoveListener() menubarmanager.cxx:552
>     #10 0x138dcb452 in framework::MenuBarManager::Destroy() menubarmanager.cxx:237
>     #11 0x138dcd6d7 in framework::MenuBarManager::dispose() menubarmanager.cxx:267
>     #12 0x138dccfa2 in framework::MenuBarManager::RemoveListener() menubarmanager.cxx:587
>     #13 0x138dcb452 in framework::MenuBarManager::Destroy() menubarmanager.cxx:237
>     #14 0x138dcd6d7 in framework::MenuBarManager::dispose() menubarmanager.cxx:267
>     #15 0x138e06acf in framework::MenuBarWrapper::dispose() menubarwrapper.cxx:103
>     #16 0x1389c0f67 in framework::LayoutManager::impl_clearUpMenuBar() layoutmanager.cxx:226
>     #17 0x1389c497b in framework::LayoutManager::implts_destroyElements() layoutmanager.cxx:447
>     #18 0x1389c3777 in framework::LayoutManager::implts_reset(bool) layoutmanager.cxx:413
>     #19 0x1389edf4b in framework::LayoutManager::frameAction(com::sun::star::frame::FrameActionEvent const&) layoutmanager.cxx:2811
>     #20 0x138b9e1a8 in (anonymous namespace)::Frame::implts_sendFrameActionEvent(com::sun::star::frame::FrameAction const&) frame.cxx:3110
>     #21 0x138b8219b in (anonymous namespace)::Frame::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) frame.cxx:1557
>     #22 0x138b88545 in (anonymous namespace)::Frame::close(unsigned char) frame.cxx:1801
>     #23 0x12078429a in SfxFrame::DoClose() frame.cxx:127
>     #24 0x120812990 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) viewfrm.cxx:1234
>     #25 0x11ab542d5 in SfxBroadcaster::Broadcast(SfxHint const&) SfxBroadcaster.cxx:50
>     #26 0x1203a0682 in SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) objxtor.cxx:171
>     #27 0x1204453d2 in SfxBaseModel::close(unsigned char) sfxbasemodel.cxx:1372
>     #28 0x1245130d5 in SwXTextDocument::close(unsigned char) unotxdoc.cxx:621
>     #29 0x1247af99b in CloseModelAndDocSh(com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, tools::SvRef<SfxObjectShell>&) unomailmerge.cxx:115
>
> previously allocated by thread T0 here:
>     #0 0x10d32752b in wrap__Znwm asan_new_delete.cc:106
>     #1 0x118eafa18 in AquaSalInstance::CreateMenu(bool, Menu*) salmenu.cxx:230
>     #2 0x1177d75e0 in PopupMenu::PopupMenu() menu.cxx:2711
>     #3 0x1177d7664 in PopupMenu::PopupMenu() menu.cxx:2710
>     #4 0x129136557 in VclPtr<PopupMenu> VclPtr<PopupMenu>::Create<>() vclptr.hxx:131
>     #5 0x1291362de in VCLXMenu::ImplCreateMenu(bool) vclxmenu.cxx:73
>     #6 0x1291463ca in VCLXPopupMenu::VCLXPopupMenu() vclxmenu.cxx:901
>     #7 0x129146414 in VCLXPopupMenu::VCLXPopupMenu() vclxmenu.cxx:900
>     #8 0x138dc5e83 in framework::MenuBarManager::FillMenuManager(Menu*, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, bool) menubarmanager.cxx:1354
>     #9 0x138dc2316 in framework::MenuBarManager::MenuBarManager(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::util::XURLTransformer> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, Menu*, bool, bool) menubarmanager.cxx:140
>     #10 0x138dc72bd in framework::MenuBarManager::MenuBarManager(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::util::XURLTransformer> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, Menu*, bool, bool) menubarmanager.cxx:138
>     #11 0x138dc57bc in framework::MenuBarManager::FillMenuManager(Menu*, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, bool) menubarmanager.cxx:1304
>     #12 0x138dc2316 in framework::MenuBarManager::MenuBarManager(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::util::XURLTransformer> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, Menu*, bool, bool) menubarmanager.cxx:140
>     #13 0x138dc72bd in framework::MenuBarManager::MenuBarManager(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::util::XURLTransformer> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, Menu*, bool, bool) menubarmanager.cxx:138
>     #14 0x138e07ba5 in framework::MenuBarWrapper::initialize(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) menubarwrapper.cxx:181
>     #15 0x138f32e6d in framework::MenuBarFactory::CreateUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::ui::XUIElement> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) menubarfactory.cxx:154
>     #16 0x138f31848 in framework::MenuBarFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) menubarfactory.cxx:63
>     #17 0x138f3313a in non-virtual thunk to framework::MenuBarFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) menubarfactory.cxx:56
>     #18 0x138f56f6e in (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) uielementfactorymanager.cxx:450
>     #19 0x138f5a94a in non-virtual thunk to (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) uielementfactorymanager.cxx:408
>     #20 0x1389ca5da in framework::LayoutManager::implts_createElement(rtl::OUString const&) layoutmanager.cxx:731
>     #21 0x1389d6fb4 in framework::LayoutManager::createElement(rtl::OUString const&) layoutmanager.cxx:1482
>     #22 0x11fbd36f1 in SfxDispatcher::SetMenu_Impl() dispatch.cxx:1216
>     #23 0x11fbc36dc in SfxDispatcher::Update_Impl(bool) dispatch.cxx:1290
>     #24 0x11fb7556d in SfxBindings::NextJob_Impl(Timer*) bindings.cxx:1459
>     #25 0x11fb8ad4c in SfxBindings::NextJob(Timer*) bindings.cxx:1441
>     #26 0x11fb61177 in SfxBindings::LinkStubNextJob(void*, Timer*) bindings.cxx:1439
>     #27 0x11898aea1 in Link<Timer*, void>::Call(Timer*) const link.hxx:84
>     #28 0x11898add6 in Timer::Invoke() timer.cxx:88
>     #29 0x1188dae6d in ImplSchedulerData::Invoke() scheduler.cxx:47

Change-Id: I16d5b11710ee46dbaa77afd94a09ba5f07a311b0
ghost pushed a commit that referenced this pull request Nov 9, 2016
Seen a Jenkins build fail in JunitTest_framework_complex as below, and the only
remotely plausible scenario I can think of is that a call from
Frame::contextChanged -> ToolBarManager::frameAction started the timer after
Frame::close -> dispose -> ... -> ToolBarManager::dispose had been called but
before Frame::close -> dispose -> ... -> ~ToolBarManager had been called.  (And
tracing the calls to Frame member functions, there indeed appear to be call
patterns during JunitTest_framework_complex where Frame::contextChanged is
called from within Frame::close -> dispose -> ...)

Any other calls to m_aAsyncUpdateControllersTimer.Start() in ToolBarManager
appear to already check for !m_bDisposed.

<http://ci.libreoffice.org/job/lo_tb_master_linux_dbg/9049/console>:
> #7  0x00002b2653546566 in __assert_fail_base () at /lib64/libc.so.6
> #8  0x00002b2653546612 in  () at /lib64/libc.so.6
> #9  0x00002b2676f23777 in framework::ToolBarManager::~ToolBarManager() (this=0x3a48710, __in_chrg=<optimized out>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/framework/source/uielement/toolbarmanager.cxx:198
> #10 0x00002b2676f23978 in framework::ToolBarManager::~ToolBarManager() (this=0x3a48710, __in_chrg=<optimized out>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/framework/source/uielement/toolbarmanager.cxx:201
> #11 0x00002b2655fd5328 in cppu::OWeakObject::release() (this=0x3a48710) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/weak.cxx:233
> #12 0x00002b2676ec7138 in cppu::WeakImplHelper<com::sun::star::frame::XFrameActionListener, com::sun::star::lang::XComponent, com::sun::star::ui::XUIConfigurationListener>::release() (this=0x3a48710) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/cppuhelper/implbase.hxx:113
> #13 0x00002b2655ef353a in com::sun::star::uno::cpp_release(void*) (pCppI=0x3a48738) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/com/sun/star/uno/genfunc.hxx:48
> #14 0x00002b2655c5d4ab in cppu::idestructElements(void*, _typelib_TypeDescriptionReference*, int, int, void (*)(void*)) (pElements=0x32c5a28, pElementType=0x1670d90, nStartIndex=0, nStopIndex=5, release=0x2b2655ef3517 <com::sun::star::uno::cpp_release(void*)>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/destr.hxx:238
>         p = 0x3a48738
>         nPos = 4
> #15 0x00002b2655c5d64f in cppu::idestroySequence(_sal_Sequence*, _typelib_TypeDescriptionReference*, _typelib_TypeDescription*, void (*)(void*)) (pSeq=0x32c5a20, pType=0x24a6cf0, pTypeDescr=0x24a6cf0, release=0x2b2655ef3517 <com::sun::star::uno::cpp_release(void*)>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/destr.hxx:284
>         __PRETTY_FUNCTION__ = "void cppu::idestroySequence(uno_Sequence*, typelib_TypeDescriptionReference*, typelib_TypeDescription*, uno_ReleaseFunc)"
> #16 0x00002b2655c8952f in uno_type_sequence_destroy(uno_Sequence*, typelib_TypeDescriptionReference*, uno_ReleaseFunc) (sequence=0x32c5a20, type=0x24a6cf0, release=0x2b2655ef3517 <com::sun::star::uno::cpp_release(void*)>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/sequence.cxx:916
> #17 0x00002b2655f31ba6 in com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> >::~Sequence() (this=0x2679070, __in_chrg=<optimized out>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/com/sun/star/uno/Sequence.hxx:113
>         rType = invalid uno::Type
> #18 0x00002b2655f2ef92 in cppu::OInterfaceIteratorHelper::~OInterfaceIteratorHelper() (this=0x2b26785beaf0, __in_chrg=<optimized out>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/interfacecontainer.cxx:103
>         bShared = false
> #19 0x00002b2655f2fb98 in cppu::OInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) (this=0x32bd280, rEvt=...) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/interfacecontainer.cxx:288
>         aGuard = {pT = 0x0}
>         aIt = {rCont = @0x32bd280, bIsList = 1 '\001', aData = {pAsSequence = 0x2679070, pAsInterface = 0x2679070}, nRemain = 0}
> #20 0x00002b2655f308d7 in cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) (this=0x38bc030, rEvt=...) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/interfacecontainer.cxx:477
>         i = 0
>         nSize = 3
>         ppListenerContainers = std::unique_ptr<cppu::OInterfaceContainerHelper *> containing 0x2f7c650
> #21 0x00002b2676e37180 in (anonymous namespace)::Frame::disposing() (this=0x38bbf30) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/framework/source/services/frame.cxx:2242
>         parent = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b26785beca0
>         xThis = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbfa0
>         layoutMgr = uno::Reference to (framework::LayoutManager *) 0x2fa5190
>         aEvent = {Source = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbfa0}
>         xDisposableCtrl = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b26785beca0
>         xDisposableComp = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b2676e34200 <(anonymous namespace)::Frame::isActive()+160>
>         disp = 0x2f7c650
>         xDispatchHelper = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b26785bec80
>         old = Application::Off
>         contWin = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b26785bf050
> #22 0x00002b2655f2b262 in cppu::WeakComponentImplHelperBase::dispose() (this=0x38bbf30) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/implbase.cxx:107
>         aEvt = {Source = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbf30}
>         aGuard2 = {pT = 0x39553a0}
>         aGuard = {pT = 0x0}
> #23 0x00002b2676e3f0a6 in cppu::PartialWeakComponentImplHelper<com::sun::star::lang::XServiceInfo, com::sun::star::frame::XFrame2, com::sun::star::awt::XWindowListener, com::sun::star::awt::XTopWindowListener, com::sun::star::awt::XFocusListener, com::sun::star::document::XActionLockable, com::sun::star::util::XCloseable, com::sun::star::frame::XComponentLoader, com::sun::star::frame::XTitle, com::sun::star::frame::XTitleChangeBroadcaster, com::sun::star::beans::XPropertySet, com::sun::star::beans::XPropertySetInfo>::dispose() (this=0x38bbf30) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/cppuhelper/compbase.hxx:94
> #24 0x00002b2676e34edb in (anonymous namespace)::Frame::close(sal_Bool) (this=0x38bbf30, bDeliverOwnership=0 '\000') at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/framework/source/services/frame.cxx:1829
>         xSelfHold = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbf30
>         aSource = {Source = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbf30}
>         pContainer = 0x33c4ba0
>         aWriteLock = {m_bCleared = true, m_solarMutex = @0x16529c0}
> #25 0x00002b26752971a1 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) (pThis=0x38bbfd0, nVtableIndex=5, pRegisterReturn=0x0, pReturnTypeRef=0x165a1b0, bSimpleReturn=true, pStack=0x2b26785bf1a0, nStack=0, pGPR=0x2b26785bf2c0, pFPR=0x2b26785bf2f0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:133
>         data = {pMethod = 47444203360446, pStack = 0x2b26785bf1a0, nStack = 0, pGPR = 0x2b26785bf2c0, pFPR = 0x2b26785bf2f0, rax = 47444228043088, rdx = 47444228043040, xmm0 = 4.9549649932863477e-314, xmm1 = 2.3440563169523938e-310}
>         pMethod = 47444209328504
> #26 0x00002b26752960bc in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, typelib_TypeDescriptionReference*, sal_Int32, typelib_MethodParameter*, void*, void**, uno_Any**) (pThis=0x2f330e0, aVtableSlot=..., pReturnTypeRef=0x165a1b0, nParams=1, pParams=0x3200050, pUnoReturn=0x0, pUnoArgs=0x3a70260, ppUnoExc=0x2b26785bf478) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:245
>         pStack = 0x2b26785bf1a0
>         pFPR = {2.34405631697769e-310, 2.3440546323697648e-310, 1.0609978954826362e-313, 2.3440563169796168e-310, 2.5903774855902888e-316, -9.6283901862001054e-07, 2.3440563169800615e-310, 0}
>         __PRETTY_FUNCTION__ = "void cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, typelib_TypeDescriptionReference*, sal_Int32, typelib_MethodParameter*, void*, void**, uno_Any**)"
>         pCppArgs = 0x2b26785bf170
>         pStackStart = 0x2b26785bf1a0
>         pGPR = {59490256, 0, 47444228043568, 47444174450194, 0, 52429824}
>         nTempIndices = 0
>         nFPR = 0
>         pAdjustedThisPtr = 0x38bbfd0
>         ppTempParamTypeDescr = 0x2b26785bf180
>         nGPR = 2
>         pReturnTypeDescr = 0x165a1b0
>         pCppReturn = 0x0
>         bSimpleReturn = true
>         pTempIndices = 0x2b26785bf178
> #27 0x00002b2675296ada in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) (pUnoI=0x2f330e0, pMemberDescr=0x3200400, pReturn=0x0, pArgs=0x3a70260, ppException=0x2b26785bf478) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:436
>         nMemberPos = 5
>         aVtableSlot = {offset = 0, index = 5}
>         pThis = 0x2f330e0
>         pTypeDescr = 0x2590e40
>         __PRETTY_FUNCTION__ = "void bridges::cpp_uno::shared::unoInterfaceProxyDispatch(uno_Interface*, const typelib_TypeDescription*, void*, void**, uno_Any**)"
> #28 0x00002b267653517a in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const (this=0x3aba970, returnValue=0x2b26785bf8a0, outArguments=0x2b26785bf920) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/incomingrequest.cxx:242
>         exc = <error reading variable: Cannot access memory at address 0x3aba87808>
>         pexc = 0x2b26785bf4a0
>         retType = {_pTypeDescr = 0x165a1b0}
>         nSize = 0
>         retBuf = std::__debug::vector of length 0, capacity 0
>         outBufs = empty std::__debug::list
>         args = std::__debug::vector of length 1, capacity 1 = {0x3a331c0}
>         __PRETTY_FUNCTION__ = "bool binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny>*) const"
>         isExc = false
> #29 0x00002b2676533f7a in binaryurp::IncomingRequest::execute() const (this=0x3aba970) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/incomingrequest.cxx:77
>         resetCc = true
>         oldCc = {m_pUnoI = 0x0}
>         ret = {data_ = _uno_Any(void)}
>         outArgs = std::__debug::vector of length 0, capacity 0
>         isExc = false
> #30 0x00002b2676554a88 in binaryurp::(anonymous namespace)::request(void*) (pThreadSpecificData=0x3aba970) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/reader.cxx:85
>         __PRETTY_FUNCTION__ = "void binaryurp::{anonymous}::request(void*)"
> #31 0x00002b2655c27f0b in cppu_threadpool::JobQueue::enter(long, bool) (this=0x398ea80, nDisposeId=39254816, bReturnWhenNoJob=true) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/threadpool/jobqueue.cxx:107
>         guard = {pT = 0x398ea80}
>         job = {pThreadSpecificData = 0x3aba970, doRequest = 0x2b2676554a1f <binaryurp::(anonymous namespace)::request(void*)>}
>         pReturn = 0x0
> #32 0x00002b2655c2cb57 in cppu_threadpool::ORequestThread::run() (this=0x256fb20) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/threadpool/thread.cxx:168
> #33 0x00002b2655c2d04d in osl::threadFunc(void*) (param=0x256fb30) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/osl/thread.hxx:185
>         pObj = 0x256fb30
> #34 0x00002b2652f08340 in osl_thread_start_Impl(void*) (pData=0x2570ac0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sal/osl/unx/thread.cxx:240
>         terminate = false
>         pImpl = 0x2570ac0
>         __PRETTY_FUNCTION__ = "void* osl_thread_start_Impl(void*)"
> #35 0x00002b26538e1dc5 in start_thread () at /lib64/libpthread.so.0
> #36 0x00002b265360eced in clone () at /lib64/libc.so.6

Change-Id: I27e15a72f6b96484cb45928eaabae589cf9d7ed7
ghost pushed a commit that referenced this pull request Nov 14, 2016
...during CppunitTest_filter_dialogs_test:

> filter/source/xsltdialog/xmlfiltersettingsdialog.cxx:1398:20: runtime error: reference binding to null pointer of type 'ResMgr'
>     #0 0x7f144bf5ab10 in XMLFilterListBox::XMLFilterListBox(vcl::Window*, SvxPathControl*) filter/source/xsltdialog/xmlfiltersettingsdialog.cxx:1398:20
>     #1 0x7f144bf7abb8 in VclPtr<XMLFilterListBox> VclPtr<XMLFilterListBox>::Create<VclPtr<VclVBox>&, SvxPathControl*>(VclPtr<VclVBox>&, SvxPathControl*&&) include/vcl/vclptr.hxx:138:46
>     #2 0x7f144bf50df8 in SvxPathControl::SvxPathControl(vcl::Window*) filter/source/xsltdialog/xmlfiltersettingsdialog.cxx:1312:20
>     #3 0x7f144bf7d487 in VclPtr<SvxPathControl> VclPtr<SvxPathControl>::Create<VclPtr<vcl::Window>&>(VclPtr<vcl::Window>&) include/vcl/vclptr.hxx:138:46
>     #4 0x7f144bf56a2f in makeSvxPathControl filter/source/xsltdialog/xmlfiltersettingsdialog.cxx:1378:1
>     #5 0x7f14d2060a04 in VclBuilder::makeObject(vcl::Window*, rtl::OString const&, rtl::OString const&, std::__debug::map<rtl::OString, rtl::OString, std::less<rtl::OString>, std::allocator<std::pair<rtl::OString const, rtl::OString> > >&) vcl/source/window/builder.cxx:1793:17
>     #6 0x7f14d2078ddb in VclBuilder::insertObject(vcl::Window*, rtl::OString const&, rtl::OString const&, std::__debug::map<rtl::OString, rtl::OString, std::less<rtl::OString>, std::allocator<std::pair<rtl::OString const, rtl::OString> > >&, std::__debug::map<rtl::OString, rtl::OString, std::less<rtl::OString>, std::allocator<std::pair<rtl::OString const, rtl::OString> > >&, std::__debug::map<rtl::OString, rtl::OString, std::less<rtl::OString>, std::allocator<std::pair<rtl::OString const, rtl::OString> > >&) vcl/source/window/builder.cxx:1887:25
>     #7 0x7f14d208790a in VclBuilder::handleObject(vcl::Window*, xmlreader::XmlReader&) vcl/source/window/builder.cxx:2856:37
>     #8 0x7f14d20215bc in VclBuilder::handleChild(vcl::Window*, xmlreader::XmlReader&) vcl/source/window/builder.cxx:2114:33
>     #9 0x7f14d2087bea in VclBuilder::handleObject(vcl::Window*, xmlreader::XmlReader&) vcl/source/window/builder.cxx:2859:17
>     #10 0x7f14d20215bc in VclBuilder::handleChild(vcl::Window*, xmlreader::XmlReader&) vcl/source/window/builder.cxx:2114:33
>     #11 0x7f14d2087bea in VclBuilder::handleObject(vcl::Window*, xmlreader::XmlReader&) vcl/source/window/builder.cxx:2859:17
>     #12 0x7f14d20215bc in VclBuilder::handleChild(vcl::Window*, xmlreader::XmlReader&) vcl/source/window/builder.cxx:2114:33
>     #13 0x7f14d200c59a in VclBuilder::VclBuilder(vcl::Window*, rtl::OUString const&, rtl::OUString const&, rtl::OString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) vcl/source/window/builder.cxx:206:9
>     #14 0x7f1492275862 in ScreenshotTest::dumpDialogToPath(rtl::OString const&) test/source/screenshot_test.cxx:177:24

The existing code apparently depended on any calls to getXSLTDialogResMgr in
xmlfiltersettingsdialog.cxx only happening after pXSLTResMgr had been set up in
the outer XMLFilterDialogComponent::execute in xmlfilterdialogcomponent.cxx.
That is not true when each dialog is opened independently in the screenshot
test, so instead just call CreateResMgr on demand wherever needed.

Change-Id: I9f6dc7c66d4999137352a8d91665b954f4088085
ghost pushed a commit that referenced this pull request Nov 22, 2016
...as seen during CppunitTest_sd_dialogs_test:

> collationdatareader.cpp:422:13: runtime error: null pointer passed as argument 1, which is declared to never be null
> /usr/include/string.h:66:33: note: nonnull attribute specified here
>     #0 0x7fc3fc837f72 in icu_58::CollationDataReader::read(icu_58::CollationTailoring const*, unsigned char const*, int, icu_58::CollationTailoring&, UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/collationdatareader.cpp:422:13
>     #1 0x7fc3fc7fc0bb in icu_58::CollationLoader::loadFromData(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:395:5
>     #2 0x7fc3fc7fad16 in icu_58::CollationLoader::loadFromCollations(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:376:16
>     #3 0x7fc3fc7f0c74 in icu_58::CollationLoader::createCacheEntry(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:221:16
>     #4 0x7fc3fc7f079e in icu_58::LocaleCacheKey<icu_58::CollationCacheEntry>::createObject(void const*, UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:144:20
>     #5 0x7fc4262d558f in icu_58::UnifiedCache::_get(icu_58::CacheKeyBase const&, icu_58::SharedObject const*&, void const*, UErrorCode&) const workdir/UnpackedTarball/icu/source/common/unifiedcache.cpp:409:17
>     #6 0x7fc3fc806774 in void icu_58::UnifiedCache::get<icu_58::CollationCacheEntry>(icu_58::CacheKey<icu_58::CollationCacheEntry> const&, void const*, icu_58::CollationCacheEntry const*&, UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/../common/unifiedcache.h:234:8
>     #7 0x7fc3fc7f1c93 in icu_58::CollationLoader::getCacheEntry(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:466:12
>     #8 0x7fc3fc7f76d4 in icu_58::CollationLoader::loadFromBundle(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:299:16
>     #9 0x7fc3fc7f0ae5 in icu_58::CollationLoader::createCacheEntry(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:219:16
>     #10 0x7fc3fc7f079e in icu_58::LocaleCacheKey<icu_58::CollationCacheEntry>::createObject(void const*, UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:144:20
>     #11 0x7fc4262d558f in icu_58::UnifiedCache::_get(icu_58::CacheKeyBase const&, icu_58::SharedObject const*&, void const*, UErrorCode&) const workdir/UnpackedTarball/icu/source/common/unifiedcache.cpp:409:17
>     #12 0x7fc3fc806774 in void icu_58::UnifiedCache::get<icu_58::CollationCacheEntry>(icu_58::CacheKey<icu_58::CollationCacheEntry> const&, void const*, icu_58::CollationCacheEntry const*&, UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/../common/unifiedcache.h:234:8
>     #13 0x7fc3fc7f1c93 in icu_58::CollationLoader::getCacheEntry(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:466:12
>     #14 0x7fc3fc7f5a19 in icu_58::CollationLoader::loadFromLocale(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:247:16
>     #15 0x7fc3fc7f0956 in icu_58::CollationLoader::createCacheEntry(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:217:16
>     #16 0x7fc3fc7f079e in icu_58::LocaleCacheKey<icu_58::CollationCacheEntry>::createObject(void const*, UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:144:20
>     #17 0x7fc4262d558f in icu_58::UnifiedCache::_get(icu_58::CacheKeyBase const&, icu_58::SharedObject const*&, void const*, UErrorCode&) const workdir/UnpackedTarball/icu/source/common/unifiedcache.cpp:409:17
>     #18 0x7fc3fc806774 in void icu_58::UnifiedCache::get<icu_58::CollationCacheEntry>(icu_58::CacheKey<icu_58::CollationCacheEntry> const&, void const*, icu_58::CollationCacheEntry const*&, UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/../common/unifiedcache.h:234:8
>     #19 0x7fc3fc7f1c93 in icu_58::CollationLoader::getCacheEntry(UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:466:12
>     #20 0x7fc3fc7f1525 in icu_58::CollationLoader::loadTailoring(icu_58::Locale const&, UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:164:19
>     #21 0x7fc3fc7ba783 in icu_58::Collator::makeInstance(icu_58::Locale const&, UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/coll.cpp:460:40
>     #22 0x7fc3fc7bb891 in icu_58::Collator::createInstance(icu_58::Locale const&, UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/coll.cpp:448:16
>     #23 0x7fc3f196cf17 in com::sun::star::i18n::Collator_Unicode::loadCollatorAlgorithm(rtl::OUString const&, com::sun::star::lang::Locale const&, int) i18npool/source/collator/collator_unicode.cxx:375:57
>     #24 0x7fc3f1945c22 in com::sun::star::i18n::CollatorImpl::loadCollatorAlgorithm(rtl::OUString const&, com::sun::star::lang::Locale const&, int) i18npool/source/collator/collatorImpl.cxx:93:25
>     #25 0x7fc3f1944a53 in com::sun::star::i18n::CollatorImpl::loadDefaultCollator(com::sun::star::lang::Locale const&, int) i18npool/source/collator/collatorImpl.cxx:79:20
>     #26 0x7fc41d2c12e6 in CollatorWrapper::loadDefaultCollator(com::sun::star::lang::Locale const&, int) unotools/source/i18n/collatorwrapper.cxx:75:45

Change-Id: I21868c0a80e06587f9ed802ec3f8d5a89f3cb9aa
ghost pushed a commit that referenced this pull request Jan 2, 2017
Direct leak of 1296 byte(s) in 6 object(s) allocated from:
    #0 0x5de7a0 in __interceptor_calloc /src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:72
    #1 0xe0f2132 in hb_shape_plan_t* hb_object_create<hb_shape_plan_t>() /work/workdir/UnpackedTarball/harfbuzz/src/./hb-object-private.hh:129:24
    #2 0xe0f2132 in hb_shape_plan_create /work/workdir/UnpackedTarball/harfbuzz/src/hb-shape-plan.cc:133
    #3 0x85a3488 in CommonSalLayout::LayoutText(ImplLayoutArgs&) /src/libreoffice/vcl/source/gdi/CommonSalLayout.cxx:555:40
    #4 0x3d97cf2 in OutputDevice::ImplLayout(rtl::OUString const&, int, int, Point const&, long, long const*, SalLayoutFlags, vcl::TextLayoutCache const*) const /src/libreoffice/vcl/source/outdev/text.cxx:1318:36
    #5 0x3d990e1 in OutputDevice::GetTextArray(rtl::OUString const&, long*, int, int, vcl::TextLayoutCache const*) const /src/libreoffice/vcl/source/outdev/text.cxx:966:35
    #6 0x3d98d2d in OutputDevice::GetTextWidth(rtl::OUString const&, int, int, vcl::TextLayoutCache const*) const /src/libreoffice/vcl/source/outdev/text.cxx:893:19
    #7 0x485f630 in ImplFontMetricData::ImplInitTextLineSize(OutputDevice const*) /src/libreoffice/vcl/source/font/fontmetric.cxx:338:30
    #8 0x3d6801e in OutputDevice::ImplNewFont() const /src/libreoffice/vcl/source/outdev/font.cxx:1095:42
    #9 0x3d64d92 in OutputDevice::GetFontMetric() const /src/libreoffice/vcl/source/outdev/font.cxx:171:23
    #10 0x8695053 in WinMtfFontStyle::WinMtfFontStyle(LOGFONTW&) /src/libreoffice/vcl/source/filter/wmf/winmtf.cxx:265:36
    #11 0x8686b9b in std::__1::unique_ptr<WinMtfFontStyle, std::__1::default_delete<WinMtfFontStyle> > o3tl::make_unique<WinMtfFontStyle, LOGFONTW&>(LOGFONTW&) /src/libreoffice/include/o3tl/make_unique.hxx:27:35
    #12 0x86eb23c in WMFReader::ReadRecordParams(unsigned short) /src/libreoffice/vcl/source/filter/wmf/winwmf.cxx:937:32
    #13 0x86fb901 in WMFReader::ReadWMF() /src/libreoffice/vcl/source/filter/wmf/winwmf.cxx:1371:25
    #14 0x47c5949 in ReadWindowMetafile(SvStream&, GDIMetaFile&) /src/libreoffice/vcl/source/filter/wmf/wmf.cxx:78:45
    #15 0x61c7ac in LLVMFuzzerTestOneInput /src/libreoffice/vcl/workben/wmffuzzer.cxx:98:11
    #16 0x1011f7e8 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:541:13
    #17 0x10120544 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:492:3
    #18 0x1013ecca in fuzzer::Fuzzer::RunOne(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&) /src/libfuzzer/FuzzerInternal.h:118:41
    #19 0x1011ee3d in fuzzer::Fuzzer::ShuffleAndMinimize(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >*) /src/libfuzzer/FuzzerLoop.cpp:471:30
    #20 0x100d0aea in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:533:6
    #21 0x100c38c8 in main /src/libfuzzer/FuzzerMain.cpp:20:10
    #22 0x7fef8459582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Change-Id: Iaa23f8282a45b7c584410b5e8c7b6e9774a34aaf
Reviewed-on: https://gerrit.libreoffice.org/32508
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit d19c05b)
Reviewed-on: https://gerrit.libreoffice.org/32586
Tested-by: Jenkins <ci@libreoffice.org>
ghost pushed a commit that referenced this pull request Feb 28, 2017
...during CppunitTest_xmlsecurity_pdfsigning:

> tools/source/stream/stream.cxx:1220:20: runtime error: null pointer passed as argument 1, which is declared to never be null
> /usr/include/string.h:43:28: note: nonnull attribute specified here
>     #0 0x7fb2116abe4a in SvStream::ReadBytes(void*, unsigned long) tools/source/stream/stream.cxx:1220:13
>     #1 0x7fb1dee7a4f0 in xmlsecurity::pdfio::PDFStreamElement::Read(SvStream&) xmlsecurity/source/pdfio/pdfdocument.cxx:3639:13
>     #2 0x7fb1dee350ec in xmlsecurity::pdfio::PDFDocument::Tokenize(SvStream&, xmlsecurity::pdfio::TokenizeMode, std::__debug::vector<std::unique_ptr<xmlsecurity::pdfio::PDFElement, std::default_delete<xmlsecurity::pdfio::PDFElement> >, std::allocator<std::unique_ptr<xmlsecurity::pdfio::PDFElement, std::default_delete<xmlsecurity::pdfio::PDFElement> > > >&, xmlsecurity::pdfio::PDFObjectElement*) xmlsecurity/source/pdfio/pdfdocument.cxx:1153:44
>     #3 0x7fb1dee464d3 in xmlsecurity::pdfio::PDFDocument::Read(SvStream&) xmlsecurity/source/pdfio/pdfdocument.cxx:1306:12
>     #4 0x7fb1e7916ffe in PDFSigningTest::verify(rtl::OUString const&, unsigned long, rtl::OString const&) xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx:127:5
>     #5 0x7fb1e791dd86 in PDFSigningTest::sign(rtl::OUString const&, rtl::OUString const&, unsigned long) xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx:178:5
>     #6 0x7fb1e791ef8e in PDFSigningTest::testPDFAdd() xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx:189:29
>     #7 0x7fb1e798885b in CppUnit::TestCaller<PDFSigningTest>::runTest() workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166:6
>     #8 0x7fb22b8bfd8b in CppUnit::TestCaseMethodFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5
>     #9 0x7fb211f6699f in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) test/source/vclbootstrapprotector.cxx:36:14
>     #10 0x7fb22b87e3ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #11 0x7fb21ba510cf in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89:12
>     #12 0x7fb22b87e3ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #13 0x7fb21f6ff2c4 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16
>     #14 0x7fb22b87e3ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #15 0x7fb22b7fc350 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12
>     #16 0x7fb22b87e3ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #17 0x7fb22b87ae70 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:77:18
>     #18 0x7fb22b93a0f5 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:181:28
>     #19 0x7fb22b8bdfa4 in CppUnit::TestCase::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13
>     #20 0x7fb22b8c27a7 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
>     #21 0x7fb22b8c1819 in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
>     #22 0x7fb22b8c27a7 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
>     #23 0x7fb22b8c1819 in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
>     #24 0x7fb22b9785c9 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27
>     #25 0x7fb22b93840d in CppUnit::TestResult::runTest(CppUnit::Test*) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:148:9
>     #26 0x7fb22b97989b in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14
>     #27 0x53043c in (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:305:20
>     #28 0x52c089 in sal_main() sal/cppunittester/cppunittester.cxx:455:20
>     #29 0x52a742 in main sal/cppunittester/cppunittester.cxx:362:1
>     #30 0x7fb229b05400 in __libc_start_main /usr/src/debug/glibc-2.24-33-ge9e69e4/csu/../csu/libc-start.c:289
>     #31 0x437d49 in _start (workdir/LinkTarget/Executable/cppunittester+0x437d49)

Change-Id: I8bf8c28219b4525874f83fbb164eb5eec02ac1b6
ghost pushed a commit that referenced this pull request Mar 15, 2017
...causing UBSan failure with the new
lotuswordpro/qa/cppunit/data/fail/stack-1.lwp from
e68faf7 "ofz#866 crash in
LwpFormulaInfo::ReadArguments":

> Testing file:///.../lotuswordpro/qa/cppunit/data/fail/stack-1.lwp:
> lotuswordpro/source/filter/bencont.cxx:132:11: runtime error: downcast of address 0x60800043af28 which does not point to an object of type 'OpenStormBento::CBenObject'
> 0x60800043af28: note: object is of type 'OpenStormBento::CUtListElmt'
>  89 7f 00 00  70 94 cc 7f 89 7f 00 00  80 ae 2d 00 70 60 00 00  80 ae 2d 00 70 60 00 00  30 95 cc 7f
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'OpenStormBento::CUtListElmt'
>     #0 0x7f897ed108f7 in OpenStormBento::LtcBenContainer::RegisterPropertyName(char const*, OpenStormBento::CBenPropertyName**) lotuswordpro/source/filter/bencont.cxx:132:11
>     #1 0x7f897ed11df7 in OpenStormBento::LtcBenContainer::FindNextValueStreamWithPropertyName(char const*) lotuswordpro/source/filter/bencont.cxx:227:5
>     #2 0x7f897ed12492 in OpenStormBento::LtcBenContainer::FindValueStreamWithPropertyName(char const*) lotuswordpro/source/filter/bencont.cxx:256:12
>     #3 0x7f897ef1fc19 in Decompress(SvStream*, SvStream*&) lotuswordpro/source/filter/lwpfilter.cxx:122:72
>     #4 0x7f897ef20deb in GetLwpSvStream(SvStream*, LwpSvStream*&) lotuswordpro/source/filter/lwpfilter.cxx:164:14
>     #5 0x7f897ef21836 in ReadWordproFile(SvStream&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler>&) lotuswordpro/source/filter/lwpfilter.cxx:195:13
>     #6 0x7f897ed290cd in LotusWordProImportFilter::importImpl(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) lotuswordpro/source/filter/LotusWordProImportFilter.cxx:76:14
>     #7 0x7f897ed296fd in LotusWordProImportFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) lotuswordpro/source/filter/LotusWordProImportFilter.cxx:88:12
>     #8 0x7f898eb6db9a in (anonymous namespace)::LotusWordProTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:59:27
>     #9 0x7f898e3c7901 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:130:20
>     #10 0x7f898e3c9fd5 in test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:158:5
>     #11 0x7f898eb6ee58 in (anonymous namespace)::LotusWordProTest::test() lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:64:9
>     #12 0x7f898eb7006b in CppUnit::TestCaller<(anonymous namespace)::LotusWordProTest>::runTest() workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166:6
>     #13 0x7f89d2d74d8b in CppUnit::TestCaseMethodFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5
>     #14 0x7f89b944f99f in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) test/source/vclbootstrapprotector.cxx:36:14
>     #15 0x7f89d2d333ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #16 0x7f89c2f440cf in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89:12
>     #17 0x7f89d2d333ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #18 0x7f89c6bff2c4 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16
>     #19 0x7f89d2d333ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #20 0x7f89d2cb1350 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12
>     #21 0x7f89d2d333ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #22 0x7f89d2d2fe70 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:77:18
>     #23 0x7f89d2def0f5 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:181:28
>     #24 0x7f89d2d72fa4 in CppUnit::TestCase::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13
>     #25 0x7f89d2d777a7 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
>     #26 0x7f89d2d76819 in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
>     #27 0x7f89d2d777a7 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
>     #28 0x7f89d2d76819 in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
>     #29 0x7f89d2e2d5c9 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27
>     #30 0x7f89d2ded40d in CppUnit::TestResult::runTest(CppUnit::Test*) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:148:9
>     #31 0x7f89d2e2e89b in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14
>     #32 0x53043c in (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:305:20
>     #33 0x52c089 in sal_main() sal/cppunittester/cppunittester.cxx:455:20
>     #34 0x52a742 in main sal/cppunittester/cppunittester.cxx:362:1
>     #35 0x7f89d0fb8400 in __libc_start_main /usr/src/debug/glibc-2.24-33-ge9e69e4/csu/../csu/libc-start.c:289
>     #36 0x437d49 in _start (workdir/LinkTarget/Executable/cppunittester+0x437d49)

Change-Id: I556c3ab6fcc7a08fceac5a7195f81d570fc2a025
@dandv
Copy link

dandv commented Oct 14, 2017

Not sure if you missed the repo description, or if it wasn't there when you submitted this PR. Here it is:

Read-only LibreOffice core repo - no pull request (use gerrit instead https://gerrit.libreoffice.org/)

ghost pushed a commit that referenced this pull request May 14, 2018
...during CppunitTest_vcl_pdfexport:

> workdir/UnpackedTarball/pdfium/core/fxge/ge/cfx_facecache.cpp:208:18: runtime error: null pointer passed as argument 1, which is declared to never be null
> /usr/include/string.h:62:62: note: nonnull attribute specified here
>     #0 0x2ba8c1d8c685 in CFX_FaceCache::RenderGlyph(CFX_Font const*, unsigned int, bool, CFX_Matrix const*, int, int) workdir/UnpackedTarball/pdfium/core/fxge/ge/cfx_facecache.cpp:208:5
>     #1 0x2ba8c1d92007 in CFX_FaceCache::LookUpGlyphBitmap(CFX_Font const*, CFX_Matrix const*, CFX_ByteString const&, unsigned int, bool, int, int) workdir/UnpackedTarball/pdfium/core/fxge/ge/cfx_facecache.cpp:390:35
>     #2 0x2ba8c1d90f44 in CFX_FaceCache::LoadGlyphBitmap(CFX_Font const*, unsigned int, bool, CFX_Matrix const*, int, int, int&) workdir/UnpackedTarball/pdfium/core/fxge/ge/cfx_facecache.cpp:307:10
>     #3 0x2ba8c1dfd35e in CFX_Font::LoadGlyphBitmap(unsigned int, bool, CFX_Matrix const*, int, int, int&) const workdir/UnpackedTarball/pdfium/core/fxge/ge/cfx_font.cpp:688:26
>     #4 0x2ba8c1ef56f0 in CFX_RenderDevice::DrawNormalText(int, FXTEXT_CHARPOS const*, CFX_Font*, float, CFX_Matrix const*, unsigned int, unsigned int) workdir/UnpackedTarball/pdfium/core/fxge/ge/cfx_renderdevice.cpp:946:31
>     #5 0x2ba8c13c4e05 in CPDF_TextRenderer::DrawNormalText(CFX_RenderDevice*, std::__debug::vector<unsigned int, std::allocator<unsigned int> > const&, std::__debug::vector<float, std::allocator<float> > const&, CPDF_Font*, float, CFX_Matrix const*, unsigned int, CPDF_RenderOptions const*) workdir/UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_textrenderer.cpp:167:17
>     #6 0x2ba8c13141f3 in CPDF_RenderStatus::ProcessText(CPDF_TextObject*, CFX_Matrix const*, CFX_PathData*) workdir/UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp:1777:10
>     #7 0x2ba8c130bf5b in CPDF_RenderStatus::ProcessObjectNoClip(CPDF_PageObject*, CFX_Matrix const*) workdir/UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp:1141:14
>     #8 0x2ba8c130db5a in CPDF_RenderStatus::ContinueSingleObject(CPDF_PageObject*, CFX_Matrix const*, IFX_Pause*) workdir/UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp:1106:3
>     #9 0x2ba8c12df4f2 in CPDF_ProgressiveRenderer::Continue(IFX_Pause*) workdir/UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_progressiverenderer.cpp:78:30
>     #10 0x2ba8c12dbae9 in CPDF_ProgressiveRenderer::Start(IFX_Pause*) workdir/UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_progressiverenderer.cpp:39:3
>     #11 0x2ba8c0652b76 in (anonymous namespace)::RenderPageImpl(CPDF_PageRenderContext*, CPDF_Page*, CFX_Matrix const&, FX_RECT const&, int, bool, IFSDK_PAUSE_Adapter*) workdir/UnpackedTarball/pdfium/fpdfsdk/fpdfview.cpp:115:26
>     #12 0x2ba8c064d8cd in FPDF_RenderPage_Retail(CPDF_PageRenderContext*, void*, int, int, int, int, int, int, bool, IFSDK_PAUSE_Adapter*) workdir/UnpackedTarball/pdfium/fpdfsdk/fpdfview.cpp:986:3
>     #13 0x2ba8c064d01d in FPDF_RenderPageBitmap workdir/UnpackedTarball/pdfium/fpdfsdk/fpdfview.cpp:728:3
>     #14 0x2ba8b2adf081 in (anonymous namespace)::generatePreview(SvStream&, Graphic&) vcl/source/filter/ipdf/pdfread.cxx:67:5
>     #15 0x2ba8b2adddf0 in vcl::ImportPDF(SvStream&, Graphic&) vcl/source/filter/ipdf/pdfread.cxx:109:10
>     #16 0x2ba8b298f234 in GraphicFilter::ImportGraphic(Graphic&, rtl::OUString const&, SvStream&, unsigned short, unsigned short*, GraphicFilterImportFlags, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>*, WMF_EXTERNALHEADER*) vcl/source/filter/graphicfilter.cxx:1689:18
>     #17 0x2ba8b29846e8 in GraphicFilter::ImportGraphic(Graphic&, rtl::OUString const&, SvStream&, unsigned short, unsigned short*, GraphicFilterImportFlags, WMF_EXTERNALHEADER*) vcl/source/filter/graphicfilter.cxx:1315:12
>     #18 0x2ba904b12799 in SwGrfNode::ImportGraphic(SvStream&) sw/source/core/graphic/ndgrf.cxx:458:43
>     #19 0x2ba904b0ea43 in SwGrfNode::SwapIn(bool) sw/source/core/graphic/ndgrf.cxx:571:28
>     #20 0x2ba904b0fd52 in SwGrfNode::GetGrfObj(bool) const sw/source/core/graphic/ndgrf.cxx:389:35
>     #21 0x2ba9037c40f9 in SwNoTextFrame::PaintPicture(OutputDevice*, SwRect const&) const sw/source/core/doc/notxtfrm.cxx:883:48
>     #22 0x2ba9037bcec2 in SwNoTextFrame::Paint(OutputDevice&, SwRect const&, SwPrintData const*) const sw/source/core/doc/notxtfrm.cxx:309:9
>     #23 0x2ba9052dc0d3 in SwLayoutFrame::Paint(OutputDevice&, SwRect const&, SwPrintData const*) const sw/source/core/layout/paintfrm.cxx:3652:21
>     #24 0x2ba9052fdfe8 in SwFlyFrame::Paint(OutputDevice&, SwRect const&, SwPrintData const*) const sw/source/core/layout/paintfrm.cxx:4334:20
>     #25 0x2ba9041e2bca in SwVirtFlyDrawObj::wrap_DoPaintObject(drawinglayer::geometry::ViewInformation2D const&) const sw/source/core/draw/dflyobj.cxx:466:30
>     #26 0x2ba9041e1964 in drawinglayer::primitive2d::SwVirtFlyDrawObjPrimitive::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const sw/source/core/draw/dflyobj.cxx:228:35
>     #27 0x2ba8daf085dc in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) drawinglayer/source/processor2d/baseprocessor2d.cxx:47:24
>     #28 0x2ba8db030133 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:1289:21
>     #29 0x2ba8daf09165 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) drawinglayer/source/processor2d/baseprocessor2d.cxx:70:29
>     #30 0x2ba9361f56e0 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) svx/source/sdr/contact/objectcontactofpageview.cxx:325:35
>     #31 0x2ba9361f08eb in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) svx/source/sdr/contact/objectcontactofpageview.cxx:124:21
>     #32 0x2ba936512f89 in SdrPageWindow::RedrawLayer(unsigned char const*, sdr::contact::ViewObjectContactRedirector*, basegfx::B2IRange const*) svx/source/svdraw/sdrpagewindow.cxx:402:28
>     #33 0x2ba93769c0f5 in SdrPageView::DrawLayer(unsigned char, OutputDevice*, sdr::contact::ViewObjectContactRedirector*, tools::Rectangle const&, basegfx::B2IRange const*) svx/source/svdraw/svdpagv.cxx:356:38
>     #34 0x2ba907cceb8c in SwViewShellImp::PaintLayer(unsigned char, SwPrintData const*, SwPageFrame const&, SwRect const&, Color const*, bool, sdr::contact::ViewObjectContactRedirector*) sw/source/core/view/vdraw.cxx:146:24
>     #35 0x2ba9052a5aef in SwRootFrame::Paint(OutputDevice&, SwRect const&, SwPrintData const*) const sw/source/core/layout/paintfrm.cxx:3393:33
>     #36 0x2ba907d08527 in SwViewShell::ImplEndAction(bool) sw/source/core/view/viewsh.cxx:410:49
>     #37 0x2ba90223b161 in SwViewShell::EndAction(bool) sw/inc/viewsh.hxx:603:9
>     #38 0x2ba907d16ff8 in SwViewShell::MakeVisible(SwRect const&) sw/source/core/view/viewsh.cxx:581:21
>     #39 0x2ba902224187 in SwCursorShell::MakeSelVisible() sw/source/core/crsr/crsrsh.cxx:2818:13
>     #40 0x2ba90494d45b in SwFEShell::MakeSelVisible() sw/source/core/frmedt/feshview.cxx:2531:24
>     #41 0x2ba902187f27 in SwCursorShell::UpdateCursor(unsigned short, bool) sw/source/core/crsr/crsrsh.cxx:1842:13
>     #42 0x2ba9021f9dfd in SwCursorShell::Pop(bool) sw/source/core/crsr/crsrsh.cxx:2081:13
>     #43 0x2ba905a4afe3 in SwEnhancedPDFExportHelper::EnhancedPDFExport() sw/source/core/text/EnhancedPDFExportHelper.cxx:2173:25
>     #44 0x2ba905a29f00 in SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper(SwEditShell&, OutputDevice&, rtl::OUString const&, bool, bool, SwPrintData const&) sw/source/core/text/EnhancedPDFExportHelper.cxx:1502:5
>     #45 0x2ba90a741107 in SwXTextDocument::render(int, com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) sw/source/uibase/uno/unotxdoc.cxx:2986:51
>     #46 0x2ba95ce0471b in PDFExport::ExportSelection(vcl::PDFWriter&, com::sun::star::uno::Reference<com::sun::star::view::XRenderable>&, com::sun::star::uno::Any const&, StringRangeEnumerator const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, int) filter/source/pdf/pdfexport.cxx:222:34
>     #47 0x2ba95ce29474 in PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) filter/source/pdf/pdfexport.cxx:905:28
>     #48 0x2ba95ce87d48 in PDFFilter::implExport(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) filter/source/pdf/pdffilter.cxx:116:24
>     #49 0x2ba95ce88e1e in PDFFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) filter/source/pdf/pdffilter.cxx:177:23
>     #50 0x2ba8e8c73429 in SfxObjectShell::ExportTo(SfxMedium&) sfx2/source/doc/objstor.cxx:2420:25
>     #51 0x2ba8e8c5cc98 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) sfx2/source/doc/objstor.cxx:1533:19
>     #52 0x2ba8e8c99cc5 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet&) sfx2/source/doc/objstor.cxx:2813:39
>     #53 0x2ba8e8c92eca in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&) sfx2/source/doc/objstor.cxx:2685:9
>     #54 0x2ba8e8bf2c82 in SfxObjectShell::APISaveAs_Impl(rtl::OUString const&, SfxItemSet&) sfx2/source/doc/objserv.cxx:305:19
>     #55 0x2ba8e8e68eea in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) sfx2/source/doc/sfxbasemodel.cxx:2990:46
>     #56 0x2ba8e8e71d0b in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) sfx2/source/doc/sfxbasemodel.cxx:1645:13
>     #57 0x2ba8d3b43ea4 in (anonymous namespace)::PdfExportTest::load(rtl::OUString const&, vcl::filter::PDFDocument&) vcl/qa/cppunit/pdfexport/pdfexport.cxx:104:16
>     #58 0x2ba8d3b30781 in (anonymous namespace)::PdfExportTest::testTdf107013() vcl/qa/cppunit/pdfexport/pdfexport.cxx:393:5
>     #59 0x2ba8d3b417cb in CppUnit::TestCaller<(anonymous namespace)::PdfExportTest>::runTest() workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166:6
>     #60 0x2ba88f26cd8b in CppUnit::TestCaseMethodFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5
>     #61 0x2ba8a85afb0f in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) test/source/vclbootstrapprotector.cxx:39:14
>     #62 0x2ba88f22b3ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #63 0x2ba89ee6214f in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89:12
>     #64 0x2ba88f22b3ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #65 0x2ba89b0fc351 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16
>     #66 0x2ba88f22b3ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #67 0x2ba88f1a9350 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12
>     #68 0x2ba88f22b3ce in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #69 0x2ba88f227e70 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:77:18
>     #70 0x2ba88f2e70f5 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:181:28
>     #71 0x2ba88f26afa4 in CppUnit::TestCase::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13
>     #72 0x2ba88f26f7a7 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
>     #73 0x2ba88f26e819 in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
>     #74 0x2ba88f26f7a7 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
>     #75 0x2ba88f26e819 in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
>     #76 0x2ba88f3255c9 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27
>     #77 0x2ba88f2e540d in CppUnit::TestResult::runTest(CppUnit::Test*) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:148:9
>     #78 0x2ba88f32689b in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14
>     #79 0x532fb4 in (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:306:20
>     #80 0x52e7c3 in sal_main() sal/cppunittester/cppunittester.cxx:456:20
>     #81 0x52cb6f in main sal/cppunittester/cppunittester.cxx:363:1
>     #82 0x2ba890ed7400 in __libc_start_main (/lib64/libc.so.6+0x20400)
>     #83 0x438019 in _start (workdir/LinkTarget/Executable/cppunittester+0x438019)

Change-Id: Ia3e6983d07e2bb2d057beab1b42212d3cc8afe80
(cherry picked from commit 9497754)
tuffnatty pushed a commit to tuffnatty/libreoffice that referenced this pull request Mar 13, 2019
Follow-up to 4bf2b13 "Clamp equation values
when exporting to binary MS format", during CppunitTest_sw_ooxmlexport6:

> filter/source/msfilter/escherex.cxx:2935:50: runtime error: implicit conversion from type 'sal_Int32' (aka 'int') of value 2700000 (32-bit, signed) to type 'sal_Int16' (aka 'short') changed the value to 13024 (16-bit, signed)
>  #0 in EscherPropertyContainer::CreateCustomShapeProperties(MSO_SPT, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at filter/source/msfilter/escherex.cxx:2935:50
>  LibreOffice#1 in ImplEESdrWriter::ImplWriteShape(ImplEESdrObject&, EscherSolverContainer&, bool) at filter/source/msfilter/eschesdo.cxx:283:26
>  LibreOffice#2 in ImplEESdrWriter::ImplWriteShape(ImplEESdrObject&, EscherSolverContainer&, bool) at filter/source/msfilter/eschesdo.cxx:215:25
>  LibreOffice#3 in ImplEESdrWriter::ImplWriteTheShape(ImplEESdrObject&, bool) at filter/source/msfilter/eschesdo.cxx:932:12
>  LibreOffice#4 in EscherEx::AddSdrObject(SdrObject const&, bool) at filter/source/msfilter/eschesdo.cxx:951:35
>  LibreOffice#5 in oox::vml::VMLExport::AddSdrObject(SdrObject const&, short, short, short, short, bool) at oox/source/export/vmlexport.cxx:1425:15
>  LibreOffice#6 in DocxSdrExport::writeVMLDrawing(SdrObject const*, SwFrameFormat const&) at sw/source/filter/ww8/docxsdrexport.cxx:844:40
>  LibreOffice#7 in DocxSdrExport::writeDMLAndVMLDrawing(SdrObject const*, SwFrameFormat const&, int) at sw/source/filter/ww8/docxsdrexport.cxx:1051:9
>  LibreOffice#8 in DocxAttributeOutput::OutputFlyFrame_Impl(ww8::Frame const&, Point const&) at sw/source/filter/ww8/docxattributeoutput.cxx:5586:57
>  LibreOffice#9 in AttributeOutputBase::OutputFlyFrame(ww8::Frame const&) at sw/source/filter/ww8/wrtw8nds.cxx:3265:5
>  LibreOffice#10 in SwWW8AttrIter::OutFlys(int) at sw/source/filter/ww8/wrtw8nds.cxx:665:41
>  LibreOffice#11 in MSWordExportBase::OutputTextNode(SwTextNode&) at sw/source/filter/ww8/wrtw8nds.cxx:2274:42
>  LibreOffice#12 in MSWordExportBase::OutputContentNode(SwContentNode&) at sw/source/filter/ww8/wrtw8nds.cxx:3329:13
>  LibreOffice#13 in MSWordExportBase::WriteText() at sw/source/filter/ww8/wrtww8.cxx:2725:13
>  LibreOffice#14 in DocxExport::WriteMainText() at sw/source/filter/ww8/docxexport.cxx:1489:5
>  LibreOffice#15 in DocxExport::ExportDocument_Impl() at sw/source/filter/ww8/docxexport.cxx:527:5
>  LibreOffice#16 in MSWordExportBase::ExportDocument(bool) at sw/source/filter/ww8/wrtww8.cxx:3210:19
>  LibreOffice#17 in DocxExportFilter::exportDocument() at sw/source/filter/ww8/docxexportfilter.cxx:86:17
>  LibreOffice#18 in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at oox/source/core/filterbase.cxx:497:55
>  LibreOffice#19 in WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:150:23
>  LibreOffice#20 in SfxObjectShell::ExportTo(SfxMedium&) at sfx2/source/doc/objstor.cxx:2414:25
>  LibreOffice#21 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1496:19
>  LibreOffice#22 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&) at sfx2/source/doc/objstor.cxx:2821:39
>  LibreOffice#23 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objstor.cxx:2678:9
>  LibreOffice#24 in SfxObjectShell::APISaveAs_Impl(rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objserv.cxx:323:19
>  LibreOffice#25 in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) at sfx2/source/doc/sfxbasemodel.cxx:3018:42
>  LibreOffice#26 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1689:13
>  LibreOffice#27 in SwModelTestBase::reload(char const*, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:796:20
>  LibreOffice#28 in SwModelTestBase::executeImportExportImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:283:9
>  LibreOffice#29 in testDmlGroupshapeRelsize::Import_Export_Import() at sw/qa/extras/ooxmlexport/ooxmlexport6.cxx:80:1
[...]

Change-Id: I40fdbcc599960aecabc4b2c96820eb3492509be0
Reviewed-on: https://gerrit.libreoffice.org/68715
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tuffnatty pushed a commit to tuffnatty/libreoffice that referenced this pull request Mar 13, 2019
...as seen with Clang's -fsanitize=implicit-signed-integer-truncation during
CppunitTest_sw_ooxmlexport4 when nTextAreaHeight=36920 and m_nGridLinePitch=1:

> writerfilter/source/dmapper/PropertyMap.cxx:1519:38: runtime error: implicit conversion from type 'int' of value 36920 (32-bit, signed) to type 'const sal_Int16' (aka 'const short') changed the value to -28616 (16-bit, signed)
>  #0 in writerfilter::dmapper::SectionPropertyMap::CloseSectionGroup(writerfilter::dmapper::DomainMapper_Impl&) at writerfilter/source/dmapper/PropertyMap.cxx:1519:38
>  LibreOffice#1 in writerfilter::dmapper::DomainMapper::lcl_endSectionGroup() at writerfilter/source/dmapper/DomainMapper.cxx:2881:30
>  LibreOffice#2 in writerfilter::LoggedStream::endSectionGroup() at writerfilter/source/dmapper/LoggedResources.cxx:101:5
>  LibreOffice#3 in writerfilter::ooxml::OOXMLFastContextHandler::endSectionGroup() at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:434:23
>  LibreOffice#4 in writerfilter::ooxml::OOXMLFactory_wml::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at workdir/CustomTarget/writerfilter/source/ooxml/OOXMLFactory_wml.cxx:7517:19
>  LibreOffice#5 in writerfilter::ooxml::OOXMLFactory::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at writerfilter/source/ooxml/OOXMLFactory.cxx:199:19
>  LibreOffice#6 in writerfilter::ooxml::OOXMLFastContextHandler::lcl_endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:195:5
>  LibreOffice#7 in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:177:9
>  LibreOffice#8 in (anonymous namespace)::Entity::endElement() at sax/source/fastparser/fastparser.cxx:483:27
>  LibreOffice#9 in sax_fastparser::FastSaxParserImpl::callbackEndElement() at sax/source/fastparser/fastparser.cxx:1274:17
>  LibreOffice#10 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) at sax/source/fastparser/fastparser.cxx:310:18
>  LibreOffice#11 in xmlParseEndTag2 at workdir/UnpackedTarball/libxml2/parser.c:9680:2
>  LibreOffice#12 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11531:7
>  LibreOffice#13 in xmlParseChunk__internal_alias at workdir/UnpackedTarball/libxml2/parser.c:12244:13
>  LibreOffice#14 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1043:21
>  LibreOffice#15 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:863:9
>  LibreOffice#16 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1359:13
>  LibreOffice#17 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:504:22
>  LibreOffice#18 in WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:192:24
>  LibreOffice#19 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sfx2/source/doc/objstor.cxx:2212:34
>  LibreOffice#20 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:741:23
>  LibreOffice#21 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1844:36
>  LibreOffice#22 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:689:28
>  LibreOffice#23 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1150:37
>  LibreOffice#24 in framework::LoadEnv::startLoading() at framework/source/loadenv/loadenv.cxx:384:20
>  LibreOffice#25 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:170:14
>  LibreOffice#26 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:619:12
>  LibreOffice#27 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx
>  LibreOffice#28 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:50:60
>  LibreOffice#29 in SwModelTestBase::loadURL(rtl::OUString const&, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:761:23
>  LibreOffice#30 in SwModelTestBase::load(rtl::OUString const&, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:716:16
>  LibreOffice#31 in SwModelTestBase::executeImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:264:13
>  LibreOffice#32 in testTdf86926_A3::Import() at sw/qa/extras/ooxmlexport/ooxmlexport4.cxx:1140:1
[...]

Change-Id: Idf694b0dda871f1313d36c03764b0199e10d1b25
Reviewed-on: https://gerrit.libreoffice.org/68710
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
tdf-gerrit pushed a commit that referenced this pull request Dec 16, 2019
Unfortunately, this isn't fully functional, but
didn't want to lose the effort. The problem is
that there is no proper config for languages
in the unit-tests. So even when we set the
language explicitly, it still doesn't apply
to the SpellCheckerDispatcher, which is
where it matters. This seems to be because
the config is not properly propagated and
broadcast. Below is the stacktrace as
works on desktop. During the unittest
the Broadcaster has no change listener
for LngSvcMgr, so SpellCheckerDispatcher::SetServiceList
doesn't get called.

 #0  0x00007f47f3fed7e6 in SpellCheckerDispatcher::SetServiceList(com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<rtl::OUString> const&)
     (this=0x5589de40e7a0, rLocale=..., rSvcImplNames=uno::Sequence of length 1 = {...}) at /home/ash/prj/master/linguistic/source/spelldsp.cxx:795
 #1  0x00007f47f3fcc0ad in LngSvcMgr::Notify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b4e0, rPropertyNames=uno::Sequence of length 4 = {...})
     at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:826
 #2  0x00007f47fa2d3c8d in utl::ConfigItem::CallNotify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b530, rPropertyNames=uno::Sequence of length 4 = {...})
     at /home/ash/prj/master/unotools/source/config/configitem.cxx:181
 #3  0x00007f47fa2d3946 in utl::ConfigChangeListener_Impl::changesOccurred(com::sun::star::util::ChangesEvent const&) (this=0x5589de464b90, rEvent=...)
     at /home/ash/prj/master/unotools/source/config/configitem.cxx:143
 #4  0x00007f47e273bb61 in configmgr::Broadcaster::send() (this=0x7ffcc604c5b0) at /home/ash/prj/master/configmgr/source/broadcaster.cxx:182
 #5  0x00007f47e277f002 in configmgr::RootAccess::commitChanges() (this=0x5589dd557400) at /home/ash/prj/master/configmgr/source/rootaccess.cxx:171
 #6  0x00007f47fa2d80e3 in utl::ConfigItem::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x5589dd5571b0, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/configitem.cxx:1025
 #7  0x00007f47fa339983 in SvtLinguConfig::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x7ffcc604cb40, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/lingucfg.cxx:847
 #8  0x00007f47f3fcb88f in LngSvcMgr::UpdateAll() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:765
 #9  0x00007f47f3fc9caa in LngSvcMgr::LngSvcMgr() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:438
 #10 0x00007f47f3fd3baf in LngSvcMgr_CreateInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) ()
     at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:1967
 #11 0x00007f4800e9656b in cppu::OSingleFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccfc8, xContext=
     uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:149
 #12 0x00007f4800e96790 in cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589de3ccfc8, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:175
 #13 0x00007f4800e97107 in cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589de3ccf60, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:374
 #14 0x00007f4800eebc8f in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool)
     (this=0x5589dbd2f030, context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630, singletonRequest=false) at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:667
 #15 0x00007f4800eee587 in cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589dbcbaaf0, aServiceSpecifier="com.sun.star.linguistic2.LinguServiceManager", Context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630)
     at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:991
 #16 0x00007f4800776778 in com::sun::star::linguistic2::LinguServiceManager::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (the_context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630)
     at /home/ash/prj/master/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/linguistic2/LinguServiceManager.hpp:38
 #17 0x00007f4800772d51 in GetLngSvcMgr_Impl() () at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:66
 #18 0x00007f4800773449 in SpellDummy_Impl::GetSpell_Impl() (this=0x5589dd82f420) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:217
 #19 0x00007f4800773614 in SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x5589dd82f420, rWord="a", nLanguage=1033, rProperties=empty uno::Sequence) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:249
 #20 0x00007f48006ae4c2 in ImpEditEngine::DoOnlineSpelling(ContentNode*, bool, bool) (this=0x5589de195060, pThisNodeOnly=0x0, bSpellAtCursorPos=false, bInterruptible=true)
     at /home/ash/prj/master/editeng/source/editeng/impedit4.cxx:2306
 #21 0x00007f480067d0d2 in ImpEditEngine::OnlineSpellHdl(Timer*) (this=0x5589de195060) at /home/ash/prj/master/editeng/source/editeng/impedit3.cxx:322

Change-Id: Iffef03502c78311427aa8883739678120cc84931
(cherry picked from commit 4f77bd94028a140133814d735c0425bbd0de4839)
Reviewed-on: https://gerrit.libreoffice.org/85007
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
tdf-gerrit pushed a commit that referenced this pull request Dec 23, 2019
Unfortunately, this isn't fully functional, but
didn't want to lose the effort. The problem is
that there is no proper config for languages
in the unit-tests. So even when we set the
language explicitly, it still doesn't apply
to the SpellCheckerDispatcher, which is
where it matters. This seems to be because
the config is not properly propagated and
broadcast. Below is the stacktrace as
works on desktop. During the unittest
the Broadcaster has no change listener
for LngSvcMgr, so SpellCheckerDispatcher::SetServiceList
doesn't get called.

 #0  0x00007f47f3fed7e6 in SpellCheckerDispatcher::SetServiceList(com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<rtl::OUString> const&)
     (this=0x5589de40e7a0, rLocale=..., rSvcImplNames=uno::Sequence of length 1 = {...}) at /home/ash/prj/master/linguistic/source/spelldsp.cxx:795
 #1  0x00007f47f3fcc0ad in LngSvcMgr::Notify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b4e0, rPropertyNames=uno::Sequence of length 4 = {...})
     at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:826
 #2  0x00007f47fa2d3c8d in utl::ConfigItem::CallNotify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b530, rPropertyNames=uno::Sequence of length 4 = {...})
     at /home/ash/prj/master/unotools/source/config/configitem.cxx:181
 #3  0x00007f47fa2d3946 in utl::ConfigChangeListener_Impl::changesOccurred(com::sun::star::util::ChangesEvent const&) (this=0x5589de464b90, rEvent=...)
     at /home/ash/prj/master/unotools/source/config/configitem.cxx:143
 #4  0x00007f47e273bb61 in configmgr::Broadcaster::send() (this=0x7ffcc604c5b0) at /home/ash/prj/master/configmgr/source/broadcaster.cxx:182
 #5  0x00007f47e277f002 in configmgr::RootAccess::commitChanges() (this=0x5589dd557400) at /home/ash/prj/master/configmgr/source/rootaccess.cxx:171
 #6  0x00007f47fa2d80e3 in utl::ConfigItem::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x5589dd5571b0, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/configitem.cxx:1025
 #7  0x00007f47fa339983 in SvtLinguConfig::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x7ffcc604cb40, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/lingucfg.cxx:847
 #8  0x00007f47f3fcb88f in LngSvcMgr::UpdateAll() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:765
 #9  0x00007f47f3fc9caa in LngSvcMgr::LngSvcMgr() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:438
 #10 0x00007f47f3fd3baf in LngSvcMgr_CreateInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) ()
     at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:1967
 #11 0x00007f4800e9656b in cppu::OSingleFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccfc8, xContext=
     uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:149
 #12 0x00007f4800e96790 in cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589de3ccfc8, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:175
 #13 0x00007f4800e97107 in cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589de3ccf60, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:374
 #14 0x00007f4800eebc8f in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool)
     (this=0x5589dbd2f030, context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630, singletonRequest=false) at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:667
 #15 0x00007f4800eee587 in cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589dbcbaaf0, aServiceSpecifier="com.sun.star.linguistic2.LinguServiceManager", Context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630)
     at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:991
 #16 0x00007f4800776778 in com::sun::star::linguistic2::LinguServiceManager::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (the_context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630)
     at /home/ash/prj/master/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/linguistic2/LinguServiceManager.hpp:38
 #17 0x00007f4800772d51 in GetLngSvcMgr_Impl() () at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:66
 #18 0x00007f4800773449 in SpellDummy_Impl::GetSpell_Impl() (this=0x5589dd82f420) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:217
 #19 0x00007f4800773614 in SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x5589dd82f420, rWord="a", nLanguage=1033, rProperties=empty uno::Sequence) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:249
 #20 0x00007f48006ae4c2 in ImpEditEngine::DoOnlineSpelling(ContentNode*, bool, bool) (this=0x5589de195060, pThisNodeOnly=0x0, bSpellAtCursorPos=false, bInterruptible=true)
     at /home/ash/prj/master/editeng/source/editeng/impedit4.cxx:2306
 #21 0x00007f480067d0d2 in ImpEditEngine::OnlineSpellHdl(Timer*) (this=0x5589de195060) at /home/ash/prj/master/editeng/source/editeng/impedit3.cxx:322

Change-Id: Iffef03502c78311427aa8883739678120cc84931
(cherry picked from commit 4f77bd94028a140133814d735c0425bbd0de4839)
Reviewed-on: https://gerrit.libreoffice.org/85007
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 66c1f6b)
Reviewed-on: https://gerrit.libreoffice.org/85683
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
tdf-gerrit pushed a commit that referenced this pull request Jan 30, 2020
This reverts commit fa26db1 for now, as it
breaks UBSan builds during e.g. JunitTest_sw_unoapi_1
(<https://ci.libreoffice.org/job/lo_ubsan/1518/>):

> /sw/source/core/doc/acmplwrd.cxx:138:9: runtime error: member access within address 0x607001517be0 which does not point to an object of type 'SwAutoCompleteClient'
> 0x607001517be0: note: object is of type 'SvtListener'
>  af 07 80 42  d0 8e 97 f4 84 2b 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  04 00 00 00
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'SvtListener'
>     #0 0x2b85787e94b6 in SwAutoCompleteClient::Notify(SfxHint const&) /sw/source/core/doc/acmplwrd.cxx:138:9
>     #1 0x2b84f3d5d886 in SvtBroadcaster::Broadcast(SfxHint const&) /svl/source/notify/broadcast.cxx:128:25
>     #2 0x2b84f3d5c07a in SvtBroadcaster::~SvtBroadcaster() /svl/source/notify/broadcast.cxx:96:5
>     #3 0x2b857812fdc4 in sw::BroadcasterMixin::~BroadcasterMixin() /sw/inc/calbck.hxx:84:24
>     #4 0x2b857af251c4 in SwPageDesc::~SwPageDesc() /sw/source/core/layout/pagedesc.cxx:127:1
>     #5 0x2b857af25234 in SwPageDesc::~SwPageDesc() /sw/source/core/layout/pagedesc.cxx:126:1
>     #6 0x2b8578f2c550 in SwDoc::~SwDoc() /sw/source/core/doc/docnew.cxx:466:9
>     #7 0x2b857892a9c3 in SwDoc::release() /sw/source/core/doc/doc.cxx:117:9
>     #8 0x2b8579d1efae in rtl::Reference<SwDoc>::clear() /include/rtl/ref.hxx:159:19
>     #9 0x2b857e12fd44 in SwDocShell::RemoveLink() /sw/source/uibase/app/docshini.cxx:438:16
>     #10 0x2b857e12eac7 in SwDocShell::~SwDocShell() /sw/source/uibase/app/docshini.cxx:366:5
>     #11 0x2b857e12ff2b in SwDocShell::~SwDocShell() /sw/source/uibase/app/docshini.cxx:356:1
>     #12 0x2b857e130104 in SwDocShell::~SwDocShell() /sw/source/uibase/app/docshini.cxx:356:1
>     #13 0x2b84edcb1a4a in SvRefBase::ReleaseRef() /include/tools/ref.hxx:163:29
>     #14 0x2b84edcb1020 in tools::SvRef<SfxObjectShell>::~SvRef() /include/tools/ref.hxx:56:36

Change-Id: Iaf1cb698bf898efc66a3abaa1c8bfd3116b389b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87715
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Feb 7, 2020
...without which `make clean && make CppunitTest_sd_misc_tests` would fire

> cppunittester: vcl/source/gdi/bmpacc.cxx:38: BitmapInfoAccess::BitmapInfoAccess(Bitmap &, BitmapAccessMode): Assertion `xImpBmp && "Forbidden Access to empty bitmap!"' failed.

because

> #3  0x00007ffff6deba66 in __GI___assert_fail
> #4  0x00007fffd23c14af in BitmapInfoAccess::BitmapInfoAccess(Bitmap&, BitmapAccessMode) at vcl/source/gdi/bmpacc.cxx:38
> #5  0x00007fffd23c36fc in BitmapReadAccess::BitmapReadAccess(Bitmap&, BitmapAccessMode) at vcl/source/gdi/bmpacc.cxx:87
> #6  0x00007fffd23c89a0 in BitmapWriteAccess::BitmapWriteAccess(Bitmap&) at vcl/source/gdi/bmpacc.cxx:355
> #7  0x00007fffd3359a02 in Bitmap::AcquireWriteAccess() at vcl/source/bitmap/bitmap.cxx:388
> #8  0x00007fffd1cb15cf in vcl::ScopedBitmapAccess<BitmapWriteAccess, Bitmap, &Bitmap::AcquireWriteAccess>::ScopedBitmapAccess(Bitmap&) at include/vcl/scopedbitmapaccess.hxx:53
> #9  0x00007fffd3375fe6 in BitmapDisabledImageFilter::execute(BitmapEx const&) const at vcl/source/bitmap/BitmapDisabledImageFilter.cxx:28
> #10 0x00007fffd336ed1d in BitmapFilter::Filter(BitmapEx&, BitmapFilter const&) at vcl/source/bitmap/bitmapfilter.cxx:22
> #11 0x00007fffd34c1875 in ImplImage::getBitmapEx(bool) at vcl/source/image/ImplImage.cxx:123
> #12 0x00007fffd34c212c in ImplImage::getBitmapExForHiDPI(bool) at vcl/source/image/ImplImage.cxx:153
> #13 0x00007fffd34b3c7b in Image::Draw(OutputDevice*, Point const&, DrawImageFlags, Size const*) at vcl/source/image/Image.cxx:123
> #14 0x00007fffd1cec66e in OutputDevice::DrawImage(Point const&, Size const&, Image const&, DrawImageFlags) at vcl/source/outdev/bitmap.cxx:1388
> #15 0x00007fffd1cec1f7 in OutputDevice::DrawImage(Point const&, Image const&, DrawImageFlags) at vcl/source/outdev/bitmap.cxx:1372
> #16 0x00007fffd0ea7ca4 in ToolBox::ImplDrawItem(OutputDevice&, unsigned long, unsigned short) at vcl/source/window/toolbox.cxx:2696
> #17 0x00007fffd0ec629d in ToolBox::Paint(OutputDevice&, tools::Rectangle const&) at vcl/source/window/toolbox.cxx:3490
> #18 0x00007fffd003daed in PaintHelper::DoPaint(vcl::Region const*) at vcl/source/window/paint.cxx:309

wants to draw sfx2/res/symphony/morebutton.png

Change-Id: I9c21eb7891a6dfa29033618177c97370695e413d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88146
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Feb 17, 2020
...after b294590 "Avoid explicit casts to
smaller sal_uInt16 from larger long":  As Mike Kaganski reported at
<https://gerrit.libreoffice.org/c/core/+/87442/2#
message-bc3d33b177eecba4255e299ac92c2f0c1712b57d>, clicking on "Templates" in
the start center causes the assert to fire at

> #3  0x00007ffff6296a66 in __GI___assert_fail
> #4  0x00007fffe6b11df8 in _ZN4o3tl13make_unsignedIlEENSt9enable_ifIXsr3stdE11is_signed_vIT_EENSt13make_unsignedIS2_E4typeEE4typeES2_ (value=-1) at include/o3tl/safeint.hxx:233
> #5  0x00007fffe6ad75f6 in ThumbnailView::SelectItem(unsigned short) (this=0x61a0000fc680, nItemId=1) at sfx2/source/control/thumbnailview.cxx:1011
> #6  0x00007fffe6ade62c in ThumbnailView::GetFocus() (this=0x61a0000fc680) at sfx2/source/control/thumbnailview.cxx:838
> #7  0x00007fffc27c292b in vcl::Window::CompatGetFocus() (this=0x61a0000fc680) at vcl/source/window/window.cxx:3895
> #8  0x00007fffc226604e in vcl::Window::ImplGrabFocus(GetFocusFlags) (this=0x61a0000fc680, nFlags=GetFocusFlags::NONE) at vcl/source/window/mouse.cxx:378
> #9  0x00007fffc2738071 in vcl::Window::GrabFocus() (this=0x61a0000fc680) at vcl/source/window/window.cxx:3029
> #10 0x00007fffe6c4a529 in BackingWindow::ClickHdl(Button*) (this=0x6190005e8880, pButton=0x61800031a080) at sfx2/source/dialog/backingwindow.cxx:585
> #11 0x00007fffe6c3c1eb in BackingWindow::LinkStubClickHdl(void*, Button*) (instance=0x6190005e8880, data=0x61800031a080) at sfx2/source/dialog/backingwindow.cxx:535
> #12 0x00007fffc2937f72 in Link<Button*, void>::Call(Button*) const (this=0x61800031a328, data=0x61800031a080) at include/tools/link.hxx:111
> #13 0x00007fffc291c13c in Button::Click()::$_0::operator()() const (this=0x7fff8c0ce0a0) at vcl/source/control/button.cxx:123

when mnFirstLine and mnVisLines are both 0.  (And nNewLine is 0 because nItemPos
is 0.  An alternative fix might be to replace

  else if ( nNewLine > o3tl::make_unsigned(mnFirstLine+mnVisLines-1) )

with

  else if ( nNewLine >= o3tl::make_unsigned(mnFirstLine+mnVisLines) )

but that would then set

      mnFirstLine = static_cast<sal_uInt16>(nNewLine-mnVisLines+1);

to 1 instead of leaving it at 0, which is probably not wanted.)

Change-Id: I5b61cd25d52048e2cb2cf64f646d8ba9dd10adb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88847
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Mar 24, 2020
...before the destruction of the

  std::unique_ptr<SbxAppData> xSbxAppData;

member during the destruction of BasicDLLImpl can set that
BasicDLLImpl::xSbxAppData to null.  Because the destruction of
SbxAppData::m_aGlobErr may call into SbxValue::Put -> SbxBase::GetError ->
GetSbxData_Impl, which would recursively access that

  return *BasicDLLImpl::BASIC_DLL->xSbxAppData;

This causes problems with libc++ (i.e., on macOS), where ~std::unique_ptr sets
its internal pointer to null before calling the destructor of the pointed-to
object.  Whereas it happens to not cause problems with e.g. libstdc++, where
~std::unique_ptr calls the destructor of the pointed-to object first before
setting the pointer to null.

The problem showed up with <https://gerrit.libreoffice.org/c/core/+/85017/14>
"VBA Err object raise method TestCases", where CppunitTest_basic_macros kept
failing on macOS with

> * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
>     frame #0: 0x00000001119f18e7 libsblo.dylib`SbxValue::Put(this=0x000000014c1cff00, rVal=0x00007ffeefbf1218) + 55 at basic/source/sbx/sbxvalue.cxx:414
>    411 	bool SbxValue::Put( const SbxValues& rVal )
>    412 	{
>    413 	    bool bRes = false;
> -> 414 	    ErrCode eOld = GetError();
>    415 	    if( eOld != ERRCODE_NONE )
>    416 	        ResetError();
>    417 	    if( !CanWrite() )
> Target 0: (cppunittester) stopped.
> (lldb) bt
> * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
>   * frame #0: 0x00000001119f18e7 libsblo.dylib`SbxValue::Put(this=0x000000014c1cff00, rVal=0x00007ffeefbf1218) + 55 at basic/source/sbx/sbxvalue.cxx:414
>     frame #1: 0x00000001119f2399 libsblo.dylib`SbxValue::Clear(this=0x000000014c1cff00) + 553 at basic/source/sbx/sbxvalue.cxx:176
>     frame #2: 0x00000001119f20d0 libsblo.dylib`SbxValue::~SbxValue(this=0x000000014c1cff00, vtt=0x0000000111a2af70) + 80 at basic/source/sbx/sbxvalue.cxx:139
>     frame #3: 0x00000001119f825d libsblo.dylib`SbxVariable::~SbxVariable(this=0x000000014c1cff00, vtt=0x0000000111a2af68) + 381 at basic/source/sbx/sbxvar.cxx:125
>     frame #4: 0x00000001119e619a libsblo.dylib`SbxProperty::~SbxProperty(this=0x000000014c1cff00, vtt=0x0000000111a2af60) + 42 at basic/source/sbx/sbxobj.cxx:861
>     frame #5: 0x000000011188ce81 libsblo.dylib`SbUnoProperty::~SbUnoProperty(this=0x000000014c1cff00, vtt=0x0000000111a2af58) + 97 at basic/source/classes/sbunoobj.cxx:2591
>     frame #6: 0x000000011188ceb3 libsblo.dylib`SbUnoProperty::~SbUnoProperty(this=0x000000014c1cff00) + 35 at basic/source/classes/sbunoobj.cxx:2591
>     frame #7: 0x000000011188cf0c libsblo.dylib`SbUnoProperty::~SbUnoProperty(this=0x000000014c1cff00) + 28 at basic/source/classes/sbunoobj.cxx:2591
>     frame #8: 0x000000011180c235 libsblo.dylib`SvRefBase::ReleaseRef(this=0x000000014c1cffa0) + 197 at include/tools/ref.hxx:163
>     frame #9: 0x000000011184fda7 libsblo.dylib`tools::SvRef<SbxVariable>::~SvRef(this=0x000000014c1d2490) + 55 at include/tools/ref.hxx:56
>     frame #10: 0x000000011184a545 libsblo.dylib`tools::SvRef<SbxVariable>::~SvRef(this=0x000000014c1d2490) + 21 at include/tools/ref.hxx:55
>     frame #11: 0x00000001119be5af libsblo.dylib`SbxVarEntry::~SbxVarEntry(this=0x000000014c1d2490) + 47 at basic/source/sbx/sbxarray.cxx:31
>     frame #12: 0x00000001119bc3d5 libsblo.dylib`SbxVarEntry::~SbxVarEntry(this=0x000000014c1d2490) + 21 at basic/source/sbx/sbxarray.cxx:31
>     frame #13: 0x00000001119bed29 libsblo.dylib`std::__1::allocator<SbxVarEntry>::destroy(this=0x000000014c1940a0, __p=0x000000014c1d2490) + 25 at c++/v1/memory:1931
>     frame #14: 0x00000001119becfd libsblo.dylib`void std::__1::allocator_traits<std::__1::allocator<SbxVarEntry> >::__destroy<SbxVarEntry>((null)=std::__1::true_type @ 0x00007ffeefbf1448, __a=0x000000014c1940a0, __p=0x000000014c1d2490) + 29 at c++/v1/memory:1793
>     frame #15: 0x00000001119beccd libsblo.dylib`void std::__1::allocator_traits<std::__1::allocator<SbxVarEntry> >::destroy<SbxVarEntry>(__a=0x000000014c1940a0, __p=0x000000014c1d2490) + 29 at c++/v1/memory:1630
>     frame #16: 0x00000001119bec7b libsblo.dylib`std::__1::__vector_base<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::__destruct_at_end(this=0x000000014c194090, __new_last=0x000000014c1d2490) + 91 at c++/v1/vector:426
>     frame #17: 0x00000001119bebab libsblo.dylib`std::__1::__vector_base<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::clear(this=0x000000014c194090) + 27 at c++/v1/vector:369
>     frame #18: 0x00000001119bea47 libsblo.dylib`std::__1::__vector_base<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::~__vector_base(this=0x000000014c194090) + 39 at c++/v1/vector:463
>     frame #19: 0x00000001119be958 libsblo.dylib`std::__1::vector<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::~vector(this=0x000000014c194090 size=3) + 40 at c++/v1/vector:555
>     frame #20: 0x00000001119bafa5 libsblo.dylib`std::__1::vector<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::~vector(this=0x000000014c194090 size=3) + 21 at c++/v1/vector:550
>     frame #21: 0x00000001119bb457 libsblo.dylib`SbxArray::~SbxArray(this=0x000000014c194080, vtt=0x0000000111a385e8) + 71 at basic/source/sbx/sbxarray.cxx:75
>     frame #22: 0x00000001119bb4a3 libsblo.dylib`SbxArray::~SbxArray(this=0x000000014c194080) + 35 at basic/source/sbx/sbxarray.cxx:74
>     frame #23: 0x00000001119bb4fc libsblo.dylib`SbxArray::~SbxArray(this=0x000000014c194080) + 28 at basic/source/sbx/sbxarray.cxx:74
>     frame #24: 0x000000011180c235 libsblo.dylib`SvRefBase::ReleaseRef(this=0x000000014c194080) + 197 at include/tools/ref.hxx:163
>     frame #25: 0x000000011184dbd7 libsblo.dylib`tools::SvRef<SbxArray>::~SvRef(this=0x000000014c1cfe58) + 55 at include/tools/ref.hxx:56
>     frame #26: 0x000000011184cc25 libsblo.dylib`tools::SvRef<SbxArray>::~SvRef(this=0x000000014c1cfe58) + 21 at include/tools/ref.hxx:55
>     frame #27: 0x00000001119e0d10 libsblo.dylib`SbxObject::~SbxObject(this=0x000000014c1cfdd0, vtt=0x0000000111a37d18) + 288 at basic/source/sbx/sbxobj.cxx:111
>     frame #28: 0x000000011188b73d libsblo.dylib`SbUnoObject::~SbUnoObject(this=0x000000014c1cfdd0, vtt=0x0000000111a37d10) + 221 at basic/source/classes/sbunoobj.cxx:2387
>     frame #29: 0x0000000111990d51 libsblo.dylib`SbxErrObject::~SbxErrObject(this=0x000000014c1cfdd0, vtt=0x0000000111a37d08) + 113 at basic/source/classes/errobject.cxx:184
>     frame #30: 0x0000000111990d83 libsblo.dylib`SbxErrObject::~SbxErrObject(this=0x000000014c1cfdd0) + 35 at basic/source/classes/errobject.cxx:183
>     frame #31: 0x0000000111990dfc libsblo.dylib`SbxErrObject::~SbxErrObject(this=0x000000014c1cfdd0) + 28 at basic/source/classes/errobject.cxx:183
>     frame #32: 0x000000011180c235 libsblo.dylib`SvRefBase::ReleaseRef(this=0x000000014c1cfee8) + 197 at include/tools/ref.hxx:163
>     frame #33: 0x00000001119bcac6 libsblo.dylib`tools::SvRef<SbxVariable>::clear(this=0x0000000110e365a8) + 70 at include/tools/ref.hxx:64
>     frame #34: 0x00000001119ca764 libsblo.dylib`SbxAppData::~SbxAppData(this=0x0000000110e365a0) + 84 at basic/source/sbx/sbxbase.cxx:49
>     frame #35: 0x00000001119ca965 libsblo.dylib`SbxAppData::~SbxAppData(this=0x0000000110e365a0) + 21 at basic/source/sbx/sbxbase.cxx:45
>     frame #36: 0x000000011199272b libsblo.dylib`std::__1::default_delete<SbxAppData>::operator(this=0x0000000110e2cfb0, __ptr=0x0000000110e365a0)(SbxAppData*) const + 43 at c++/v1/memory:2363
>     frame #37: 0x00000001119926af libsblo.dylib`std::__1::unique_ptr<SbxAppData, std::__1::default_delete<SbxAppData> >::reset(this=0x0000000110e2cfb0, __p=0x0000000000000000) + 95 at c++/v1/memory:2618
>     frame #38: 0x0000000111992649 libsblo.dylib`std::__1::unique_ptr<SbxAppData, std::__1::default_delete<SbxAppData> >::~unique_ptr(this=0x0000000110e2cfb0) + 25 at c++/v1/memory:2572
>     frame #39: 0x0000000111992625 libsblo.dylib`std::__1::unique_ptr<SbxAppData, std::__1::default_delete<SbxAppData> >::~unique_ptr(this=0x0000000110e2cfb0) + 21 at c++/v1/memory:2572
>     frame #40: 0x00000001119925f5 libsblo.dylib`(anonymous namespace)::BasicDLLImpl::~BasicDLLImpl(this=0x0000000110e2cfa0) + 53 at basic/source/runtime/basrdll.cxx:33
>     frame #41: 0x0000000111992415 libsblo.dylib`(anonymous namespace)::BasicDLLImpl::~BasicDLLImpl(this=0x0000000110e2cfa0) + 21 at basic/source/runtime/basrdll.cxx:33
>     frame #42: 0x000000011199243c libsblo.dylib`(anonymous namespace)::BasicDLLImpl::~BasicDLLImpl(this=0x0000000110e2cfa0) + 28 at basic/source/runtime/basrdll.cxx:33
>     frame #43: 0x000000011180c235 libsblo.dylib`SvRefBase::ReleaseRef(this=0x0000000110e2cfa0) + 197 at include/tools/ref.hxx:163
>     frame #44: 0x0000000111992039 libsblo.dylib`tools::SvRef<SvRefBase>::clear(this=0x00007ffeefbf1bb0) + 57 at include/tools/ref.hxx:64
>     frame #45: 0x0000000111991f0b libsblo.dylib`BasicDLL::~BasicDLL(this=0x00007ffeefbf1bb0) + 123 at basic/source/runtime/basrdll.cxx:69
>     frame #46: 0x0000000111992055 libsblo.dylib`BasicDLL::~BasicDLL(this=0x00007ffeefbf1bb0) + 21 at basic/source/runtime/basrdll.cxx:66
>     frame #47: 0x0000000110f07a5a libtest_basic_macros.dylib`MacroSnippet::~MacroSnippet(this=0x00007ffeefbf1ba8) + 74 at basic/qa/cppunit/basictest.hxx:23
>     frame #48: 0x0000000110f07a05 libtest_basic_macros.dylib`MacroSnippet::~MacroSnippet(this=0x00007ffeefbf1ba8) + 21 at basic/qa/cppunit/basictest.hxx:23
>     frame #49: 0x0000000110f269b7 libtest_basic_macros.dylib`(anonymous namespace)::VBATest::testMiscVBAFunctions(this=0x0000000100651890) + 1319 at basic/qa/cppunit/test_vba.cxx:168
[...]

Change-Id: I776b7f0686e0915b69119b2e6a513e2a4b40822f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90967
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Apr 2, 2020
…roller

...and not just add it to the new controller.  It caused

> $ SAL_USE_VCLPLUGIN=gen make UITest_chart UITEST_TEST_NAME=chartLegend.chartLegend.test_chart_display_legend_dialog

to fail with

> ==346284==ERROR: AddressSanitizer: heap-use-after-free on address 0x61a00049cca8 at pc 0x7f8496747751 bp 0x7fff7c483f10 sp 0x7fff7c483f08
> READ of size 8 at 0x61a00049cca8 thread T0
>  #0 in chart::sidebar::ChartSidebarSelectionListener::selectionChanged(com::sun::star::lang::EventObject const&) at chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx:66:15
>  #1 in chart::ChartController::impl_notifySelectionChangeListeners() at chart2/source/controller/main/ChartController_Window.cxx:1740:28
>  #2 in chart::ChartController::impl_selectObjectAndNotiy() at chart2/source/controller/main/ChartController_Window.cxx:1756:5
>  #3 in chart::ChartController::modeChanged(com::sun::star::util::ModeChangeEvent const&) at chart2/source/controller/main/ChartController.cxx:538:31
>  #4 in chart::ChartView::impl_notifyModeChangeListener(rtl::OUString const&) at chart2/source/view/main/ChartView.cxx:2653:32
>  #5 in chart::ChartView::impl_updateView(bool) at chart2/source/view/main/ChartView.cxx:2561:9
>  #6 in chart::ChartView::update() at chart2/source/view/main/ChartView.cxx:2687:5
>  #7 in chart::ChartController::execute_Paint(OutputDevice&, tools::Rectangle const&) at chart2/source/controller/main/ChartController_Window.cxx:485:25
>  #8 in chart::ChartWindow::Paint(OutputDevice&, tools::Rectangle const&) at chart2/source/controller/main/ChartWindow.cxx:99:30
>  #9 in PaintHelper::DoPaint(vcl::Region const*) at vcl/source/window/paint.cxx:309:24
>  #10 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:613:17
>  #11 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
>  #12 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
>  #13 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
>  #14 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
>  #15 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
>  #16 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
>  #17 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
>  #18 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
>  #19 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
>  #20 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
>  #21 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
>  #22 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
>  #23 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
>  #24 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
>  #25 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
>  #26 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
>  #27 in vcl::Window::ImplCallOverlapPaint() at vcl/source/window/paint.cxx:637:9
>  #28 in vcl::Window::ImplHandlePaintHdl(Timer*) at vcl/source/window/paint.cxx:660:9
>  #29 in vcl::Window::LinkStubImplHandlePaintHdl(void*, Timer*) at vcl/source/window/paint.cxx:641:1
>  #30 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45
>  #31 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
>  #32 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20
>  #33 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5
>  #34 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
>  #35 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41
>  #36 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17
>  #37 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25
>  #38 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
>  #39 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
>  #40 in Application::Yield() at vcl/source/app/svapp.cxx:518:5
>  #41 in Application::Execute() at vcl/source/app/svapp.cxx:433:9
>  #42 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17
>  #43 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35
>  #44 in SVMain() at vcl/source/app/svmain.cxx:228:12
>  #45 in soffice_main at desktop/source/app/sofficemain.cxx:107:12
>  #46 in sal_main at desktop/source/app/main.c:48:15
>  #47 in main at desktop/source/app/main.c:47:1
> 0x61a00049cca8 is located 1064 bytes inside of 1160-byte region [0x61a00049c880,0x61a00049cd08)
> freed by thread T0 here:
>  #0 in operator delete(void*, unsigned long) at compiler-rt/lib/asan/asan_new_delete.cpp:172:3
>  #1 in chart::sidebar::ChartLinePanel::~ChartLinePanel() at chart2/source/controller/sidebar/ChartLinePanel.cxx:143:1
>  #2 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:40:13
>  #3 in rtl::Reference<vcl::Window>::~Reference() at include/rtl/ref.hxx:92:22
>  #4 in VclPtr<vcl::Window>::disposeAndClear() at include/vcl/vclptr.hxx:208:5
>  #5 in sfx2::sidebar::SidebarPanelBase::disposing() at sfx2/source/sidebar/SidebarPanelBase.cxx:81:15
>  #6 in cppu::WeakComponentImplHelperBase::dispose() at cppuhelper/source/implbase.cxx:102:17
>  #7 in cppu::PartialWeakComponentImplHelper<com::sun::star::ui::XContextChangeEventListener, com::sun::star::ui::XUIElement, com::sun::star::ui::XToolPanel, com::sun::star::ui::XSidebarPanel, com::sun::star::ui::XUpdateModel>::dispose() at include/cppuhelper/compbase.hxx:90:36
>  #8 in sfx2::sidebar::Panel::dispose() at sfx2/source/sidebar/Panel.cxx:106:25
>  #9 in VclReferenceBase::disposeOnce() at vcl/source/outdev/vclreferencebase.cxx:38:5
>  #10 in VclPtr<sfx2::sidebar::Panel>::disposeAndClear() at include/vcl/vclptr.hxx:206:19
>  #11 in sfx2::sidebar::Deck::dispose() at sfx2/source/sidebar/Deck.cxx:92:17
>  #12 in VclReferenceBase::disposeOnce() at vcl/source/outdev/vclreferencebase.cxx:38:5
>  #13 in VclPtr<sfx2::sidebar::Deck>::disposeAndClear() at include/vcl/vclptr.hxx:206:19
>  #14 in sfx2::sidebar::SidebarController::CreateDeck(rtl::OUString const&, sfx2::sidebar::Context const&, bool) at sfx2/source/sidebar/SidebarController.cxx:664:19
>  #15 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:822:5
>  #16 in sfx2::sidebar::SidebarController::UpdateConfigurations() at sfx2/source/sidebar/SidebarController.cxx:569:9
>  #17 in sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3::operator()() const at sfx2/source/sidebar/SidebarController.cxx:140:52
>  #18 in void std::__invoke_impl<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>(std::__invoke_other, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&) at include/c++/10.0.1/bits/invoke.h:60:14
>  #19 in std::enable_if<is_invocable_r_v<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>, void>::type std::__invoke_r<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>(sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&) at include/c++/10.0.1/bits/invoke.h:110:2
>  #20 in std::_Function_handler<void (), sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3>::_M_invoke(std::_Any_data const&) at include/c++/10.0.1/bits/std_function.h:291:9
>  #21 in std::function<void ()>::operator()() const at include/c++/10.0.1/bits/std_function.h:622:14
>  #22 in sfx2::sidebar::AsynchronousCall::HandleUserCall(void*) at sfx2/source/sidebar/AsynchronousCall.cxx:66:9
>  #23 in sfx2::sidebar::AsynchronousCall::LinkStubHandleUserCall(void*, void*) at sfx2/source/sidebar/AsynchronousCall.cxx:62:1
>  #24 in Link<void*, void>::Call(void*) const at include/tools/link.hxx:111:45
>  #25 in ImplHandleUserEvent(ImplSVEvent*) at vcl/source/window/winproc.cxx:2009:30
>  #26 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2562:13
>  #27 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:306:29
>  #28 in SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/unx/generic/app/gendisp.cxx:66:22
>  #29 in SalUserEventList::DispatchUserEvents(bool) at vcl/source/app/salusereventlist.cxx:108:17
>  #30 in SalGenericDisplay::DispatchInternalEvent(bool) at vcl/unx/generic/app/gendisp.cxx:51:12
>  #31 in SalX11Display::Yield() at vcl/unx/generic/app/saldisp.cxx:1918:9
>  #32 in DisplayYield(int, void*) at vcl/unx/generic/app/saldisp.cxx:414:13
>  #33 in (anonymous namespace)::YieldEntry::HandleNextEvent() const at vcl/unx/generic/app/saldata.cxx:566:38
>  #34 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:662:25
>  #35 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
>  #36 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
>  #37 in Application::Yield() at vcl/source/app/svapp.cxx:518:5
>  #38 in Dialog::Execute() at vcl/source/window/dialog.cxx:1032:9
>  #39 in SalInstanceDialog::run() at vcl/source/app/salvtables.cxx:1480:23
>  #40 in weld::DialogController::run() at include/vcl/weld.hxx:2196:47
>  #41 in chart::ChartController::executeDispatch_OpenLegendDialog() at chart2/source/controller/main/ChartController_Insert.cxx:227:18
>  #42 in chart::ChartController::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/main/ChartController.cxx:1130:15
>  #43 in ChartUIObject::PostCommand(void*) at chart2/source/controller/uitest/uiobject.cxx:76:41
>  #44 in ChartUIObject::LinkStubPostCommand(void*, void*) at chart2/source/controller/uitest/uiobject.cxx:72:1
>  #45 in Link<void*, void>::Call(void*) const at include/tools/link.hxx:111:45
>  #46 in ImplHandleUserEvent(ImplSVEvent*) at vcl/source/window/winproc.cxx:2009:30
>  #47 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2562:13
>  #48 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:306:29
>  #49 in SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/unx/generic/app/gendisp.cxx:66:22
>  #50 in SalUserEventList::DispatchUserEvents(bool) at vcl/source/app/salusereventlist.cxx:108:17
>  #51 in SalGenericDisplay::DispatchInternalEvent(bool) at vcl/unx/generic/app/gendisp.cxx:51:12
>  #52 in SalX11Display::Yield() at vcl/unx/generic/app/saldisp.cxx:1918:9
>  #53 in DisplayYield(int, void*) at vcl/unx/generic/app/saldisp.cxx:414:13
>  #54 in (anonymous namespace)::YieldEntry::HandleNextEvent() const at vcl/unx/generic/app/saldata.cxx:566:38
>  #55 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:662:25
>  #56 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
>  #57 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
>  #58 in Application::Reschedule(bool) at vcl/source/app/svapp.cxx:467:12
>  #59 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:91:13
>  #60 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:78:1
>  #61 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45
>  #62 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
>  #63 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20
>  #64 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5
>  #65 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
>  #66 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41
>  #67 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17
>  #68 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25
>  #69 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
>  #70 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
>  #71 in Application::Yield() at vcl/source/app/svapp.cxx:518:5
>  #72 in Application::Execute() at vcl/source/app/svapp.cxx:433:9
>  #73 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17
>  #74 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35
>  #75 in SVMain() at vcl/source/app/svmain.cxx:228:12
>  #76 in soffice_main at desktop/source/app/sofficemain.cxx:107:12
>  #77 in sal_main at desktop/source/app/main.c:48:15
>  #78 in main at desktop/source/app/main.c:47:1
> previously allocated by thread T0 here:
>  #0 in operator new(unsigned long) at compiler-rt/lib/asan/asan_new_delete.cpp:99:3
>  #1 in VclPtr<chart::sidebar::ChartLinePanel> VclPtr<chart::sidebar::ChartLinePanel>::Create<vcl::Window*&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*&>(vcl::Window*&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*&) at include/vcl/vclptr.hxx:129:42
>  #2 in chart::sidebar::ChartLinePanel::Create(vcl::Window*, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*) at chart2/source/controller/sidebar/ChartLinePanel.cxx:117:12
>  #3 in chart::sidebar::ChartPanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/sidebar/Chart2PanelFactory.cxx:107:22
>  #4 in non-virtual thunk to chart::sidebar::ChartPanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/sidebar/Chart2PanelFactory.cxx
>  #5 in (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/uielementfactorymanager.cxx:437:39
>  #6 in non-virtual thunk to (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/uielementfactorymanager.cxx
>  #7 in sfx2::sidebar::SidebarController::CreateUIElement(com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&, rtl::OUString const&, bool, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:967:32
>  #8 in sfx2::sidebar::SidebarController::CreatePanel(rtl::OUString const&, vcl::Window*, bool, sfx2::sidebar::Context const&, VclPtr<sfx2::sidebar::Deck> const&) at sfx2/source/sidebar/SidebarController.cxx:908:43
>  #9 in sfx2::sidebar::SidebarController::CreatePanels(rtl::OUString const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:720:41
>  #10 in sfx2::sidebar::SidebarController::CreateDeck(rtl::OUString const&, sfx2::sidebar::Context const&, bool) at sfx2/source/sidebar/SidebarController.cxx:672:5
>  #11 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:822:5
>  #12 in sfx2::sidebar::SidebarController::UpdateConfigurations() at sfx2/source/sidebar/SidebarController.cxx:569:9
>  #13 in sfx2::sidebar::SidebarController::notifyContextChangeEvent(com::sun::star::ui::ContextChangeEventObject const&) at sfx2/source/sidebar/SidebarController.cxx:323:9
>  #14 in (anonymous namespace)::ContextChangeEventMultiplexer::addContextChangeEventListener(com::sun::star::uno::Reference<com::sun::star::ui::XContextChangeEventListener> const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) at framework/source/services/ContextChangeEventMultiplexer.cxx:176:29
>  #15 in sfx2::sidebar::SidebarController::registerSidebarForFrame(sfx2::sidebar::SidebarController*, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at sfx2/source/sidebar/SidebarController.cxx:213:19
>  #16 in chart::ChartController::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at chart2/source/controller/main/ChartController.cxx:400:9
>  #17 in chart::ChartFrameLoader::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at chart2/source/controller/main/ChartFrameloader.cxx:133:22
>  #18 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1157:37
>  #19 in framework::LoadEnv::start() at framework/source/loadenv/loadenv.cxx:395:20
>  #20 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) at framework/source/loadenv/loadenv.cxx:300:5
>  #21 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:169:14
>  #22 in (anonymous namespace)::XFrameImpl::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/frame.cxx:590:16
>  #23 in non-virtual thunk to (anonymous namespace)::XFrameImpl::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/frame.cxx
>  #24 in DocumentHolder::LoadDocToFrame(bool) at embeddedobj/source/general/docholder.cxx:984:31
>  #25 in DocumentHolder::ShowInplace(com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&, com::sun::star::awt::Rectangle const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&) at embeddedobj/source/general/docholder.cxx:477:15
>  #26 in OCommonEmbeddedObject::SwitchStateTo_Impl(int) at embeddedobj/source/commonembedding/embedobj.cxx:252:42
>  #27 in OCommonEmbeddedObject::changeState(int) at embeddedobj/source/commonembedding/embedobj.cxx:451:17
>  #28 in OCommonEmbeddedObject::doVerb(int) at embeddedobj/source/commonembedding/embedobj.cxx:537:9
>  #29 in SfxInPlaceClient::DoVerb(long) at sfx2/source/view/ipclient.cxx:950:40
>  #30 in ScTabViewShell::ActivateObject(SdrOle2Obj*, long) at sc/source/ui/view/tabvwshb.cxx:205:29
>  #31 in ScGridWinUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString const, rtl::OUString, std::less<rtl::OUString const>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at sc/source/ui/uitest/uiobject.cxx:175:29
>  #32 in UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0::operator()() const at vcl/source/uitest/uno/uiobject_uno.cxx:124:16
>  #33 in void std::__invoke_impl<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(std::__invoke_other, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at include/c++/10.0.1/bits/invoke.h:60:14
>  #34 in std::enable_if<is_invocable_r_v<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>, void>::type std::__invoke_r<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at include/c++/10.0.1/bits/invoke.h:110:2
>  #35 in std::_Function_handler<void (), UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0>::_M_invoke(std::_Any_data const&) at include/c++/10.0.1/bits/std_function.h:291:9
>  #36 in std::function<void ()>::operator()() const at include/c++/10.0.1/bits/std_function.h:622:14
>  #37 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:83:13
>  #38 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:78:1
>  #39 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45
>  #40 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
>  #41 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20
>  #42 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5
>  #43 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
>  #44 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41
>  #45 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17
>  #46 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25
>  #47 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
>  #48 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
>  #49 in Application::Yield() at vcl/source/app/svapp.cxx:518:5
>  #50 in Application::Execute() at vcl/source/app/svapp.cxx:433:9
>  #51 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17
>  #52 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35
>  #53 in SVMain() at vcl/source/app/svmain.cxx:228:12
>  #54 in soffice_main at desktop/source/app/sofficemain.cxx:107:12
>  #55 in sal_main at desktop/source/app/main.c:48:15
>  #56 in main at desktop/source/app/main.c:47:1

The changes that were necessary to fix that scenario are those in
ChartAreaPanel.cxx and ChartLinePanel.cxx, but the other updateModel
implementations look equally broken.

Change-Id: I064fb701dc10e7cb7ef7ea5839f7dd1ae8d0ebba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91467
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Apr 3, 2020
make a copy of m_pImpGraphicList because if we swap out a svg, the svg filter
may create more temp Graphics which are auto-added to m_pImpGraphicList
invalidating a loop over m_pImpGraphicList

 #0  0x00007ffff0d25ae5 in vcl::graphic::Manager::reduceGraphicMemory() (this=0x7ffff1bc4760 <vcl::graphic::Manager::get()::gStaticManager>)
    at vcl/source/graphic/Manager.cxx:88
 #1  0x00007ffff0d25ee9 in vcl::graphic::Manager::registerGraphic(std::shared_ptr<ImpGraphic> const&, rtl::OUString const&)
    (this=0x7ffff1bc4760 <vcl::graphic::Manager::get()::gStaticManager>, pImpGraphic=std::shared_ptr<ImpGraphic> (use count 1, weak count 0) = {...})
    at vcl/source/graphic/Manager.cxx:139
 #2  0x00007ffff0d26406 in vcl::graphic::Manager::newInstance() (this=0x7ffff1bc4760 <vcl::graphic::Manager::get()::gStaticManager>)
    at vcl/source/graphic/Manager.cxx:184
 #3  0x00007ffff0b6735c in Graphic::Graphic() (this=0x7fffffff84f0) at vcl/source/gdi/graph.cxx:182
 #4  0x00007fffdc526600 in svgio::svgreader::SvgImageNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&, bool) const
    (this=0x555556817940, rTarget=...) at svgio/source/svgreader/svgimagenode.cxx:219
 #5  0x00007fffdc52e75d in svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&, bool) const
    (this=0x55555a6a93d0, rTarget=..., bReferenced=false) at svgio/source/svgreader/svgnode.cxx:529
 #6  0x00007fffdc522339 in svgio::svgreader::SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&, bool) const
    (this=0x55555a6a93d0, rTarget=..., bReferenced=false) at svgio/source/svgreader/svggnode.cxx:106
 #7  0x00007fffdc52e75d in svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&, bool) const
    (this=0x55555a6a9070, rTarget=..., bReferenced=false) at svgio/source/svgreader/svgnode.cxx:529
 #8  0x00007fffdc522339 in svgio::svgreader::SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&, bool) const
    (this=0x55555a6a9070, rTarget=..., bReferenced=false) at svgio/source/svgreader/svggnode.cxx:106
 #9  0x00007fffdc52e75d in svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&, bool) const
    (this=0x55555a5f9150, rTarget=..., bReferenced=false) at svgio/source/svgreader/svgnode.cxx:529
 #10 0x00007fffdc54d19f in svgio::svgreader::SvgSvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&, bool) const
    (this=0x55555a5f9150, rTarget=..., bReferenced=false) at svgio/source/svgreader/svgsvgnode.cxx:304
 #11 0x00007fffdc571373 in svgio::svgreader::(anonymous namespace)::XSvgParser::getDecomposition(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) (this=0x55555a69c6d0, xSVGStream=uno::Reference to (comphelper::SequenceInputStream *) 0x555557480668, aAbsolutePath="")
    at svgio/source/svguno/xsvgparser.cxx:160
 #12 0x00007ffff0cf849b in VectorGraphicData::ensureSequenceAndRange() (this=0x555556ea7540)
    at vcl/source/gdi/vectorgraphicdata.cxx:196
 #13 0x00007ffff0cf9124 in VectorGraphicData::getRange() const (this=0x555556ea7540)
    at vcl/source/gdi/vectorgraphicdata.cxx:323
 #14 0x00007ffff0b74da7 in ImpGraphic::ImplGetPrefSize() const (this=0x5555588b00f0) at vcl/source/gdi/impgraph.cxx:778
 #15 0x00007ffff0b76623 in ImpGraphic::ImplWriteEmbedded(SvStream&) (this=0x5555588b00f0, rOStm=...)
    at vcl/source/gdi/impgraph.cxx:1235
 #16 0x00007ffff0b770a1 in ImpGraphic::ImplSwapOut(SvStream*) (this=0x5555588b00f0, xOStm=0x55555826b7d0)
    at vcl/source/gdi/impgraph.cxx:1377
 #17 0x00007ffff0b76bdb in ImpGraphic::ImplSwapOut() (this=0x5555588b00f0) at vcl/source/gdi/impgraph.cxx:1328
 #18 0x00007ffff0d25c88 in vcl::graphic::Manager::reduceGraphicMemory() (this=0x7ffff1bc4760 <vcl::graphic::Manager::get()::gStaticManager>)
    at vcl/source/graphic/Manager.cxx:107
 #19 0x00007ffff0d25ee9 in vcl::graphic::Manager::registerGraphic(std::shared_ptr<ImpGraphic> const&, rtl::OUString const&)
    (this=0x7ffff1bc4760 <vcl::graphic::Manager::get()::gStaticManager>, pImpGraphic=std::shared_ptr<ImpGraphic> (use count 1, weak count 0) = {...})
    at vcl/source/graphic/Manager.cxx:139
 #20 0x00007ffff0d26406 in vcl::graphic::Manager::newInstance() (this=0x7ffff1bc4760 <vcl::graphic::Manager::get()::gStaticManager>)
    at vcl/source/graphic/Manager.cxx:184
 #21 0x00007ffff0b6735c in Graphic::Graphic() (this=0x555556d5ea68) at vcl/source/gdi/graph.cxx:182

Change-Id: I4e1ffcb12ead0d53b7ca2f369154e9c753af77d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91650
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Apr 22, 2020
`instdir/program/soffice --convert-to pdf
caolan/id:001708,src:001481,op:havoc,rep:8.jpg` (with the file from
vm138.documentfoundation.org:/srv/crashtestdata/files/) failed with UBSan
float-cast-overflow

> vcl/source/filter/jpeg/jpegc.cxx:371:23: runtime error: 160000 is outside the range of representable values of type 'unsigned short'
>  #0 in WriteJPEG(JPEGWriter*, void*, long, long, basegfx::B2DVector const&, bool, long, long, com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator> const&) at vcl/source/filter/jpeg/jpegc.cxx:371:23
>  #1 in JPEGWriter::Write(Graphic const&) at vcl/source/filter/jpeg/JpegWriter.cxx:243:16
>  #2 in ExportJPEG(SvStream&, Graphic const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const*, bool*) at vcl/source/filter/jpeg/jpeg.cxx:58:32
>  #3 in GraphicFilter::ExportGraphic(Graphic const&, rtl::OUString const&, SvStream&, unsigned short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const*) at vcl/source/filter/graphicfilter.cxx:1991:22
>  #4 in (anonymous namespace)::GraphicProvider::storeGraphic(com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at vcl/source/graphic/UnoGraphicProvider.cxx:818:25
>  #5 in vcl::PDFWriterImpl::implWriteBitmapEx(Point const&, Size const&, BitmapEx const&, Graphic const&, VirtualDevice const*, vcl::PDFWriter::PlayMetafileContext const&) at vcl/source/gdi/pdfwriter_impl2.cxx:217:35
>  #6 in vcl::PDFWriterImpl::playMetafile(GDIMetaFile const&, vcl::PDFExtOutDevData*, vcl::PDFWriter::PlayMetafileContext const&, VirtualDevice*) at vcl/source/gdi/pdfwriter_impl2.cxx:809:21
>  #7 in vcl::PDFWriter::PlayMetafile(GDIMetaFile const&, vcl::PDFWriter::PlayMetafileContext const&, vcl::PDFExtOutDevData*) at vcl/source/gdi/pdfwriter.cxx:464:22
>  #8 in PDFExport::ImplExportPage(vcl::PDFWriter&, vcl::PDFExtOutDevData&, GDIMetaFile const&) at filter/source/pdf/pdfexport.cxx:1094:13
>  #9 in PDFExport::ExportSelection(vcl::PDFWriter&, com::sun::star::uno::Reference<com::sun::star::view::XRenderable> const&, com::sun::star::uno::Any const&, StringRangeEnumerator const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, int) at filter/source/pdf/pdfexport.cxx:242:25
>  #10 in PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at filter/source/pdf/pdfexport.cxx:955:28
>  #11 in PDFFilter::implExport(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at filter/source/pdf/pdffilter.cxx:161:24
>  #12 in PDFFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at filter/source/pdf/pdffilter.cxx:224:23
>  #13 in SfxObjectShell::ExportTo(SfxMedium&) at sfx2/source/doc/objstor.cxx:2412:25 (instdir/program/libsfxlo.so +0x52260ad)

as the values read for that (artificial) jpg in
vcl/source/filter/png/pngread.cxx are

  maOrigSize = 551 x 211

vs.

  maPhysSize = 19435 x 7442

so Graphic::GetPPI returns 323.232 x 160000.

For jpeg_scan_info members density_unit, X_density, and Y_density,
workdir/UnpackedTarball/libjpeg-turbo/libjpeg.txt states:  "The default values
are 0,1,1 indicating square pixels of unknown size."  So lets stick to those if
the actual values would be too large.

(I only check for too large values, not for too small negative ones.  I do not
know if the code could legitimately be called with such---so should handle them
similarly---or not---in which case it should assert that.)

Change-Id: I4b93b278e14069c458c20cdd077ab4fa72ed1f2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92696
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Apr 27, 2020
If something goes wrong, better keep the testing Python and the tested soffice
process in a state in which the actual problem can (hopefully) be debugged
better.

I happened to run into a hung UITest_chart on Linux, where soffice.bin was still
at

> Thread 1 (Thread 0x7f2e2b280fc0 (LWP 1906251)):
> #0  futex_abstimed_wait_cancelable (private=0, abstime=0x7f2e27b59a80, clockid=<optimized out>, expected=0, futex_word=0x60e000024e8c) at /usr/src/debug/glibc-2.31-17-gab029a2801/sysdeps/nptl/futex-internal.h:320
> #1  __pthread_cond_wait_common (abstime=0x7f2e27b59a80, clockid=<optimized out>, mutex=0x60e000024e38, cond=0x60e000024e60) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:520
> #2  __pthread_cond_clockwait (abstime=0x7f2e27b59a80, clockid=<optimized out>, mutex=0x60e000024e38, cond=0x60e000024e60) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:677
> #3  __pthread_cond_clockwait (cond=0x60e000024e60, mutex=0x60e000024e38, clockid=<optimized out>, abstime=0x7f2e27b59a80) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:665
> #4  0x00007f2e5fead808 in std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x60e000024e60, __lock=..., __atime=...) at include/c++/10.0.1/condition_variable:210
> #5  0x00007f2e5fead295 in std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x60e000024e60, __lock=..., __atime=...) at include/c++/10.0.1/condition_variable:120
> #6  0x00007f2e5fea8f05 in std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> >, SvpSalInstance::DoYield(bool, bool)::$_2>(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, SvpSalInstance::DoYield(bool, bool)::$_2) (this=0x60e000024e60, __lock=..., __atime=..., __p=...) at include/c++/10.0.1/condition_variable:159
> #7  0x00007f2e5fea6e60 in std::condition_variable::wait_for<long, std::ratio<1l, 1000l>, SvpSalInstance::DoYield(bool, bool)::$_2>(std::unique_lock<std::mutex>&, std::chrono::duration<long, std::ratio<1l, 1000l> > const&, SvpSalInstance::DoYield(bool, bool)::$_2) (this=0x60e000024e60, __lock=..., __rtime=..., __p=...) at include/c++/10.0.1/condition_variable:186
> #8  0x00007f2e5fea5a8e in SvpSalInstance::DoYield(bool, bool) (this=0x611000001bc0, bWait=true, bHandleAllCurrentEvents=false) at vcl/headless/svpinst.cxx:497
> #9  0x00007f2e5f3a232d in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:454
> #10 0x00007f2e5f3a18e8 in Application::Yield() () at vcl/source/app/svapp.cxx:518
> #11 0x00007f2e5bf32c2d in Dialog::Execute() (this=0x61a000072080) at vcl/source/window/dialog.cxx:1032
> #12 0x00007f2e5efdcd62 in SalInstanceDialog::run() (this=0x619000091080) at vcl/source/app/salvtables.cxx:1480
> #13 0x00007f2dc37421fd in weld::DialogController::run() (this=0x61200077c5c0) at include/vcl/weld.hxx:2227
> #14 0x00007f2dc39672f2 in chart::CreationWizardUnoDlg::execute() (this=0x610000168d40) at chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx:189
> #15 0x00007f2df91f2507 in FuInsertChart::FuInsertChart(ScTabViewShell&, vcl::Window*, ScDrawView*, SdrModel*, SfxRequest&) (this=0x7f2e27f1a300, rViewSh=..., pWin=0x61a0001e8a80, pViewP=0x61d0001f6880, pDoc=0x617000066a00, rReq=...) at sc/source/ui/drawfunc/fuins2.cxx:673
> #16 0x00007f2dfaf9a379 in ScTabViewShell::ExecDrawIns(SfxRequest&) (this=0x61d0001eaa80, rReq=...) at sc/source/ui/view/tabvwshb.cxx:336
> #17 0x00007f2dfaedf365 in SfxStubScTabViewShellExecDrawIns(SfxShell*, SfxRequest&) (pShell=0x61d0001eaa80, rReq=...) at workdir/SdiTarget/sc/sdi/scslots.hxx:1447
> #18 0x00007f2e8031ded6 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) (this=0x61d0001eaa80, pFunc=0x7f2dfaedf240 <SfxStubScTabViewShellExecDrawIns(SfxShell*, SfxRequest&)>, rReq=...) at include/sfx2/shell.hxx:197
> #19 0x00007f2e802a77ff in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x6020002f3dd0, rShell=..., rSlot=..., rReq=..., bRecord=true) at sfx2/source/control/dispatch.cxx:251
> #20 0x00007f2e802aacb6 in SfxDispatcher::PostMsgHandler(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >) (this=0x6020002f3dd0, pReq=std::unique_ptr<class SfxRequest> = {...}) at sfx2/source/control/dispatch.cxx:988
[...]

but the Python process was already at

> Traceback (most recent call first):
>   <built-in method waitpid of module object at remote 0x60800002d1c0>
>   File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1611, in _try_wait
>     (pid, sts) = os.waitpid(self.pid, wait_flags)
>   File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1653, in _wait
>     (pid, sts) = self._try_wait(0)
>   File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1019, in wait
>     return self._wait(timeout=timeout)
>   File "uitest/libreoffice/connection.py", line 133, in tearDown
>     ret = self.soffice.wait()
>   File "uitest/libreoffice/connection.py", line 178, in tearDown
>     self.connection.tearDown()
>   File "uitest/uitest/framework.py", line 46, in tearDown
>     self.connection.tearDown()
>   File "instdir/program/python-core-3.7.7/lib/unittest/case.py", line 631, in run
>     self.tearDown()
>   File "instdir/program/python-core-3.7.7/lib/unittest/case.py", line 676, in __call__
>     return self.run(*args, **kwds)
>   File "instdir/program/python-core-3.7.7/lib/unittest/suite.py", line 122, in run
>     test(result)
>   File "instdir/program/python-core-3.7.7/lib/unittest/suite.py", line 84, in __call__
>     return self.run(*args, **kwds)
>   File "instdir/program/python-core-3.7.7/lib/unittest/runner.py", line 176, in run
>     test(result)
>   File "uitest/test_main.py", line 128, in <module>
>     result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(test_suite)

and the relevant

> ======================================================================
> ERROR: test_tdf99069_chart_cancel_data_ranges_dialog (tdf99069.tdf99069)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "sc/qa/uitest/chart/tdf99069.py", line 32, in test_tdf99069_chart_cancel_data_ranges_dialog
>     self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart")
>   File "uitest/uitest/test.py", line 83, in execute_dialog_through_command
>     raise DialogNotExecutedException(command)
> uitest.test.DialogNotExecutedException: Dialog not executed for: .uno:InsertObjectChart

had not yet been written to workdir/UITest/chart/done.log (Python's unittest
appears to unhelpfully hold back such vital information until the very end of
the full test run).

That means DialogNotClosedException is unused now and can thus be removed.

Change-Id: I556ae52f05b1362f4e78f2de362a7b4f9b8a0cf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92959
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request May 14, 2020
...presumably introduced by what looks like typos in
e9164b9 "lok: shape scaling rework"

>      }
>      // size
>      if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)) {
> -        nSizX=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
> +        nSizX=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
>          bChgSiz=true;
>          bChgWdh=true;
>      }
>      if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) {
> -        nSizY=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
> +        nSizY=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
>          bChgSiz=true;
>          bChgHgt=true;
>      }

but only showing up now (presumably due to newly added test code in
2f4ea95 "lok: unit test for metric field or
formatted field control") during CppunitTest_desktop_lib:

> svx/source/svdraw/svdedtv1.cxx:1602:15: runtime error: downcast of address 0x603001642720 which does not point to an object of type 'const SfxInt32Item'
> 0x603001642720: note: object is of type 'SfxUInt32Item'
>  7a 04 80 2b  50 bb 0f 7f cb 7f 00 00  01 00 00 00 6a 27 00 be  bc e8 02 00 be be be be  be be be be
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'SfxUInt32Item'
>  #0 in SdrEditView::SetGeoAttrToMarked(SfxItemSet const&) at svx/source/svdraw/svdedtv1.cxx:1602:15
>  #1 in ScDrawShell::ExecDrawAttr(SfxRequest&) at sc/source/ui/drawfunc/drawsh.cxx:385:32
>  #2 in SfxStubScDrawShellExecDrawAttr(SfxShell*, SfxRequest&) at workdir/SdiTarget/sc/sdi/scslots.hxx:2779:1
>  #3 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) at include/sfx2/shell.hxx:197:35
>  #4 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) at sfx2/source/control/dispatch.cxx:252:16
>  #5 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) at sfx2/source/control/dispatch.cxx:752:9
>  #6 in SfxDispatcher::ExecuteList(unsigned short, SfxCallMode, std::initializer_list<SfxPoolItem const*>, std::initializer_list<SfxPoolItem const*>) at sfx2/source/control/dispatch.cxx:960:8
>  #7 in svx::sidebar::PosSizePropertyPanel::executeSize() at svx/source/sidebar/possize/PosSizePropertyPanel.cxx:848:45
>  #8 in svx::sidebar::PosSizePropertyPanel::ChangeWidthHdl(weld::MetricSpinButton&) at svx/source/sidebar/possize/PosSizePropertyPanel.cxx:378:5
>  #9 in svx::sidebar::PosSizePropertyPanel::LinkStubChangeWidthHdl(void*, weld::MetricSpinButton&) at svx/source/sidebar/possize/PosSizePropertyPanel.cxx:360:1
>  #10 in Link<weld::MetricSpinButton&, void>::Call(weld::MetricSpinButton&) const at include/tools/link.hxx:111:45
>  #11 in weld::MetricSpinButton::signal_value_changed() at include/vcl/weld.hxx:1721:54
>  #12 in weld::MetricSpinButton::spin_button_value_changed(weld::SpinButton&) at vcl/source/window/builder.cxx:192:9
>  #13 in weld::MetricSpinButton::LinkStubspin_button_value_changed(void*, weld::SpinButton&) at vcl/source/window/builder.cxx:190:5
>  #14 in Link<weld::SpinButton&, void>::Call(weld::SpinButton&) const at include/tools/link.hxx:111:45
>  #15 in weld::SpinButton::signal_value_changed() at include/vcl/weld.hxx:1490:54
>  #16 in SalInstanceSpinButton::UpDownHdl(SpinField&) at vcl/source/app/salvtables.cxx:5169:71
>  #17 in SalInstanceSpinButton::LinkStubUpDownHdl(void*, SpinField&) at vcl/source/app/salvtables.cxx:5169:1
>  #18 in Link<SpinField&, void>::Call(SpinField&) const at include/tools/link.hxx:111:45
>  #19 in SpinField::Up()::$_0::operator()() const at vcl/source/control/spinfld.cxx:361:88
>  #20 in void std::__invoke_impl<void, SpinField::Up()::$_0&>(std::__invoke_other, SpinField::Up()::$_0&) at include/c++/11.0.0/bits/invoke.h:60:14
>  #21 in std::enable_if<is_invocable_r_v<void, SpinField::Up()::$_0&>, void>::type std::__invoke_r<void, SpinField::Up()::$_0&>(SpinField::Up()::$_0&) at include/c++/11.0.0/bits/invoke.h:110:2
>  #22 in std::_Function_handler<void (), SpinField::Up()::$_0>::_M_invoke(std::_Any_data const&) at include/c++/11.0.0/bits/std_function.h:291:9
>  #23 in std::function<void ()>::operator()() const at include/c++/11.0.0/bits/std_function.h:622:14
>  #24 in Control::ImplCallEventListenersAndHandler(VclEventId, std::function<void ()> const&) at vcl/source/control/ctrl.cxx:315:13
>  #25 in SpinField::Up() at vcl/source/control/spinfld.cxx:361:5
>  #26 in FormattedField::SetValueFromString(rtl::OUString const&) at vcl/source/control/fmtfield.cxx:854:20
>  #27 in FormattedFieldUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString const, rtl::OUString, std::less<rtl::OUString const>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at vcl/source/uitest/uiobject.cxx:1361:31
>  #28 in DesktopLOKTest::testMetricField() at desktop/qa/desktop_lib/test_desktop_lib.cxx:2858:13

Change-Id: I57988723e23f5a419639e37fe130bad92682a1a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94178
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request May 25, 2020
If something goes wrong, better keep the testing Python and the tested soffice
process in a state in which the actual problem can (hopefully) be debugged
better.

I happened to run into a hung UITest_options on Linux, where soffice.bin was
still at

> Thread 1 (Thread 0x7fa6371d9fc0 (LWP 1210042)):
> #0  futex_abstimed_wait_cancelable (private=0, abstime=0x7fa633a17f80, clockid=<optimized out>, expected=0, futex_word=0x60e000024e88) at /usr/src/debug/glibc-2.31-17-gab029a2801/sysdeps/nptl/futex-internal.h:320
> #1  __pthread_cond_wait_common (abstime=0x7fa633a17f80, clockid=<optimized out>, mutex=0x60e000024e38, cond=0x60e000024e60) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:520
> #2  __pthread_cond_clockwait (abstime=0x7fa633a17f80, clockid=<optimized out>, mutex=0x60e000024e38, cond=0x60e000024e60) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:677
> #3  __pthread_cond_clockwait (cond=0x60e000024e60, mutex=0x60e000024e38, clockid=<optimized out>, abstime=0x7fa633a17f80) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:665
> #4  0x00007fa66899be08 in std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x60e000024e60, __lock=..., __atime=...) at include/c++/10.0.1/condition_variable:210
> #5  0x00007fa66899b895 in std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x60e000024e60, __lock=..., __atime=...) at include/c++/10.0.1/condition_variable:120
> #6  0x00007fa668997505 in std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> >, SvpSalInstance::DoYield(bool, bool)::$_2>(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, SvpSalInstance::DoYield(bool, bool)::$_2) (this=0x60e000024e60, __lock=..., __atime=..., __p=...) at include/c++/10.0.1/condition_variable:159
> #7  0x00007fa668995460 in std::condition_variable::wait_for<long, std::ratio<1l, 1000l>, SvpSalInstance::DoYield(bool, bool)::$_2>(std::unique_lock<std::mutex>&, std::chrono::duration<long, std::ratio<1l, 1000l> > const&, SvpSalInstance::DoYield(bool, bool)::$_2) (this=0x60e000024e60, __lock=..., __rtime=..., __p=...) at include/c++/10.0.1/condition_variable:186
> #8  0x00007fa66899408e in SvpSalInstance::DoYield(bool, bool) (this=0x611000001bc0, bWait=true, bHandleAllCurrentEvents=false) at vcl/headless/svpinst.cxx:497
> #9  0x00007fa667e7114d in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:455
> #10 0x00007fa667e70708 in Application::Yield() () at vcl/source/app/svapp.cxx:519
> #11 0x00007fa66498f6cd in Dialog::Execute() (this=0x618003c16480) at vcl/source/window/dialog.cxx:1030
> #12 0x00007fa667a93812 in SalInstanceDialog::run() (this=0x616000575780) at vcl/source/app/salvtables.cxx:1482
> #13 0x00007fa2e8711b8d in weld::DialogController::run() (this=0x60c004e70d80) at include/vcl/weld.hxx:2289
> #14 0x00007fa2e98a6cbc in OfaTreeOptionsDialog::run() (this=0x60c004e70d80) at cui/source/options/treeopt.cxx:1937
> #15 0x00007fa2e90c4d15 in CuiAbstractController_Impl::Execute() (this=0x60300187b4f0) at cui/source/factory/dlgfact.cxx:103
> #16 0x00007fa688bc9b2d in SfxApplication::OfaExec_Impl(SfxRequest&) (this=0x604006f2fe10, rReq=...) at sfx2/source/appl/appserv.cxx:1311
> #17 0x00007fa688b17655 in SfxStubSfxApplicationOfaExec_Impl(SfxShell*, SfxRequest&) (pShell=0x604006f2fe10, rReq=...) at workdir/SdiTarget/sfx2/sdi/sfxslots.hxx:1270
> #18 0x00007fa6892521f6 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) (this=0x604006f2fe10, pFunc=0x7fa688b17530 <SfxStubSfxApplicationOfaExec_Impl(SfxShell*, SfxRequest&)>, rReq=...) at include/sfx2/shell.hxx:197
> #19 0x00007fa6891dbb1f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x6020013430b0, rShell=..., rSlot=..., rReq=..., bRecord=true) at sfx2/source/control/dispatch.cxx:252
> #20 0x00007fa6891defd6 in SfxDispatcher::PostMsgHandler(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >) (this=0x6020013430b0, pReq=std::unique_ptr<class SfxRequest> = {...}) at sfx2/source/control/dispatch.cxx:989
[...]

but the Python process was already at

> Traceback (most recent call first):
>   <built-in method waitpid of module object at remote 0x60800002d140>
>   File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1611, in _try_wait
>     (pid, sts) = os.waitpid(self.pid, wait_flags)
>   File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1653, in _wait
>     (pid, sts) = self._try_wait(0)
>   File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1019, in wait
>     return self._wait(timeout=timeout)
>   File "uitest/libreoffice/connection.py", line 133, in tearDown
>     ret = self.soffice.wait()
>   File "uitest/libreoffice/connection.py", line 178, in tearDown
>     self.connection.tearDown()
>   File "uitest/uitest/framework.py", line 46, in tearDown
>     self.connection.tearDown()
>   File "instdir/program/python-core-3.7.7/lib/unittest/case.py", line 631, in run
>     self.tearDown()
>   File "instdir/program/python-core-3.7.7/lib/unittest/case.py", line 676, in __call__
>     return self.run(*args, **kwds)
>   File "instdir/program/python-core-3.7.7/lib/unittest/suite.py", line 122, in run
>     test(result)
>   File "instdir/program/python-core-3.7.7/lib/unittest/suite.py", line 84, in __call__
>     return self.run(*args, **kwds)
>   File "instdir/program/python-core-3.7.7/lib/unittest/runner.py", line 176, in run
>     test(result)
>   File "uitest/test_main.py", line 128, in <module>
>     result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(test_suite)

and the relevant

> ======================================================================
> ERROR: test_tdf78133_options_app_colors (tdf78133.tdf78133)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "sw/qa/uitest/options/tdf78133.py", line 38, in test_tdf78133_options_app_colors
>     self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog")  #optionsdialog
>   File "uitest/uitest/test.py", line 78, in execute_dialog_through_command
>     raise DialogNotExecutedException(command)
> uitest.test.DialogNotExecutedException: Dialog not executed for: .uno:OptionsTreeDialog

had not yet been written to workdir/UITest/options/done.log (Python's unittest
appears to unhelpfully hold back such vital information until the very end of
the full test run).

There appears to be no test code that relies on a timed-out
execute_dialog_through_command throwing an exception instead of hanging (at
least, there is no explicit catching of DialogNotExecutedException anywhere in
the code, and a full `make check screenshot` on Linux kept working with this
change).

(This is similar to 19d3dba "Do not time out
close_dialog_through_button".)

Change-Id: Ie907a091ae09b59e65c4b2676298e147c9d2da2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94786
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request May 27, 2020
Unfortunately, this isn't fully functional, but
didn't want to lose the effort. The problem is
that there is no proper config for languages
in the unit-tests. So even when we set the
language explicitly, it still doesn't apply
to the SpellCheckerDispatcher, which is
where it matters. This seems to be because
the config is not properly propagated and
broadcast. Below is the stacktrace as
works on desktop. During the unittest
the Broadcaster has no change listener
for LngSvcMgr, so SpellCheckerDispatcher::SetServiceList
doesn't get called.

 #0  0x00007f47f3fed7e6 in SpellCheckerDispatcher::SetServiceList(com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<rtl::OUString> const&)
     (this=0x5589de40e7a0, rLocale=..., rSvcImplNames=uno::Sequence of length 1 = {...}) at /home/ash/prj/master/linguistic/source/spelldsp.cxx:795
 #1  0x00007f47f3fcc0ad in LngSvcMgr::Notify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b4e0, rPropertyNames=uno::Sequence of length 4 = {...})
     at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:826
 #2  0x00007f47fa2d3c8d in utl::ConfigItem::CallNotify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b530, rPropertyNames=uno::Sequence of length 4 = {...})
     at /home/ash/prj/master/unotools/source/config/configitem.cxx:181
 #3  0x00007f47fa2d3946 in utl::ConfigChangeListener_Impl::changesOccurred(com::sun::star::util::ChangesEvent const&) (this=0x5589de464b90, rEvent=...)
     at /home/ash/prj/master/unotools/source/config/configitem.cxx:143
 #4  0x00007f47e273bb61 in configmgr::Broadcaster::send() (this=0x7ffcc604c5b0) at /home/ash/prj/master/configmgr/source/broadcaster.cxx:182
 #5  0x00007f47e277f002 in configmgr::RootAccess::commitChanges() (this=0x5589dd557400) at /home/ash/prj/master/configmgr/source/rootaccess.cxx:171
 #6  0x00007f47fa2d80e3 in utl::ConfigItem::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x5589dd5571b0, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/configitem.cxx:1025
 #7  0x00007f47fa339983 in SvtLinguConfig::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x7ffcc604cb40, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/lingucfg.cxx:847
 #8  0x00007f47f3fcb88f in LngSvcMgr::UpdateAll() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:765
 #9  0x00007f47f3fc9caa in LngSvcMgr::LngSvcMgr() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:438
 #10 0x00007f47f3fd3baf in LngSvcMgr_CreateInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) ()
     at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:1967
 #11 0x00007f4800e9656b in cppu::OSingleFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccfc8, xContext=
     uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:149
 #12 0x00007f4800e96790 in cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589de3ccfc8, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:175
 #13 0x00007f4800e97107 in cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589de3ccf60, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:374
 #14 0x00007f4800eebc8f in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool)
     (this=0x5589dbd2f030, context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630, singletonRequest=false) at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:667
 #15 0x00007f4800eee587 in cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (this=0x5589dbcbaaf0, aServiceSpecifier="com.sun.star.linguistic2.LinguServiceManager", Context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630)
     at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:991
 #16 0x00007f4800776778 in com::sun::star::linguistic2::LinguServiceManager::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
     (the_context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630)
     at /home/ash/prj/master/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/linguistic2/LinguServiceManager.hpp:38
 #17 0x00007f4800772d51 in GetLngSvcMgr_Impl() () at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:66
 #18 0x00007f4800773449 in SpellDummy_Impl::GetSpell_Impl() (this=0x5589dd82f420) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:217
 #19 0x00007f4800773614 in SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
     (this=0x5589dd82f420, rWord="a", nLanguage=1033, rProperties=empty uno::Sequence) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:249
 #20 0x00007f48006ae4c2 in ImpEditEngine::DoOnlineSpelling(ContentNode*, bool, bool) (this=0x5589de195060, pThisNodeOnly=0x0, bSpellAtCursorPos=false, bInterruptible=true)
     at /home/ash/prj/master/editeng/source/editeng/impedit4.cxx:2306
 #21 0x00007f480067d0d2 in ImpEditEngine::OnlineSpellHdl(Timer*) (this=0x5589de195060) at /home/ash/prj/master/editeng/source/editeng/impedit3.cxx:322

(cherry picked from commit 4f77bd94028a140133814d735c0425bbd0de4839)
Reviewed-on: https://gerrit.libreoffice.org/85007
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 66c1f6b)
Reviewed-on: https://gerrit.libreoffice.org/85683
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>

Change-Id: Iffef03502c78311427aa8883739678120cc84931
@repo-lockdown
Copy link

repo-lockdown bot commented Jan 27, 2021

Thank you for your contribution. We use GitHub as a read-only mirror, so please submit your patch into our own code review system: https://wiki.documentfoundation.org/Development/GetInvolved

@repo-lockdown repo-lockdown bot closed this Jan 27, 2021
tdf-gerrit pushed a commit that referenced this pull request Apr 7, 2021
...introduced with 244a447 "Make Pivot table
data source dialog async", as seen e.g. during UITest_calc_tests8:

> ==1217030==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f06d7133444 at pc 0x7f069f0cb613 bp 0x7ffe24058430 sp 0x7ffe24058428
> WRITE of size 2 at 0x7f06d7133444 thread T0
>  #0 in ScAddress::operator=(ScAddress const&) at sc/inc/address.hxx:415:10
>  #1 in ScCellShell::ExecuteDataPilotDialog()::$_4::operator()(int) const at sc/source/ui/view/cellsh1.cxx:3014:42
>  #2 in void std::__invoke_impl<void, ScCellShell::ExecuteDataPilotDialog()::$_4&, int>(std::__invoke_other, ScCellShell::ExecuteDataPilotDialog()::$_4&, int&&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14
>  #3 in std::enable_if<is_invocable_r_v<void, ScCellShell::ExecuteDataPilotDialog()::$_4&, int>, void>::type std::__invoke_r<void, ScCellShell::ExecuteDataPilotDialog()::$_4&, int>(ScCellShell::ExecuteDataPilotDialog()::$_4&, int&&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2
>  #4 in std::_Function_handler<void (int), ScCellShell::ExecuteDataPilotDialog()::$_4>::_M_invoke(std::_Any_data const&, int&&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9
>  #5 in std::function<void (int)>::operator()(int) const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9
>  #6 in Dialog::EndDialog(long) at vcl/source/window/dialog.cxx:1137:9
>  #7 in Dialog::ResponseHdl(Button*) at vcl/source/window/dialog.cxx:1391:5
>  #8 in Dialog::LinkStubResponseHdl(void*, Button*) at vcl/source/window/dialog.cxx:1376:1
>  #9 in Link<Button*, void>::Call(Button*) const at include/tools/link.hxx:111:45
>  #10 in Button::Click()::$_0::operator()() const at vcl/source/control/button.cxx:124:87
>  #11 in void std::__invoke_impl<void, Button::Click()::$_0&>(std::__invoke_other, Button::Click()::$_0&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14
>  #12 in std::enable_if<is_invocable_r_v<void, Button::Click()::$_0&>, void>::type std::__invoke_r<void, Button::Click()::$_0&>(Button::Click()::$_0&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2
>  #13 in std::_Function_handler<void (), Button::Click()::$_0>::_M_invoke(std::_Any_data const&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9
>  #14 in std::function<void ()>::operator()() const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9
>  #15 in Control::ImplCallEventListenersAndHandler(VclEventId, std::function<void ()> const&) at vcl/source/control/ctrl.cxx:315:13
>  #16 in Button::Click() at vcl/source/control/button.cxx:124:5
>  #17 in ButtonUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString const, rtl::OUString, std::less<rtl::OUString const>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at vcl/source/uitest/uiobject.cxx:614:19
>  #18 in UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0::operator()() const at vcl/source/uitest/uno/uiobject_uno.cxx:124:16
>  #19 in void std::__invoke_impl<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(std::__invoke_other, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14
>  #20 in std::enable_if<is_invocable_r_v<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>, void>::type std::__invoke_r<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2
>  #21 in std::_Function_handler<void (), UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0>::_M_invoke(std::_Any_data const&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9
>  #22 in std::function<void ()>::operator()() const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9
>  #23 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:83:13
>  #24 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:78:1
>  #25 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45
>  #26 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
>  #27 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:486:20
>  #28 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:288:5
>  #29 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
>  #30 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:210:53
>  #31 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:463:21
>  #32 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:447:48
>  #33 in Application::Yield() at vcl/source/app/svapp.cxx:511:5
>  #34 in Application::Execute() at vcl/source/app/svapp.cxx:426:9
>  #35 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1588:13
>  #36 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35
>  #37 in SVMain() at vcl/source/app/svmain.cxx:228:12
>  #38 in soffice_main at desktop/source/app/sofficemain.cxx:98:12
>  #39 in sal_main at desktop/source/app/main.c:49:15
>  #40 in main at desktop/source/app/main.c:47:1

Change-Id: I7ff5148f4bf9170fc7add312053de5acc153125b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106919
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Jul 21, 2021
Skip attributes with empty string value in
'Qt5AccessibleWidget::attributes'.

Besides not being a useful value, I also
got a crash using Accerciser to navigate in Calc's
"Format Cells" dialog -> "Font Effects" -> "Text Decoration"
-> "Overlining" -> "Overlining".

'Qt5AccessibleWidget::attributes' had returned
"font-family:;font-size:0pt;font-weight:normal;"
and 'AtSpiAdaptor::getAttributes' (from the Qt library)
aborts, since it splits the "font-family:" part at the colon,
then expects two substrings: one for the attribute name, one
for the value - but there was no value set:

    QString joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset);
    const QStringList attributes = joined.split (QLatin1Char(';'), Qt::SkipEmptyParts, Qt::CaseSensitive);
    for (const QString &attr : attributes) {
        QStringList items;
        items = attr.split(QLatin1Char(':'), Qt::SkipEmptyParts, Qt::CaseSensitive);
->      AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]);
        if (!attribute.isNull())
            set[attribute.name] = attribute.value;
    }

The IAccessible2 spec for the "background-color" text attribute [1]
doesn't specify any default value to be used.

Backtrace:

    Thread 1 received signal SIGABRT, Aborted.
        __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        (rr) bt
    #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
    #1  0x00007f4dcd0bd537 in __GI_abort () at abort.c:79
    #2  0x00007f4dba7fd810 in qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) (context=..., message=...) at global/qlogging.cpp:1914
    #3  0x00007f4dba7f9d48 in QMessageLogger::fatal(char const*, ...) const (this=0x7ffc30a4a6b0, msg=0x7f4dbab9ebb0 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:893
    #4  0x00007f4dba7f1484 in qt_assert_x(char const*, char const*, char const*, int) (where=0x7f4db778eb36 "QList<T>::operator[]", what=0x7f4db778eac8 "index out of range", file=0x7f4db778ea90 "../../../include/QtCore/../../src/corelib/tools/qlist.h", line=579)
            at global/qglobal.cpp:3366
    #5  0x00007f4db7736a65 in QList<QString>::operator[](int) (this=0x7ffc30a4a730, i=1) at ../../../include/QtCore/../../src/corelib/tools/qlist.h:579
    #6  0x00007f4db773017e in AtSpiAdaptor::getAttributes(QAccessibleInterface*, int, bool) const (this=0x557748f27800, interface=0x7f4d8c07cc30, offset=9, includeDefaults=true) at atspiadaptor.cpp:2059
    #7  0x00007f4db772cd74 in AtSpiAdaptor::textInterface(QAccessibleInterface*, QString const&, QDBusMessage const&, QDBusConnection const&) (this=0x557748f27800, interface=0x7f4d8c07cc30, function=..., message=..., connection=...) at atspiadaptor.cpp:1802
    #8  0x00007f4db77274f8 in AtSpiAdaptor::handleMessage(QDBusMessage const&, QDBusConnection const&) (this=0x557748f27800, message=..., connection=...) at atspiadaptor.cpp:1286
    #9  0x00007f4db7fe4d04 in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x7f4d8c014b00, node=..., msg=..., pathStartPos=27) at qdbusintegrator.cpp:1458
    #10 0x00007f4db7fe58ca in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x557753615310) at qdbusintegrator.cpp:1617
    #11 0x00007f4dbaab3c66 in QObject::event(QEvent*) (this=0x557748f27800, e=0x557753615310) at kernel/qobject.cpp:1314
    #12 0x00007f4db96be845 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=0x557747e30970, receiver=0x557748f27800, e=0x557753615310) at kernel/qapplication.cpp:3632
    #13 0x00007f4db96bbcfb in QApplication::notify(QObject*, QEvent*) (this=0x557747f1d8b0, receiver=0x557748f27800, e=0x557753615310) at kernel/qapplication.cpp:2972
    #14 0x00007f4dbaa70aba in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x557748f27800, event=0x557753615310) at kernel/qcoreapplication.cpp:1064
    #15 0x00007f4dbaa71452 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=0x557748f27800, event=0x557753615310) at kernel/qcoreapplication.cpp:1462
    #16 0x00007f4dbaa7213a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x557747eff460) at kernel/qcoreapplication.cpp:1821
    #17 0x00007f4dbaa71acc in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1680
    #18 0x00007f4dbaaff079 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x557748056a30) at kernel/qeventdispatcher_glib.cpp:277
    #19 0x00007f4dbfe4ce6b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #20 0x00007f4dbfe4d118 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #21 0x00007f4dbfe4d1cf in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #22 0x00007f4dbaaff7a2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x557748062a70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
    #23 0x00007f4db76af8fc in QXcbGlibEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x557748062a70, flags=...) at qxcbeventdispatcher.cpp:143
    #24 0x00007f4db9255353 in Qt5Instance::DoYield(bool, bool) (this=0x557747f22580, bWait=4, bHandleAllCurrentEvents=2) at .../libreoffice/vcl/qt5/Qt5Instance.cxx:400
    #25 0x00007f4db9255465 in Qt5Instance::AnyInput(VclInputFlags) (this=0xd87f0c9bbde3ed00, nType=(VclInputFlags::PAINT | VclInputFlags::TIMER | VclInputFlags::OTHER | VclInputFlags::APPEVENT | unknown: 0x7fc0))
            at .../libreoffice/vcl/qt5/Qt5Instance.cxx:422
    #26 0x00007f4dc594b64a in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:465
    #27 0x00007f4dc594be0b in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:532
    #28 0x00007f4dc594b357 in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:444
    #29 0x00007f4dcd2c4226 in desktop::Desktop::Main() (this=0x7ffc30a4c540) at .../libreoffice/desktop/source/app/app.cxx:1602
    #30 0x00007f4dc5967cc6 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:199
    #31 0x00007f4dc5967de7 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:231
    #32 0x00007f4dcd324e9f in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:98
    #33 0x000055774613895d in sal_main () at .../libreoffice/desktop/source/app/main.c:49
    #34 0x0000557746138943 in main (argc=2, argv=0x7ffc30a4c8b8) at .../libreoffice/desktop/source/app/main.c:47

[1] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes

Change-Id: I5e9d5121e69340ff728a87b4a6cb5c182d9ad11b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119247
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Jul 21, 2021
...as seen at least once during UITest_calc_tests9, with thread 1 at

> Thread 1 (Thread 0x7f2c48958fc0 (LWP 439791) "soffice.bin"):
> #0  0x00007f2caa2b17b0 in __lll_lock_wait () at /lib64/libpthread.so.0
> #1  0x00007f2caa2aa553 in pthread_mutex_lock () at /lib64/libpthread.so.0
> #2  0x00007f2ca399275b in __gthread_mutex_lock(pthread_mutex_t*) (__mutex=0x7f2ca40ce020 <cppu::getTypeEntries(cppu::class_data*)::aMutex>) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/x86_64-pc-linux-gnu/bits/gthr-default.h:749
> #3  0x00007f2ca39948cb in std::mutex::lock() (this=0x7f2ca40ce020 <cppu::getTypeEntries(cppu::class_data*)::aMutex>) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_mutex.h:100
> #4  0x00007f2ca39940eb in std::lock_guard<std::mutex>::lock_guard(std::mutex&) (this=0x7f2c4752d820, __m=...) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_mutex.h:229
> #5  0x00007f2ca3990fdb in cppu::getTypeEntries(cppu::class_data*) (cd=0x7f2c3eda4640 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>, com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:71
> #6  0x00007f2ca398c616 in cppu::queryDeepNoXInterface(_typelib_TypeDescriptionReference const*, cppu::class_data*, void*) (pDemandedTDR=0x60f00020ec60, cd=0x7f2c3eda4640 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>, com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>, that=0x60e0002a2960) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:155
> #7  0x00007f2ca398ea93 in cppu::WeakImplHelper_query(com::sun::star::uno::Type const&, cppu::class_data*, void*, cppu::OWeakObject*) (rType=invalid uno::Type, cd=0x7f2c3eda4640 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>, com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>, that=0x60e0002a2960, pBase=0x60e0002a2960) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:283
> #8  0x00007f2c3ea61105 in cppu::WeakImplHelper<com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>::queryInterface(com::sun::star::uno::Type const&) (this=0x60e0002a2960, aType=invalid uno::Type) at /home/sbergman/lo/core/include/cppuhelper/implbase.hxx:111
> #9  0x00007f2c7c491500 in com::sun::star::uno::BaseReference::iquery(com::sun::star::uno::XInterface*, com::sun::star::uno::Type const&) (pInterface=0x60e0002a2960, rType=invalid uno::Type) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:59
> #10 0x00007f2c7c8a1165 in com::sun::star::uno::Reference<com::sun::star::i18n::XCollator>::iquery(com::sun::star::uno::XInterface*) (pInterface=0x60e0002a2960) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:74
> #11 0x00007f2c7c8a015e in com::sun::star::uno::Reference<com::sun::star::i18n::XCollator>::Reference(com::sun::star::uno::BaseReference const&, com::sun::star::uno::UnoReference_Query) (this=0x7f2c47447020, rRef=...) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:176
> #12 0x00007f2c7c89ebaa in com::sun::star::i18n::Collator::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (the_context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/i18n/Collator.hpp:38
> #13 0x00007f2c7c89c324 in CollatorWrapper::CollatorWrapper(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x60200097c0f0, rxContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/unotools/source/i18n/collatorwrapper.cxx:30
> #14 0x00007f2c14889098 in ScGlobal::GetCaseCollator()::$_6::operator()() const (this=0x7f2c470e74a0) at /home/sbergman/lo/core/sc/source/core/data/global.cxx:1044
> #15 0x00007f2c14886efc in comphelper::doubleCheckedInit<CollatorWrapper, ScGlobal::GetCaseCollator()::$_6, osl::Guard<osl::Mutex>, osl::GetGlobalMutex>(std::atomic<CollatorWrapper*>&, ScGlobal::GetCaseCollator()::$_6, osl::GetGlobalMutex) (pointer=..., function=..., guardCtor=...) at /home/sbergman/lo/core/include/comphelper/doublecheckedinit.hxx:53
> #16 0x00007f2c14886d1c in ScGlobal::GetCaseCollator() () at /home/sbergman/lo/core/sc/source/core/data/global.cxx:1041
> #17 0x00007f2c1627adde in ScTypedStrData::LessCaseSensitive::operator()(ScTypedStrData const&, ScTypedStrData const&) const (this=0x7f2c471eab20, left=..., right=...) at /home/sbergman/lo/core/sc/source/core/tool/typedstrdata.cxx:26
> #18 0x00007f2c13ad7750 in std::sort<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScTypedStrData*, std::__cxx1998::vector<ScTypedStrData, std::allocator<ScTypedStrData> > >, std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >, std::random_access_iterator_tag>, ScTypedStrData::LessCaseSensitive>(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScTypedStrData*, std::__cxx1998::vector<ScTypedStrData, std::allocator<ScTypedStrData> > >, std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScTypedStrData*, std::__cxx1998::vector<ScTypedStrData, std::allocator<ScTypedStrData> > >, std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >, std::random_access_iterator_tag>, ScTypedStrData::LessCaseSensitive) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/stl_algo.h:4873
> #19 0x00007f2c13ab544d in (anonymous namespace)::sortAndRemoveDuplicates(std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >&, bool) (rStrings=std::__debug::vector of length 1, capacity 1 = {...}, bCaseSens=true) at /home/sbergman/lo/core/sc/source/core/data/documen3.cxx:86
> #20 0x00007f2c13ab6bc9 in ScDocument::GetDataEntries(short, int, short, std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >&, bool) (this=0x61e0000505c0, nCol=0, nRow=1, nTab=0, rStrings=std::__debug::vector of length 1, capacity 1 = {...}, bValidation=false) at /home/sbergman/lo/core/sc/source/core/data/documen3.cxx:1650
> #21 0x00007f2c1708a56e in ScInputHandler::GetColData() (this=0x614000068840) at /home/sbergman/lo/core/sc/source/ui/app/inputhdl.cxx:1943
> #22 0x00007f2c1709e132 in ScInputHandler::StartTable(char16_t, bool, bool, ScEditEngineDefaulter*) (this=0x614000068840, cTyped=66 u'B', bFromCommand=false, bInputActivated=false, pTopEngine=0x0) at /home/sbergman/lo/core/sc/source/ui/app/inputhdl.cxx:2501
> #23 0x00007f2c17057bc0 in ScInputHandler::DataChanging(char16_t, bool) (this=0x614000068840, cTyped=66 u'B', bFromCommand=false) at /home/sbergman/lo/core/sc/source/ui/app/inputhdl.cxx:2605
> #24 0x00007f2c170ad948 in ScInputHandler::KeyInput(KeyEvent const&, bool) (this=0x614000068840, rKEvt=..., bStartEdit=true) at /home/sbergman/lo/core/sc/source/ui/app/inputhdl.cxx:3714
> #25 0x00007f2c1723ac2b in ScModule::InputKeyEvent(KeyEvent const&, bool) (this=0x616000223880, rKEvt=..., bStartEdit=true) at /home/sbergman/lo/core/sc/source/ui/app/scmod.cxx:1356
> #26 0x00007f2c19ce48c9 in ScTabViewShell::TabKeyInput(KeyEvent const&) (this=0x61e000051080, rKEvt=...) at /home/sbergman/lo/core/sc/source/ui/view/tabvwsh4.cxx:1278
> #27 0x00007f2c196183ce in ScGridWindow::KeyInput(KeyEvent const&) (this=0x618000ee6880, rKEvt=...) at /home/sbergman/lo/core/sc/source/ui/view/gridwin.cxx:3414
> #28 0x00007f2c775e963f in WindowUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at /home/sbergman/lo/core/vcl/source/uitest/uiobject.cxx:357
> #29 0x00007f2c186a5929 in ScGridWinUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at /home/sbergman/lo/core/sc/source/ui/uitest/uiobject.cxx:317
> #30 0x00007f2c7766d9ba in UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0::operator()() const (this=0x603000f61240) at /home/sbergman/lo/core/vcl/source/uitest/uno/uiobject_uno.cxx:137
> #31 0x00007f2c7766d0dd in std::__invoke_impl<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(std::__invoke_other, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) (__f=...) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/invoke.h:61
> #32 0x00007f2c7766cf8d in std::__invoke_r<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) (__fn=...) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/invoke.h:111
> #33 0x00007f2c7766ca9d in std::_Function_handler<void (), UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0>::_M_invoke(std::_Any_data const&) (__functor=...) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_function.h:291
> #34 0x00007f2c744b3c22 in std::function<void ()>::operator()() const (this=0x6070001d4d80) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_function.h:560
> #35 0x00007f2c7766c35c in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) (this=0x6070001d4d80) at /home/sbergman/lo/core/vcl/source/uitest/uno/uiobject_uno.cxx:100
> #36 0x00007f2c77668e29 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) (instance=0x6070001d4d80, data=0x608000148e20) at /home/sbergman/lo/core/vcl/source/uitest/uno/uiobject_uno.cxx:95
> #37 0x00007f2c76c645de in Link<Timer*, void>::Call(Timer*) const (this=0x608000148e40, data=0x608000148e20) at /home/sbergman/lo/core/include/tools/link.hxx:111
> #38 0x00007f2c76c63b7d in Timer::Invoke() (this=0x608000148e20) at /home/sbergman/lo/core/vcl/source/app/timer.cxx:75
> #39 0x00007f2c76abfd6c in Scheduler::CallbackTaskScheduling() () at /home/sbergman/lo/core/vcl/source/app/scheduler.cxx:471
> #40 0x00007f2c77b9a1a4 in SalTimer::CallCallback() (this=0x6030002f0bc0) at /home/sbergman/lo/core/vcl/inc/saltimer.hxx:54
> #41 0x00007f2c77b8dda1 in SvpSalInstance::CheckTimeout(bool) (this=0x611000001bc0, bExecuteTimers=true) at /home/sbergman/lo/core/vcl/headless/svpinst.cxx:215
> #42 0x00007f2c77b949a0 in SvpSalInstance::DoYield(bool, bool) (this=0x611000001bc0, bWait=true, bHandleAllCurrentEvents=false) at /home/sbergman/lo/core/vcl/headless/svpinst.cxx:460
> #43 0x00007f2c76bb2462 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at /home/sbergman/lo/core/vcl/source/app/svapp.cxx:465
> #44 0x00007f2c76bb1588 in Application::Yield() () at /home/sbergman/lo/core/vcl/source/app/svapp.cxx:532
> #45 0x00007f2c76bb11bf in Application::Execute() () at /home/sbergman/lo/core/vcl/source/app/svapp.cxx:444
> #46 0x00007f2caae21016 in desktop::Desktop::Main() (this=0x7f2c472b8080) at /home/sbergman/lo/core/desktop/source/app/app.cxx:1602

having locked the osl global mutex in comphelper::doubleCheckedInit in frame 15
and trying to lock the cppu::getTypeEntries mutex, while thread 4 at

> Thread 4 (Thread 0x7f2c275b6640 (LWP 440147) "InitUpdateCheck"):
> #0  0x00007f2caa2b17b0 in __lll_lock_wait () at /lib64/libpthread.so.0
> #1  0x00007f2caa2aa5d0 in pthread_mutex_lock () at /lib64/libpthread.so.0
> #2  0x00007f2cabc21967 in osl_acquireMutex(oslMutex) (pMutex=0x604000090d50) at /home/sbergman/lo/core/sal/osl/unx/mutex.cxx:100
> #3  0x00007f2bf58684da in osl::Mutex::acquire() (this=0x7f2cabe45c60 <osl_getGlobalMutex::g_Mutex>) at /home/sbergman/lo/core/include/osl/mutex.hxx:61
> #4  0x00007f2bf586694a in osl::Guard<osl::Mutex>::Guard(osl::Mutex*) (this=0x7f2c262d7420, pT_=0x7f2cabe45c60 <osl_getGlobalMutex::g_Mutex>) at /home/sbergman/lo/core/include/osl/mutex.hxx:135
> #5  0x00007f2bf58762f9 in com::sun::star::lang::cppu_detail_getUnoType(com::sun::star::lang::XServiceInfo const*) () at /home/sbergman/lo/core/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XServiceInfo.hpp:73
> #6  0x00007f2bf5875f09 in cppu::UnoType<com::sun::star::lang::XServiceInfo>::get() () at /home/sbergman/lo/core/include/cppu/unotype.hxx:300
> #7  0x00007f2bf5875ce9 in com::sun::star::lang::XServiceInfo::static_type(void*) () at /home/sbergman/lo/core/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XServiceInfo.hpp:145
> #8  0x00007f2ca39913be in cppu::getTypeEntries(cppu::class_data*) (cd=0x7f2bf58c73a8 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>, com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:78
> #9  0x00007f2ca398c616 in cppu::queryDeepNoXInterface(_typelib_TypeDescriptionReference const*, cppu::class_data*, void*) (pDemandedTDR=0x60f0001cf420, cd=0x7f2bf58c73a8 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>, com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>, that=0x60e00022e7c0) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:155
> #10 0x00007f2ca398ea93 in cppu::WeakImplHelper_query(com::sun::star::uno::Type const&, cppu::class_data*, void*, cppu::OWeakObject*) (rType=invalid uno::Type, cd=0x7f2bf58c73a8 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>, com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>, that=0x60e00022e7c0, pBase=0x60e00022e7c0) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:283
> #11 0x00007f2bf58629e5 in cppu::WeakImplHelper<com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>::queryInterface(com::sun::star::uno::Type const&) (this=0x60e00022e7c0, aType=invalid uno::Type) at /home/sbergman/lo/core/include/cppuhelper/implbase.hxx:111
> #12 0x00007f2c3015cf60 in com::sun::star::uno::BaseReference::iquery(com::sun::star::uno::XInterface*, com::sun::star::uno::Type const&) (pInterface=0x60e00022e7c0, rType=invalid uno::Type) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:59
> #13 0x00007f2c302419c5 in com::sun::star::uno::Reference<com::sun::star::deployment::XUpdateInformationProvider>::iquery(com::sun::star::uno::XInterface*) (pInterface=0x60e00022e7c0) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:74
> #14 0x00007f2c3024010e in com::sun::star::uno::Reference<com::sun::star::deployment::XUpdateInformationProvider>::Reference(com::sun::star::uno::BaseReference const&, com::sun::star::uno::UnoReference_Query) (this=0x7f2c262bd420, rRef=...) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:176
> #15 0x00007f2c3023e98a in com::sun::star::deployment::UpdateInformationProvider::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (the_context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/deployment/UpdateInformationProvider.hpp:38
> #16 0x00007f2c30235e85 in dp_info::(anonymous namespace)::PackageInformationProvider::PackageInformationProvider(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x607000afd3e0, xContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/desktop/source/deployment/manager/dp_informationprovider.cxx:92
> #17 0x00007f2c30235932 in com_sun_star_comp_deployment_PackageInformationProvider_get_implementation(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (context=0x611000005e50) at /home/sbergman/lo/core/desktop/source/deployment/manager/dp_informationprovider.cxx:336
> #18 0x00007f2ca3c92795 in std::__invoke_impl<com::sun::star::uno::XInterface*, com::sun::star::uno::XInterface* (*&)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&>(std::__invoke_other, com::sun::star::uno::XInterface* (*&)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XComponentContext*&&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (__f=@0x612000035088: 0x7f2c302357f0 <com_sun_star_comp_deployment_PackageInformationProvider_get_implementation(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>, __args=@0x7f2c25ecd960: 0x611000005e50, __args=empty uno::Sequence) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/invoke.h:61
> #19 0x00007f2ca3c9248d in std::__invoke_r<com::sun::star::uno::XInterface*, com::sun::star::uno::XInterface* (*&)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&>(com::sun::star::uno::XInterface* (*&)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XComponentContext*&&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (__fn=@0x612000035088: 0x7f2c302357f0 <com_sun_star_comp_deployment_PackageInformationProvider_get_implementation(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>, __args=@0x7f2c25ecd960: 0x611000005e50, __args=empty uno::Sequence) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/invoke.h:114
> #20 0x00007f2ca3c91ebd in std::_Function_handler<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XInterface* (*)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::_M_invoke(std::_Any_data const&, com::sun::star::uno::XComponentContext*&&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (__functor=..., __args=@0x7f2c25ecd960: 0x611000005e50, __args=empty uno::Sequence) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_function.h:291
> #21 0x00007f2ca3b7d419 in std::function<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) const (this=0x612000035088, __args=0x611000005e50, __args=empty uno::Sequence) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_function.h:560
> #22 0x00007f2ca3b30861 in cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x612000034fd0, context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/cppuhelper/source/servicemanager.cxx:703
> #23 0x00007f2ca3b30394 in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool) (this=0x612000034fd0, context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50, singletonRequest=true) at /home/sbergman/lo/core/cppuhelper/source/servicemanager.cxx:672
> #24 0x00007f2ca3b6bb9c in (anonymous namespace)::SingletonFactory::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x60700003a4e0, Context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/cppuhelper/source/servicemanager.cxx:532
> #25 0x00007f2ca3b6c0af in non-virtual thunk to (anonymous namespace)::SingletonFactory::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) () at /home/sbergman/lo/core/cppuhelper/source/servicemanager.cxx:541
> #26 0x00007f2ca38c5545 in cppu::(anonymous namespace)::ComponentContext::lookupMap(rtl::OUString const&) (this=0x611000005e00, rName="/singletons/com.sun.star.deployment.PackageInformationProvider") at /home/sbergman/lo/core/cppuhelper/source/component_context.cxx:300
> #27 0x00007f2ca38ae9ab in cppu::(anonymous namespace)::ComponentContext::getValueByName(rtl::OUString const&) (this=0x611000005e00, rName="/singletons/com.sun.star.deployment.PackageInformationProvider") at /home/sbergman/lo/core/cppuhelper/source/component_context.cxx:374
> #28 0x00007f2ca38b279f in non-virtual thunk to cppu::(anonymous namespace)::ComponentContext::getValueByName(rtl::OUString const&) () at /home/sbergman/lo/core/cppuhelper/source/component_context.cxx:266
> #29 0x00007f2c2791c7e0 in checkForPendingUpdates(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (rxContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/extensions/source/update/check/updateprotocol.cxx:289
> #30 0x00007f2c277d3db3 in UpdateCheck::initialize(com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x6130001c9dc0, rValues=uno::Sequence of length 8 = {...}, xContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/extensions/source/update/check/updatecheck.cxx:776
> #31 0x00007f2c278acd2a in (anonymous namespace)::InitUpdateCheckJobThread::run() (this=0x608000163d20) at /home/sbergman/lo/core/extensions/source/update/check/updatecheckjob.cxx:143

having locked the cppu::getTypeEntries mutex in frame 1 and now trying to lock
the osl global mutex.

Of the many functions in sc/source/core/data/global.cxx that (implicitly, by
default) use the osl global mutex in comphelper::doubleCheckedInit, change at
least those two that call a CollatorWrapper (and are thus susceptible to the
described deadlock).

Change-Id: Ie41a1116518146bffcefab2373f1386afc03e544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119319
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tdf-gerrit pushed a commit that referenced this pull request Jan 10, 2025
...when generating Python/deepfreeze/deepfreeze.c during the build of
ExternalProject_python3 after 5052448 "Python:
upgrade to 3.11.11 (master only)",

> Objects/dictobject.c:1500:40: runtime error: load of misaligned address 0x555853494d81 for type 'PyDictUnicodeEntry *', which requires 8 byte alignment
> 0x555853494d81: note: pointer points here
>  00 00 00  ff ff ff ff ff ff ff ff  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00
>               ^
>  #0 in dictresize at workdir/UnpackedTarball/python3/Objects/dictobject.c:1500:21
>  #1 in dict_merge at workdir/UnpackedTarball/python3/Objects/dictobject.c:2880:17
>  #2 in _PyDict_MergeEx at workdir/UnpackedTarball/python3/Objects/dictobject.c:3003:12
>  #3 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:3432:17
>  #4 in _PyEval_EvalFrame at workdir/UnpackedTarball/python3/./Include/internal/pycore_ceval.h:73:16
>  #5 in _PyEval_Vector at workdir/UnpackedTarball/python3/Python/ceval.c:6434:24
>  #6 in _PyFunction_Vectorcall at workdir/UnpackedTarball/python3/Objects/call.c:393:16
>  #7 in _PyObject_FastCallDictTstate at workdir/UnpackedTarball/python3/Objects/call.c:141:15
>  #8 in _PyObject_Call_Prepend at workdir/UnpackedTarball/python3/Objects/call.c:482:24
>  #9 in slot_tp_init at workdir/UnpackedTarball/python3/Objects/typeobject.c:7855:15
>  #10 in type_call at workdir/UnpackedTarball/python3/Objects/typeobject.c:1103:19
>  #11 in _PyObject_MakeTpCall at workdir/UnpackedTarball/python3/Objects/call.c:214:18
>  #12 in _PyObject_VectorcallTstate at workdir/UnpackedTarball/python3/./Include/internal/pycore_call.h:90:16
>  #13 in PyObject_Vectorcall at workdir/UnpackedTarball/python3/Objects/call.c:299:12
>  #14 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:4769:23
>  #15 in _PyEval_EvalFrame at workdir/UnpackedTarball/python3/./Include/internal/pycore_ceval.h:73:16
>  #16 in _PyEval_Vector at workdir/UnpackedTarball/python3/Python/ceval.c:6434:24
>  #17 in PyEval_EvalCode at workdir/UnpackedTarball/python3/Python/ceval.c:1148:21
>  #18 in run_eval_code_obj at workdir/UnpackedTarball/python3/Python/pythonrun.c:1741:9
>  #19 in run_mod at workdir/UnpackedTarball/python3/Python/pythonrun.c:1762:19
>  #20 in pyrun_file at workdir/UnpackedTarball/python3/Python/pythonrun.c:1657:15
>  #21 in _PyRun_SimpleFileObject at workdir/UnpackedTarball/python3/Python/pythonrun.c:440:13
>  #22 in _PyRun_AnyFileObject at workdir/UnpackedTarball/python3/Python/pythonrun.c:79:15
>  #23 in pymain_run_file_obj at workdir/UnpackedTarball/python3/Modules/main.c:360:15
>  #24 in pymain_run_file at workdir/UnpackedTarball/python3/Modules/main.c:379:15
>  #25 in pymain_run_python at workdir/UnpackedTarball/python3/Modules/main.c:605:21
>  #26 in Py_RunMain at workdir/UnpackedTarball/python3/Modules/main.c:684:5
>  #27 in main at workdir/UnpackedTarball/python3/Programs/_bootstrap_python.c:109:12

Change-Id: I0bacef11b5874bca6104516a206076a0505528ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180037
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
tdf-gerrit pushed a commit that referenced this pull request Jan 12, 2025
maybe since:

commit 8cb4db9
CommitDate: Wed Aug 31 08:29:49 2022 +0200

    tdf#30731: Improve caret travelling in Writer

 #3  0x00007ffff74dabf0 in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () at /lib64/libstdc++.so.6
 #4  0x00007fffce3e97b3 in std::clamp<int> (__val=@0x7ffffffe52b4: 1897, __lo=@0x7ffffffe51f0: 1900, __hi=@0x7ffffffe51e8: 1897)
     at /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/stl_algo.h:3625
 #5  0x00007fffce3e41ff in GetTextArray
     (rDevice=..., rStr='x' <repeats 200 times>..., rDXAry=std::__debug::vector of length 0, capacity 0, nIndex=1875, nLen=25, nLayoutContext=std::optional = {...}, nMaxAscent=0x7ffffffe5680, nMaxDescent=0x7ffffffe5678, bCaret=true, layoutCache=0x0) at core/sw/source/core/txtnode/fntcache.cxx:763
 #6  0x00007fffce3e2a47 in SwFntObj::GetTextSize (this=0x6134340, rInf=...) at core/sw/source/core/txtnode/fntcache.cxx:1734
 #7  0x00007fffce461147 in SwSubFont::GetTextSize_ (this=0x6281450, rInf=...) at core/sw/source/core/txtnode/swfont.cxx:1039
 #8  0x00007fffce1f953c in SwFont::GetTextSize_ (this=0x6281450, rInf=...) at sw/source/core/inc/swfont.hxx:321
 #9  0x00007fffce2234e2 in SwTextSizeInfo::GetTextSize (this=0x7ffffffe6b80, nLayoutContext=std::optional = {...}) at core/sw/source/core/text/inftxt.cxx:439
 #10 0x00007fffce2f2217 in SwTextPortion::GetTextSize (this=0x62a3d40, rInf=...) at core/sw/source/core/text/portxt.cxx:586
 #11 0x00007fffce250b8c in SwTextCursor::GetCharRect_ (this=0x7ffffffe6fc8, pOrig=0x7ffffffe81c8, nOfst=..., pCMS=0x7ffffffe6e20) at core/sw/source/core/text/itrcrsr.cxx:956
 #12 0x00007fffce24d978 in SwTextCursor::GetCharRect (this=0x7ffffffe6fc8, pOrig=0x7ffffffe81c8, nOfst=..., pCMS=0x7ffffffe6e20, nMax=20604)
     at core/sw/source/core/text/itrcrsr.cxx:1281
 #13 0x00007fffce1f08c1 in SwTextFrame::GetAutoPos (this=0x6259250, rOrig=SwRect = {...}, rPos=SwPosition (node 28, offset 1897)) at core/sw/source/core/text/frmcrsr.cxx:430

Change-Id: I8230c9cbb99126b513bea38517b1dbfac5a50f4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180131
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
tdf-gerrit pushed a commit that referenced this pull request Jan 13, 2025
maybe since:

commit 8cb4db9
CommitDate: Wed Aug 31 08:29:49 2022 +0200

    tdf#30731: Improve caret travelling in Writer

 #3  0x00007ffff74dabf0 in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () at /lib64/libstdc++.so.6
 #4  0x00007fffce3e97b3 in std::clamp<int> (__val=@0x7ffffffe52b4: 1897, __lo=@0x7ffffffe51f0: 1900, __hi=@0x7ffffffe51e8: 1897)
     at /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/stl_algo.h:3625
 #5  0x00007fffce3e41ff in GetTextArray
     (rDevice=..., rStr='x' <repeats 200 times>..., rDXAry=std::__debug::vector of length 0, capacity 0, nIndex=1875, nLen=25, nLayoutContext=std::optional = {...}, nMaxAscent=0x7ffffffe5680, nMaxDescent=0x7ffffffe5678, bCaret=true, layoutCache=0x0) at core/sw/source/core/txtnode/fntcache.cxx:763
 #6  0x00007fffce3e2a47 in SwFntObj::GetTextSize (this=0x6134340, rInf=...) at core/sw/source/core/txtnode/fntcache.cxx:1734
 #7  0x00007fffce461147 in SwSubFont::GetTextSize_ (this=0x6281450, rInf=...) at core/sw/source/core/txtnode/swfont.cxx:1039
 #8  0x00007fffce1f953c in SwFont::GetTextSize_ (this=0x6281450, rInf=...) at sw/source/core/inc/swfont.hxx:321
 #9  0x00007fffce2234e2 in SwTextSizeInfo::GetTextSize (this=0x7ffffffe6b80, nLayoutContext=std::optional = {...}) at core/sw/source/core/text/inftxt.cxx:439
 #10 0x00007fffce2f2217 in SwTextPortion::GetTextSize (this=0x62a3d40, rInf=...) at core/sw/source/core/text/portxt.cxx:586
 #11 0x00007fffce250b8c in SwTextCursor::GetCharRect_ (this=0x7ffffffe6fc8, pOrig=0x7ffffffe81c8, nOfst=..., pCMS=0x7ffffffe6e20) at core/sw/source/core/text/itrcrsr.cxx:956
 #12 0x00007fffce24d978 in SwTextCursor::GetCharRect (this=0x7ffffffe6fc8, pOrig=0x7ffffffe81c8, nOfst=..., pCMS=0x7ffffffe6e20, nMax=20604)
     at core/sw/source/core/text/itrcrsr.cxx:1281
 #13 0x00007fffce1f08c1 in SwTextFrame::GetAutoPos (this=0x6259250, rOrig=SwRect = {...}, rPos=SwPosition (node 28, offset 1897)) at core/sw/source/core/text/frmcrsr.cxx:430

Change-Id: I8230c9cbb99126b513bea38517b1dbfac5a50f4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180131
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 029540b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180158
tdf-gerrit pushed a commit that referenced this pull request Jan 14, 2025
When using the qt6 vcl plugin with the Orca screen reader
running, selecting text in Writer resulted in a crash
due to an IndexOutOfBoundsException being thrown.

Backtrace:

    Thread 1 received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (rr) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f889b09ddef in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007f889b049d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f889b0324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f889aca1a3d in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00007f889acb300a in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #6  0x00007f889aca15e9 in std::terminate() () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #7  0x00007f889acb3288 in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #8  0x00007f8862346900 in SwAccessibleSelectionHelper::throwIndexOutOfBoundsException (this=0x561f2f8d1910) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:72
    #9  0x00007f8862347df8 in SwAccessibleSelectionHelper::getSelectedAccessibleChild (this=0x561f2f8d1910, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:283
    #10 0x00007f8862298e6f in SwAccessibleDocument::getSelectedAccessibleChild (this=0x561f2f8d1800, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accdoc.cxx:467
    #11 0x00007f8862298eaf in non-virtual thunk to SwAccessibleDocument::getSelectedAccessibleChild(long) () at .../libreoffice/sw/source/core/access/accdoc.cxx:467
    #12 0x00007f88878c6200 in QtAccessibleWidget::selectedItem (this=0x7f887c014ac0, nSelectionIndex=0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:1861
    #13 0x00007f8885f08ba0 in AtSpiAdaptor::selectionInterface (this=0x561f2b8a7070, interface=0x7f887c014ac0, function=..., message=..., connection=...)
        at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:2596
    #14 0x00007f8885f03ce1 in AtSpiAdaptor::handleMessage (this=0x561f2b8a7070, message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1479
    #15 0x00007f888366d217 in QDBusConnectionPrivate::activateObject (this=0x7f887c00a390, node=..., msg=..., pathStartPos=27) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1448
    #16 0x00007f888366e1d0 in QDBusActivateObjectEvent::placeMetaCall (this=0x7f887c03aca0) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1604
    #17 0x00007f8886b09bb1 in QObject::event (this=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:1431
    #18 0x00007f88849e2dd0 in QApplicationPrivate::notify_helper (this=0x561f2a554ae0, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #19 0x00007f88849e6ced in QApplication::notify (this=0x561f2a541420, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #20 0x00007f8886a481b9 in QCoreApplication::notifyInternal2 (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1118
    #21 0x00007f8886a48e29 in QCoreApplication::sendEvent (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1558
    #22 0x00007f8886a49d68 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x561f2a56fee0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1898
    #23 0x00007f8886a48c6c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1752
    #24 0x00007f88870377b1 in postEventSourceDispatch (s=0x561f2a5cce80) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #25 0x00007f888d50b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #26 0x00007f888d50da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #27 0x00007f888d50e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #28 0x00007f88870369eb in QEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #29 0x00007f8886164858 in QPAEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #30 0x00007f888796a492 in QtInstance::ImplYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464
    #31 0x00007f888796d511 in QtInstance::DoYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475
    #32 0x00007f88924bd626 in ImplYield (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:385
    #33 0x00007f88924bcf3f in Application::Yield () at .../libreoffice/vcl/source/app/svapp.cxx:488
    #34 0x00007f88924bcd20 in Application::Execute () at .../libreoffice/vcl/source/app/svapp.cxx:360
    #35 0x00007f889b327b89 in desktop::Desktop::Main (this=0x7ffcd9ea1c00) at .../libreoffice/desktop/source/app/app.cxx:1679
    #36 0x00007f88924deaa6 in ImplSVMain () at .../libreoffice/vcl/source/app/svmain.cxx:230
    #37 0x00007f88924e0699 in SVMain () at .../libreoffice/vcl/source/app/svmain.cxx:248
    #38 0x00007f889b3a146a in soffice_main () at .../libreoffice/desktop/source/app/sofficemain.cxx:121
    #39 0x0000561ef2802a6d in sal_main () at .../libreoffice/desktop/source/app/main.c:51
    #40 0x0000561ef2802a47 in main (argc=2, argv=0x7ffcd9ea1e08) at .../libreoffice/desktop/source/app/main.c:49

While QtAccessibleWidget::selectedItem already returns early
if the passed selection index is too large according to what
XAccessibleSelection::getSelectedAccessibleChildCount()
returns, this is not enough because Writer's SwAccessibleSelectionHelper
has an inconsistent/broken implementation:

SwAccessibleSelectionHelper::getSelectedAccessibleChildCount
returns the count of paragraphs that are (partially) selected
by the text cursor if no other objects are selected.
However, SwAccessibleSelectionHelper::getSelectedAccessibleChild
doesn't take these into account and therefore throws the
IndexOutOfBoundsException when called with any index.

Temporarily (in particular for backporting to release branches),
handle the exception in QtAccessibleWidget::selectedItem like
other a11y bridges do (see e.g. `selection_ref_selection`
for the gtk3 VCL plugin) to avoid the crash.

The underlying Writer issue described above will be fixed in a
separate commit (and for master only).

Change-Id: I874ad4a7a9faf79492967c943517d83df5f47e75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180228
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Jan 16, 2025
When using the qt6 vcl plugin with the Orca screen reader
running, selecting text in Writer resulted in a crash
due to an IndexOutOfBoundsException being thrown.

Backtrace:

    Thread 1 received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (rr) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f889b09ddef in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007f889b049d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f889b0324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f889aca1a3d in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00007f889acb300a in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #6  0x00007f889aca15e9 in std::terminate() () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #7  0x00007f889acb3288 in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #8  0x00007f8862346900 in SwAccessibleSelectionHelper::throwIndexOutOfBoundsException (this=0x561f2f8d1910) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:72
    #9  0x00007f8862347df8 in SwAccessibleSelectionHelper::getSelectedAccessibleChild (this=0x561f2f8d1910, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:283
    #10 0x00007f8862298e6f in SwAccessibleDocument::getSelectedAccessibleChild (this=0x561f2f8d1800, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accdoc.cxx:467
    #11 0x00007f8862298eaf in non-virtual thunk to SwAccessibleDocument::getSelectedAccessibleChild(long) () at .../libreoffice/sw/source/core/access/accdoc.cxx:467
    #12 0x00007f88878c6200 in QtAccessibleWidget::selectedItem (this=0x7f887c014ac0, nSelectionIndex=0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:1861
    #13 0x00007f8885f08ba0 in AtSpiAdaptor::selectionInterface (this=0x561f2b8a7070, interface=0x7f887c014ac0, function=..., message=..., connection=...)
        at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:2596
    #14 0x00007f8885f03ce1 in AtSpiAdaptor::handleMessage (this=0x561f2b8a7070, message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1479
    #15 0x00007f888366d217 in QDBusConnectionPrivate::activateObject (this=0x7f887c00a390, node=..., msg=..., pathStartPos=27) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1448
    #16 0x00007f888366e1d0 in QDBusActivateObjectEvent::placeMetaCall (this=0x7f887c03aca0) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1604
    #17 0x00007f8886b09bb1 in QObject::event (this=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:1431
    #18 0x00007f88849e2dd0 in QApplicationPrivate::notify_helper (this=0x561f2a554ae0, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #19 0x00007f88849e6ced in QApplication::notify (this=0x561f2a541420, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #20 0x00007f8886a481b9 in QCoreApplication::notifyInternal2 (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1118
    #21 0x00007f8886a48e29 in QCoreApplication::sendEvent (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1558
    #22 0x00007f8886a49d68 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x561f2a56fee0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1898
    #23 0x00007f8886a48c6c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1752
    #24 0x00007f88870377b1 in postEventSourceDispatch (s=0x561f2a5cce80) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #25 0x00007f888d50b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #26 0x00007f888d50da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #27 0x00007f888d50e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #28 0x00007f88870369eb in QEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #29 0x00007f8886164858 in QPAEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #30 0x00007f888796a492 in QtInstance::ImplYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464
    #31 0x00007f888796d511 in QtInstance::DoYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475
    #32 0x00007f88924bd626 in ImplYield (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:385
    #33 0x00007f88924bcf3f in Application::Yield () at .../libreoffice/vcl/source/app/svapp.cxx:488
    #34 0x00007f88924bcd20 in Application::Execute () at .../libreoffice/vcl/source/app/svapp.cxx:360
    #35 0x00007f889b327b89 in desktop::Desktop::Main (this=0x7ffcd9ea1c00) at .../libreoffice/desktop/source/app/app.cxx:1679
    #36 0x00007f88924deaa6 in ImplSVMain () at .../libreoffice/vcl/source/app/svmain.cxx:230
    #37 0x00007f88924e0699 in SVMain () at .../libreoffice/vcl/source/app/svmain.cxx:248
    #38 0x00007f889b3a146a in soffice_main () at .../libreoffice/desktop/source/app/sofficemain.cxx:121
    #39 0x0000561ef2802a6d in sal_main () at .../libreoffice/desktop/source/app/main.c:51
    #40 0x0000561ef2802a47 in main (argc=2, argv=0x7ffcd9ea1e08) at .../libreoffice/desktop/source/app/main.c:49

While QtAccessibleWidget::selectedItem already returns early
if the passed selection index is too large according to what
XAccessibleSelection::getSelectedAccessibleChildCount()
returns, this is not enough because Writer's SwAccessibleSelectionHelper
has an inconsistent/broken implementation:

SwAccessibleSelectionHelper::getSelectedAccessibleChildCount
returns the count of paragraphs that are (partially) selected
by the text cursor if no other objects are selected.
However, SwAccessibleSelectionHelper::getSelectedAccessibleChild
doesn't take these into account and therefore throws the
IndexOutOfBoundsException when called with any index.

Temporarily (in particular for backporting to release branches),
handle the exception in QtAccessibleWidget::selectedItem like
other a11y bridges do (see e.g. `selection_ref_selection`
for the gtk3 VCL plugin) to avoid the crash.

The underlying Writer issue described above will be fixed in a
separate commit (and for master only).

Change-Id: I874ad4a7a9faf79492967c943517d83df5f47e75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180228
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 3eaa35e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180241
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
tdf-gerrit pushed a commit that referenced this pull request Jan 22, 2025
When using the qt6 vcl plugin with the Orca screen reader
running, selecting text in Writer resulted in a crash
due to an IndexOutOfBoundsException being thrown.

Backtrace:

    Thread 1 received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (rr) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f889b09ddef in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007f889b049d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f889b0324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f889aca1a3d in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00007f889acb300a in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #6  0x00007f889aca15e9 in std::terminate() () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #7  0x00007f889acb3288 in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #8  0x00007f8862346900 in SwAccessibleSelectionHelper::throwIndexOutOfBoundsException (this=0x561f2f8d1910) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:72
    #9  0x00007f8862347df8 in SwAccessibleSelectionHelper::getSelectedAccessibleChild (this=0x561f2f8d1910, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:283
    #10 0x00007f8862298e6f in SwAccessibleDocument::getSelectedAccessibleChild (this=0x561f2f8d1800, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accdoc.cxx:467
    #11 0x00007f8862298eaf in non-virtual thunk to SwAccessibleDocument::getSelectedAccessibleChild(long) () at .../libreoffice/sw/source/core/access/accdoc.cxx:467
    #12 0x00007f88878c6200 in QtAccessibleWidget::selectedItem (this=0x7f887c014ac0, nSelectionIndex=0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:1861
    #13 0x00007f8885f08ba0 in AtSpiAdaptor::selectionInterface (this=0x561f2b8a7070, interface=0x7f887c014ac0, function=..., message=..., connection=...)
        at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:2596
    #14 0x00007f8885f03ce1 in AtSpiAdaptor::handleMessage (this=0x561f2b8a7070, message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1479
    #15 0x00007f888366d217 in QDBusConnectionPrivate::activateObject (this=0x7f887c00a390, node=..., msg=..., pathStartPos=27) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1448
    #16 0x00007f888366e1d0 in QDBusActivateObjectEvent::placeMetaCall (this=0x7f887c03aca0) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1604
    #17 0x00007f8886b09bb1 in QObject::event (this=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:1431
    #18 0x00007f88849e2dd0 in QApplicationPrivate::notify_helper (this=0x561f2a554ae0, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #19 0x00007f88849e6ced in QApplication::notify (this=0x561f2a541420, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #20 0x00007f8886a481b9 in QCoreApplication::notifyInternal2 (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1118
    #21 0x00007f8886a48e29 in QCoreApplication::sendEvent (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1558
    #22 0x00007f8886a49d68 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x561f2a56fee0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1898
    #23 0x00007f8886a48c6c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1752
    #24 0x00007f88870377b1 in postEventSourceDispatch (s=0x561f2a5cce80) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #25 0x00007f888d50b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #26 0x00007f888d50da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #27 0x00007f888d50e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #28 0x00007f88870369eb in QEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #29 0x00007f8886164858 in QPAEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #30 0x00007f888796a492 in QtInstance::ImplYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464
    #31 0x00007f888796d511 in QtInstance::DoYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475
    #32 0x00007f88924bd626 in ImplYield (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:385
    #33 0x00007f88924bcf3f in Application::Yield () at .../libreoffice/vcl/source/app/svapp.cxx:488
    #34 0x00007f88924bcd20 in Application::Execute () at .../libreoffice/vcl/source/app/svapp.cxx:360
    #35 0x00007f889b327b89 in desktop::Desktop::Main (this=0x7ffcd9ea1c00) at .../libreoffice/desktop/source/app/app.cxx:1679
    #36 0x00007f88924deaa6 in ImplSVMain () at .../libreoffice/vcl/source/app/svmain.cxx:230
    #37 0x00007f88924e0699 in SVMain () at .../libreoffice/vcl/source/app/svmain.cxx:248
    #38 0x00007f889b3a146a in soffice_main () at .../libreoffice/desktop/source/app/sofficemain.cxx:121
    #39 0x0000561ef2802a6d in sal_main () at .../libreoffice/desktop/source/app/main.c:51
    #40 0x0000561ef2802a47 in main (argc=2, argv=0x7ffcd9ea1e08) at .../libreoffice/desktop/source/app/main.c:49

While QtAccessibleWidget::selectedItem already returns early
if the passed selection index is too large according to what
XAccessibleSelection::getSelectedAccessibleChildCount()
returns, this is not enough because Writer's SwAccessibleSelectionHelper
has an inconsistent/broken implementation:

SwAccessibleSelectionHelper::getSelectedAccessibleChildCount
returns the count of paragraphs that are (partially) selected
by the text cursor if no other objects are selected.
However, SwAccessibleSelectionHelper::getSelectedAccessibleChild
doesn't take these into account and therefore throws the
IndexOutOfBoundsException when called with any index.

Temporarily (in particular for backporting to release branches),
handle the exception in QtAccessibleWidget::selectedItem like
other a11y bridges do (see e.g. `selection_ref_selection`
for the gtk3 VCL plugin) to avoid the crash.

The underlying Writer issue described above will be fixed in a
separate commit (and for master only).

Change-Id: I874ad4a7a9faf79492967c943517d83df5f47e75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180228
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 3eaa35e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180240
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
tdf-gerrit pushed a commit that referenced this pull request Jan 23, 2025
When using the qt6 vcl plugin with the Orca screen reader
running, selecting text in Writer resulted in a crash
due to an IndexOutOfBoundsException being thrown.

Backtrace:

    Thread 1 received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (rr) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f889b09ddef in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007f889b049d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f889b0324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f889aca1a3d in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00007f889acb300a in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #6  0x00007f889aca15e9 in std::terminate() () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #7  0x00007f889acb3288 in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #8  0x00007f8862346900 in SwAccessibleSelectionHelper::throwIndexOutOfBoundsException (this=0x561f2f8d1910) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:72
    #9  0x00007f8862347df8 in SwAccessibleSelectionHelper::getSelectedAccessibleChild (this=0x561f2f8d1910, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:283
    #10 0x00007f8862298e6f in SwAccessibleDocument::getSelectedAccessibleChild (this=0x561f2f8d1800, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accdoc.cxx:467
    #11 0x00007f8862298eaf in non-virtual thunk to SwAccessibleDocument::getSelectedAccessibleChild(long) () at .../libreoffice/sw/source/core/access/accdoc.cxx:467
    #12 0x00007f88878c6200 in QtAccessibleWidget::selectedItem (this=0x7f887c014ac0, nSelectionIndex=0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:1861
    #13 0x00007f8885f08ba0 in AtSpiAdaptor::selectionInterface (this=0x561f2b8a7070, interface=0x7f887c014ac0, function=..., message=..., connection=...)
        at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:2596
    #14 0x00007f8885f03ce1 in AtSpiAdaptor::handleMessage (this=0x561f2b8a7070, message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1479
    #15 0x00007f888366d217 in QDBusConnectionPrivate::activateObject (this=0x7f887c00a390, node=..., msg=..., pathStartPos=27) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1448
    #16 0x00007f888366e1d0 in QDBusActivateObjectEvent::placeMetaCall (this=0x7f887c03aca0) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1604
    #17 0x00007f8886b09bb1 in QObject::event (this=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:1431
    #18 0x00007f88849e2dd0 in QApplicationPrivate::notify_helper (this=0x561f2a554ae0, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #19 0x00007f88849e6ced in QApplication::notify (this=0x561f2a541420, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #20 0x00007f8886a481b9 in QCoreApplication::notifyInternal2 (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1118
    #21 0x00007f8886a48e29 in QCoreApplication::sendEvent (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1558
    #22 0x00007f8886a49d68 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x561f2a56fee0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1898
    #23 0x00007f8886a48c6c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1752
    #24 0x00007f88870377b1 in postEventSourceDispatch (s=0x561f2a5cce80) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #25 0x00007f888d50b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #26 0x00007f888d50da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #27 0x00007f888d50e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #28 0x00007f88870369eb in QEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #29 0x00007f8886164858 in QPAEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #30 0x00007f888796a492 in QtInstance::ImplYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464
    #31 0x00007f888796d511 in QtInstance::DoYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475
    #32 0x00007f88924bd626 in ImplYield (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:385
    #33 0x00007f88924bcf3f in Application::Yield () at .../libreoffice/vcl/source/app/svapp.cxx:488
    #34 0x00007f88924bcd20 in Application::Execute () at .../libreoffice/vcl/source/app/svapp.cxx:360
    #35 0x00007f889b327b89 in desktop::Desktop::Main (this=0x7ffcd9ea1c00) at .../libreoffice/desktop/source/app/app.cxx:1679
    #36 0x00007f88924deaa6 in ImplSVMain () at .../libreoffice/vcl/source/app/svmain.cxx:230
    #37 0x00007f88924e0699 in SVMain () at .../libreoffice/vcl/source/app/svmain.cxx:248
    #38 0x00007f889b3a146a in soffice_main () at .../libreoffice/desktop/source/app/sofficemain.cxx:121
    #39 0x0000561ef2802a6d in sal_main () at .../libreoffice/desktop/source/app/main.c:51
    #40 0x0000561ef2802a47 in main (argc=2, argv=0x7ffcd9ea1e08) at .../libreoffice/desktop/source/app/main.c:49

While QtAccessibleWidget::selectedItem already returns early
if the passed selection index is too large according to what
XAccessibleSelection::getSelectedAccessibleChildCount()
returns, this is not enough because Writer's SwAccessibleSelectionHelper
has an inconsistent/broken implementation:

SwAccessibleSelectionHelper::getSelectedAccessibleChildCount
returns the count of paragraphs that are (partially) selected
by the text cursor if no other objects are selected.
However, SwAccessibleSelectionHelper::getSelectedAccessibleChild
doesn't take these into account and therefore throws the
IndexOutOfBoundsException when called with any index.

Temporarily (in particular for backporting to release branches),
handle the exception in QtAccessibleWidget::selectedItem like
other a11y bridges do (see e.g. `selection_ref_selection`
for the gtk3 VCL plugin) to avoid the crash.

The underlying Writer issue described above will be fixed in a
separate commit (and for master only).

Change-Id: I874ad4a7a9faf79492967c943517d83df5f47e75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180228
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 3eaa35e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180240
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit ff11ab3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180584
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
tdf-gerrit pushed a commit that referenced this pull request Jan 23, 2025
Crashreport signature:

SIG   Fatal signal received: SIGABRT code: 18446744073709551610 for address: 0x1da00001e2c
program/libmergedlo.so
	Scheduler::CallbackTaskScheduling()
		vcl/source/app/scheduler.cxx:486 (discriminator 7)
program/libmergedlo.so
	comphelper::SolarMutex::release(bool)
		include/comphelper/solarmutex.hxx:91
program/libmergedlo.so
	SvpSalInstance::ImplYield(bool, bool)
		vcl/headless/svpinst.cxx:401
program/libmergedlo.so
	SvpSalInstance::DoYield(bool, bool)
		vcl/headless/svpinst.cxx:475

I.e. we do an abort when a task throws when the scheduler processes
events on the main loop. This happens *sometimes* locally, but it's
unclear to me how to reliably trigger it. When it happens, we warn like
this:

warn:vcl.schedule:27650:27441:vcl/source/app/scheduler.cxx:485: Uncaught com.sun.star.lang.NotInitializedException message: "at sfx2/source/doc/sfxbasemodel.cxx:3034" context: SdXImpressDocument

Checking the SAL_DEBUG_BACKTRACE() output for the case when
SfxBaseModel::MethodEntryCheck() throws:

	#3 instdir/program/libsfxlo.so(SfxBaseModel::MethodEntryCheck(bool) const+0x154) [0x7fec1e8ad9b4]
	#4 instdir/program/libsfxlo.so(+0x6bdd1e) [0x7fec1e8bdd1e]
	#5 instdir/program/libsfxlo.so(SfxBaseModel::getArgs2(com::sun::star::uno::Sequence<rtl::OUString> const&)+0x56) [0x7fec1e8a0dd2]
	#6 instdir/program/libsfxlo.so(SfxObjectShell::isEditDocLocked() const+0x11c) [0x7fec1e8239da]
	#7 instdir/program/libsfxlo.so(+0x882851) [0x7fec1ea82851]
	#8 instdir/program/libsfxlo.so(+0x87cefc) [0x7fec1ea7cefc]
	#9 instdir/program/libsfxlo.so(SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, SfxSlot const*)+0x1cc) [0x7fec1e4d57f4]
	#10 instdir/program/libsfxlo.so(+0x2b900a) [0x7fec1e4b900a]
	#11 instdir/program/libsfxlo.so(+0x2bd954) [0x7fec1e4bd954]
	#12 instdir/program/libsfxlo.so(+0x2bd631) [0x7fec1e4bd631]
	#13 instdir/program/libsfxlo.so(+0x2bd5a1) [0x7fec1e4bd5a1]
	#14 instdir/program/libvcllo.so(+0xf4fb91) [0x7fec1894fb91]
	#15 instdir/program/libvcllo.so(Timer::Invoke()+0x23) [0x7fec1894fa19]
	#16 instdir/program/libvcllo.so(Scheduler::CallbackTaskScheduling()+0x123d) [0x7fec188fe277]

Fix this in SfxObjectShell::isEditDocLocked(), where we already return
false to avoid a nullptr dereference, and do it the way
SfxObjectShell::isScriptAccessAllowed() does the same for consistency.

Change-Id: I435b2877b1b600e01bf32b44bfa664be1672c231
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180629
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
tdf-gerrit pushed a commit that referenced this pull request Jan 23, 2025
Crashreport signature:

SIG   Fatal signal received: SIGABRT code: 18446744073709551610 for address: 0x1da00001e2c
program/libmergedlo.so
	Scheduler::CallbackTaskScheduling()
		vcl/source/app/scheduler.cxx:486 (discriminator 7)
program/libmergedlo.so
	comphelper::SolarMutex::release(bool)
		include/comphelper/solarmutex.hxx:91
program/libmergedlo.so
	SvpSalInstance::ImplYield(bool, bool)
		vcl/headless/svpinst.cxx:401
program/libmergedlo.so
	SvpSalInstance::DoYield(bool, bool)
		vcl/headless/svpinst.cxx:475

I.e. we do an abort when a task throws when the scheduler processes
events on the main loop. This happens *sometimes* locally, but it's
unclear to me how to reliably trigger it. When it happens, we warn like
this:

warn:vcl.schedule:27650:27441:vcl/source/app/scheduler.cxx:485: Uncaught com.sun.star.lang.NotInitializedException message: "at sfx2/source/doc/sfxbasemodel.cxx:3034" context: SdXImpressDocument

Checking the SAL_DEBUG_BACKTRACE() output for the case when
SfxBaseModel::MethodEntryCheck() throws:

	#3 instdir/program/libsfxlo.so(SfxBaseModel::MethodEntryCheck(bool) const+0x154) [0x7fec1e8ad9b4]
	#4 instdir/program/libsfxlo.so(+0x6bdd1e) [0x7fec1e8bdd1e]
	#5 instdir/program/libsfxlo.so(SfxBaseModel::getArgs2(com::sun::star::uno::Sequence<rtl::OUString> const&)+0x56) [0x7fec1e8a0dd2]
	#6 instdir/program/libsfxlo.so(SfxObjectShell::isEditDocLocked() const+0x11c) [0x7fec1e8239da]
	#7 instdir/program/libsfxlo.so(+0x882851) [0x7fec1ea82851]
	#8 instdir/program/libsfxlo.so(+0x87cefc) [0x7fec1ea7cefc]
	#9 instdir/program/libsfxlo.so(SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, SfxSlot const*)+0x1cc) [0x7fec1e4d57f4]
	#10 instdir/program/libsfxlo.so(+0x2b900a) [0x7fec1e4b900a]
	#11 instdir/program/libsfxlo.so(+0x2bd954) [0x7fec1e4bd954]
	#12 instdir/program/libsfxlo.so(+0x2bd631) [0x7fec1e4bd631]
	#13 instdir/program/libsfxlo.so(+0x2bd5a1) [0x7fec1e4bd5a1]
	#14 instdir/program/libvcllo.so(+0xf4fb91) [0x7fec1894fb91]
	#15 instdir/program/libvcllo.so(Timer::Invoke()+0x23) [0x7fec1894fa19]
	#16 instdir/program/libvcllo.so(Scheduler::CallbackTaskScheduling()+0x123d) [0x7fec188fe277]

Fix this in SfxObjectShell::isEditDocLocked(), where we already return
false to avoid a nullptr dereference, and do it the way
SfxObjectShell::isScriptAccessAllowed() does the same for consistency.

Change-Id: I435b2877b1b600e01bf32b44bfa664be1672c231
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180663
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
tdf-gerrit pushed a commit that referenced this pull request Jan 23, 2025
Crashreport signature:

SIG   Fatal signal received: SIGABRT code: 18446744073709551610 for address: 0x1da00001e2c
program/libmergedlo.so
	Scheduler::CallbackTaskScheduling()
		vcl/source/app/scheduler.cxx:486 (discriminator 7)
program/libmergedlo.so
	comphelper::SolarMutex::release(bool)
		include/comphelper/solarmutex.hxx:91
program/libmergedlo.so
	SvpSalInstance::ImplYield(bool, bool)
		vcl/headless/svpinst.cxx:401
program/libmergedlo.so
	SvpSalInstance::DoYield(bool, bool)
		vcl/headless/svpinst.cxx:475

I.e. we do an abort when a task throws when the scheduler processes
events on the main loop. This happens *sometimes* locally, but it's
unclear to me how to reliably trigger it. When it happens, we warn like
this:

warn:vcl.schedule:27650:27441:vcl/source/app/scheduler.cxx:485: Uncaught com.sun.star.lang.NotInitializedException message: "at sfx2/source/doc/sfxbasemodel.cxx:3034" context: SdXImpressDocument

Checking the SAL_DEBUG_BACKTRACE() output for the case when
SfxBaseModel::MethodEntryCheck() throws:

	#3 instdir/program/libsfxlo.so(SfxBaseModel::MethodEntryCheck(bool) const+0x154) [0x7fec1e8ad9b4]
	#4 instdir/program/libsfxlo.so(+0x6bdd1e) [0x7fec1e8bdd1e]
	#5 instdir/program/libsfxlo.so(SfxBaseModel::getArgs2(com::sun::star::uno::Sequence<rtl::OUString> const&)+0x56) [0x7fec1e8a0dd2]
	#6 instdir/program/libsfxlo.so(SfxObjectShell::isEditDocLocked() const+0x11c) [0x7fec1e8239da]
	#7 instdir/program/libsfxlo.so(+0x882851) [0x7fec1ea82851]
	#8 instdir/program/libsfxlo.so(+0x87cefc) [0x7fec1ea7cefc]
	#9 instdir/program/libsfxlo.so(SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, SfxSlot const*)+0x1cc) [0x7fec1e4d57f4]
	#10 instdir/program/libsfxlo.so(+0x2b900a) [0x7fec1e4b900a]
	#11 instdir/program/libsfxlo.so(+0x2bd954) [0x7fec1e4bd954]
	#12 instdir/program/libsfxlo.so(+0x2bd631) [0x7fec1e4bd631]
	#13 instdir/program/libsfxlo.so(+0x2bd5a1) [0x7fec1e4bd5a1]
	#14 instdir/program/libvcllo.so(+0xf4fb91) [0x7fec1894fb91]
	#15 instdir/program/libvcllo.so(Timer::Invoke()+0x23) [0x7fec1894fa19]
	#16 instdir/program/libvcllo.so(Scheduler::CallbackTaskScheduling()+0x123d) [0x7fec188fe277]

Fix this in SfxObjectShell::isEditDocLocked(), where we already return
false to avoid a nullptr dereference, and do it the way
SfxObjectShell::isScriptAccessAllowed() does the same for consistency.

Change-Id: I435b2877b1b600e01bf32b44bfa664be1672c231
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180663
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 71aa535)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180672
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
tdf-gerrit pushed a commit that referenced this pull request Jan 24, 2025
TableControl::commitCellEventIfAccessibleAlive sends an event
on the currently selected/active cell. So only call it in
SVTXGridControl::ProcessWindowEvent when there is one.

Use TableControl::GetCurrentRow and TableControl::GetCurrentColumn
to check that, which return a special value (of -2) for the case there
is no active cell.

For TableControl::GetCurrentRow:

        /** retrieves the current row

            The current row is the one which contains the active cell.

            @return
                the row index of the active cell, or ->ROW_INVALID
                if there is no active cell, e.g. because the table does
                not contain any rows or columns.
        */
        sal_Int32 GetCurrentRow() const override;

The previous check whether the table has any rows was insufficient
and resulted in an invalid attempt to access vector elements at
negative indices.

For the tdf#164783 scenario:

    /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
    In function:
        reference
        std::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>>::operator[](size_type)
        [_Tp = rtl::Reference<accessibility::AccessibleGridControlTableCell>,
        _Allocator =
        std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>]

    Error: attempt to subscript container with out-of-bounds index -6, but
    container only holds 60 elements.

    Objects involved in the operation:
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }
    /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
    In function:
        reference
        std::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>>::operator[](size_type)
        [_Tp = rtl::Reference<accessibility::AccessibleGridControlTableCell>,
        _Allocator =
        std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>]

    Error: attempt to subscript container with out-of-bounds index -6, but
    container only holds 60 elements.

    Objects involved in the operation:
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }

    Fatal exception: Signal 6
    Stack:
    #0 sal::backtrace_get(unsigned int) at .../libreoffice/sal/osl/unx/backtraceapi.cxx:42
    #1 (anonymous namespace)::printStack(int) at .../libreoffice/sal/osl/unx/signal.cxx:289
    #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at .../libreoffice/sal/osl/unx/signal.cxx:330
    #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at .../libreoffice/sal/osl/unx/signal.cxx:427
    #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3fda0) [0x7f7544649da0]
    #5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1)
    #6 raise at ./signal/../sysdeps/posix/raise.c:27
    #7 abort at ./stdlib/abort.c:81
    #8 std::__throw_bad_exception() in /lib/x86_64-linux-gnu/libstdc++.so.6
    #9 std::__debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>>::operator[](unsigned long) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508
    #10 accessibility::AccessibleGridControlTable::getAccessibleChild(long) at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:66
    #11 accessibility::AccessibleGridControlTable::getAccessibleCellAt(int, int) at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:191
    #12 accessibility::AccessibleGridControl::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/vcl/source/accessibility/AccessibleGridControl.cxx:272
    #13 accessibility::AccessibleGridControlAccess::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/vcl/inc/accessibility/AccessibleGridControl.hxx:197
    #14 svt::table::TableControl_Impl::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/toolkit/source/controls/table/tablecontrol_impl.cxx:2304
    #15 svt::table::TableControl::commitCellEventIfAccessibleAlive(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:470
    #16 SVTXGridControl::ProcessWindowEvent(VclWindowEvent const&) at .../libreoffice/toolkit/source/controls/svtxgridcontrol.cxx:823
    #17 VCLXWindow::WindowEventListener(VclWindowEvent&) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:390
    #18 VCLXWindow::LinkStubWindowEventListener(void*, VclWindowEvent&) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:383
    #19 Link<VclWindowEvent&, void>::Call(VclWindowEvent&) const at .../libreoffice/include/tools/link.hxx:101
    #20 vcl::Window::CallEventListeners(VclEventId, void*) at .../libreoffice/vcl/source/window/event.cxx:262
    #21 Control::CallEventListeners(VclEventId, void*) at .../libreoffice/vcl/source/control/ctrl.cxx:298
    #22 Control::ImplCallEventListenersAndHandler(VclEventId, std::function<void ()> const&) at .../libreoffice/vcl/source/control/ctrl.cxx:305
    #23 Control::EventNotify(NotifyEvent&) at .../libreoffice/vcl/source/control/ctrl.cxx:247
    #24 vcl::Window::CompatNotify(NotifyEvent&) at .../libreoffice/vcl/source/window/window.cxx:3943
    #25 vcl::Window::LoseFocus() at .../libreoffice/vcl/source/window/window.cxx:1861
    #26 svt::table::TableControl::LoseFocus() at .../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:94
    #27 vcl::Window::CompatLoseFocus() at .../libreoffice/vcl/source/window/window.cxx:3912
    #28 vcl::Window::ImplAsyncFocusHdl(void*) at .../libreoffice/vcl/source/window/winproc.cxx:2127
    #29 vcl::Window::LinkStubImplAsyncFocusHdl(void*, void*) at .../libreoffice/vcl/source/window/winproc.cxx:2033
    #30 Link<void*, void>::Call(void*) const at .../libreoffice/include/tools/link.hxx:101
    #31 ImplHandleUserEvent(ImplSVEvent*) at .../libreoffice/vcl/source/window/winproc.cxx:2288
    #32 ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at .../libreoffice/vcl/source/window/winproc.cxx:2849
    #33 SalFrame::CallCallback(SalEvent, void const*) const at .../libreoffice/vcl/inc/salframe.hxx:311
    #34 SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:67
    #35 SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const at .../libreoffice/vcl/source/app/salusereventlist.cxx:119
    #36 SalUserEventList::DispatchUserEvents(bool) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120
    #37 SalGenericDisplay::DispatchInternalEvent(bool) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #38 call_userEventFn(void*) at .../libreoffice/vcl/unx/gtk3/gtkdata.cxx:827
    #39 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5a81f) [0x7f7536f0b81f]
    #40 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ca57) [0x7f7536f0da57]
    #41 g_main_loop_run in /lib/x86_64-linux-gnu/libglib-2.0.so.0
    ...

Change-Id: Iafed90e6985cf2c05d65be5f74334f58b369d945
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180661
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Jan 24, 2025
TableControl::commitCellEventIfAccessibleAlive sends an event
on the currently selected/active cell. So only call it in
SVTXGridControl::ProcessWindowEvent when there is one.

Use TableControl::GetCurrentRow and TableControl::GetCurrentColumn
to check that, which return a special value (of -2) for the case there
is no active cell.

For TableControl::GetCurrentRow:

        /** retrieves the current row

            The current row is the one which contains the active cell.

            @return
                the row index of the active cell, or ->ROW_INVALID
                if there is no active cell, e.g. because the table does
                not contain any rows or columns.
        */
        sal_Int32 GetCurrentRow() const override;

The previous check whether the table has any rows was insufficient
and resulted in an invalid attempt to access vector elements at
negative indices.

For the tdf#164783 scenario:

    /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
    In function:
        reference
        std::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>>::operator[](size_type)
        [_Tp = rtl::Reference<accessibility::AccessibleGridControlTableCell>,
        _Allocator =
        std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>]

    Error: attempt to subscript container with out-of-bounds index -6, but
    container only holds 60 elements.

    Objects involved in the operation:
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }
    /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
    In function:
        reference
        std::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>>::operator[](size_type)
        [_Tp = rtl::Reference<accessibility::AccessibleGridControlTableCell>,
        _Allocator =
        std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>]

    Error: attempt to subscript container with out-of-bounds index -6, but
    container only holds 60 elements.

    Objects involved in the operation:
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }

    Fatal exception: Signal 6
    Stack:
    #0 sal::backtrace_get(unsigned int) at .../libreoffice/sal/osl/unx/backtraceapi.cxx:42
    #1 (anonymous namespace)::printStack(int) at .../libreoffice/sal/osl/unx/signal.cxx:289
    #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at .../libreoffice/sal/osl/unx/signal.cxx:330
    #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at .../libreoffice/sal/osl/unx/signal.cxx:427
    #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3fda0) [0x7f7544649da0]
    #5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1)
    #6 raise at ./signal/../sysdeps/posix/raise.c:27
    #7 abort at ./stdlib/abort.c:81
    #8 std::__throw_bad_exception() in /lib/x86_64-linux-gnu/libstdc++.so.6
    #9 std::__debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>>::operator[](unsigned long) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508
    #10 accessibility::AccessibleGridControlTable::getAccessibleChild(long) at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:66
    #11 accessibility::AccessibleGridControlTable::getAccessibleCellAt(int, int) at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:191
    #12 accessibility::AccessibleGridControl::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/vcl/source/accessibility/AccessibleGridControl.cxx:272
    #13 accessibility::AccessibleGridControlAccess::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/vcl/inc/accessibility/AccessibleGridControl.hxx:197
    #14 svt::table::TableControl_Impl::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/toolkit/source/controls/table/tablecontrol_impl.cxx:2304
    #15 svt::table::TableControl::commitCellEventIfAccessibleAlive(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:470
    #16 SVTXGridControl::ProcessWindowEvent(VclWindowEvent const&) at .../libreoffice/toolkit/source/controls/svtxgridcontrol.cxx:823
    #17 VCLXWindow::WindowEventListener(VclWindowEvent&) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:390
    #18 VCLXWindow::LinkStubWindowEventListener(void*, VclWindowEvent&) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:383
    #19 Link<VclWindowEvent&, void>::Call(VclWindowEvent&) const at .../libreoffice/include/tools/link.hxx:101
    #20 vcl::Window::CallEventListeners(VclEventId, void*) at .../libreoffice/vcl/source/window/event.cxx:262
    #21 Control::CallEventListeners(VclEventId, void*) at .../libreoffice/vcl/source/control/ctrl.cxx:298
    #22 Control::ImplCallEventListenersAndHandler(VclEventId, std::function<void ()> const&) at .../libreoffice/vcl/source/control/ctrl.cxx:305
    #23 Control::EventNotify(NotifyEvent&) at .../libreoffice/vcl/source/control/ctrl.cxx:247
    #24 vcl::Window::CompatNotify(NotifyEvent&) at .../libreoffice/vcl/source/window/window.cxx:3943
    #25 vcl::Window::LoseFocus() at .../libreoffice/vcl/source/window/window.cxx:1861
    #26 svt::table::TableControl::LoseFocus() at .../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:94
    #27 vcl::Window::CompatLoseFocus() at .../libreoffice/vcl/source/window/window.cxx:3912
    #28 vcl::Window::ImplAsyncFocusHdl(void*) at .../libreoffice/vcl/source/window/winproc.cxx:2127
    #29 vcl::Window::LinkStubImplAsyncFocusHdl(void*, void*) at .../libreoffice/vcl/source/window/winproc.cxx:2033
    #30 Link<void*, void>::Call(void*) const at .../libreoffice/include/tools/link.hxx:101
    #31 ImplHandleUserEvent(ImplSVEvent*) at .../libreoffice/vcl/source/window/winproc.cxx:2288
    #32 ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at .../libreoffice/vcl/source/window/winproc.cxx:2849
    #33 SalFrame::CallCallback(SalEvent, void const*) const at .../libreoffice/vcl/inc/salframe.hxx:311
    #34 SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:67
    #35 SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const at .../libreoffice/vcl/source/app/salusereventlist.cxx:119
    #36 SalUserEventList::DispatchUserEvents(bool) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120
    #37 SalGenericDisplay::DispatchInternalEvent(bool) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #38 call_userEventFn(void*) at .../libreoffice/vcl/unx/gtk3/gtkdata.cxx:827
    #39 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5a81f) [0x7f7536f0b81f]
    #40 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ca57) [0x7f7536f0da57]
    #41 g_main_loop_run in /lib/x86_64-linux-gnu/libglib-2.0.so.0
    ...

Change-Id: Iafed90e6985cf2c05d65be5f74334f58b369d945
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180661
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 57906dd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180680
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
tdf-gerrit pushed a commit that referenced this pull request Jan 24, 2025
TableControl::commitCellEventIfAccessibleAlive sends an event
on the currently selected/active cell. So only call it in
SVTXGridControl::ProcessWindowEvent when there is one.

Use TableControl::GetCurrentRow and TableControl::GetCurrentColumn
to check that, which return a special value (of -2) for the case there
is no active cell.

For TableControl::GetCurrentRow:

        /** retrieves the current row

            The current row is the one which contains the active cell.

            @return
                the row index of the active cell, or ->ROW_INVALID
                if there is no active cell, e.g. because the table does
                not contain any rows or columns.
        */
        sal_Int32 GetCurrentRow() const override;

The previous check whether the table has any rows was insufficient
and resulted in an invalid attempt to access vector elements at
negative indices.

For the tdf#164783 scenario:

    /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
    In function:
        reference
        std::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>>::operator[](size_type)
        [_Tp = rtl::Reference<accessibility::AccessibleGridControlTableCell>,
        _Allocator =
        std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>]

    Error: attempt to subscript container with out-of-bounds index -6, but
    container only holds 60 elements.

    Objects involved in the operation:
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }
    /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
    In function:
        reference
        std::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>>::operator[](size_type)
        [_Tp = rtl::Reference<accessibility::AccessibleGridControlTableCell>,
        _Allocator =
        std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>]

    Error: attempt to subscript container with out-of-bounds index -6, but
    container only holds 60 elements.

    Objects involved in the operation:
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }
        sequence "this" @ 0x5638c74e2350 {
          type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
        }

    Fatal exception: Signal 6
    Stack:
    #0 sal::backtrace_get(unsigned int) at .../libreoffice/sal/osl/unx/backtraceapi.cxx:42
    #1 (anonymous namespace)::printStack(int) at .../libreoffice/sal/osl/unx/signal.cxx:289
    #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at .../libreoffice/sal/osl/unx/signal.cxx:330
    #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at .../libreoffice/sal/osl/unx/signal.cxx:427
    #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3fda0) [0x7f7544649da0]
    #5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1)
    #6 raise at ./signal/../sysdeps/posix/raise.c:27
    #7 abort at ./stdlib/abort.c:81
    #8 std::__throw_bad_exception() in /lib/x86_64-linux-gnu/libstdc++.so.6
    #9 std::__debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>>::operator[](unsigned long) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508
    #10 accessibility::AccessibleGridControlTable::getAccessibleChild(long) at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:66
    #11 accessibility::AccessibleGridControlTable::getAccessibleCellAt(int, int) at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:191
    #12 accessibility::AccessibleGridControl::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/vcl/source/accessibility/AccessibleGridControl.cxx:272
    #13 accessibility::AccessibleGridControlAccess::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/vcl/inc/accessibility/AccessibleGridControl.hxx:197
    #14 svt::table::TableControl_Impl::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/toolkit/source/controls/table/tablecontrol_impl.cxx:2304
    #15 svt::table::TableControl::commitCellEventIfAccessibleAlive(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:470
    #16 SVTXGridControl::ProcessWindowEvent(VclWindowEvent const&) at .../libreoffice/toolkit/source/controls/svtxgridcontrol.cxx:823
    #17 VCLXWindow::WindowEventListener(VclWindowEvent&) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:390
    #18 VCLXWindow::LinkStubWindowEventListener(void*, VclWindowEvent&) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:383
    #19 Link<VclWindowEvent&, void>::Call(VclWindowEvent&) const at .../libreoffice/include/tools/link.hxx:101
    #20 vcl::Window::CallEventListeners(VclEventId, void*) at .../libreoffice/vcl/source/window/event.cxx:262
    #21 Control::CallEventListeners(VclEventId, void*) at .../libreoffice/vcl/source/control/ctrl.cxx:298
    #22 Control::ImplCallEventListenersAndHandler(VclEventId, std::function<void ()> const&) at .../libreoffice/vcl/source/control/ctrl.cxx:305
    #23 Control::EventNotify(NotifyEvent&) at .../libreoffice/vcl/source/control/ctrl.cxx:247
    #24 vcl::Window::CompatNotify(NotifyEvent&) at .../libreoffice/vcl/source/window/window.cxx:3943
    #25 vcl::Window::LoseFocus() at .../libreoffice/vcl/source/window/window.cxx:1861
    #26 svt::table::TableControl::LoseFocus() at .../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:94
    #27 vcl::Window::CompatLoseFocus() at .../libreoffice/vcl/source/window/window.cxx:3912
    #28 vcl::Window::ImplAsyncFocusHdl(void*) at .../libreoffice/vcl/source/window/winproc.cxx:2127
    #29 vcl::Window::LinkStubImplAsyncFocusHdl(void*, void*) at .../libreoffice/vcl/source/window/winproc.cxx:2033
    #30 Link<void*, void>::Call(void*) const at .../libreoffice/include/tools/link.hxx:101
    #31 ImplHandleUserEvent(ImplSVEvent*) at .../libreoffice/vcl/source/window/winproc.cxx:2288
    #32 ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at .../libreoffice/vcl/source/window/winproc.cxx:2849
    #33 SalFrame::CallCallback(SalEvent, void const*) const at .../libreoffice/vcl/inc/salframe.hxx:311
    #34 SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:67
    #35 SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const at .../libreoffice/vcl/source/app/salusereventlist.cxx:119
    #36 SalUserEventList::DispatchUserEvents(bool) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120
    #37 SalGenericDisplay::DispatchInternalEvent(bool) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #38 call_userEventFn(void*) at .../libreoffice/vcl/unx/gtk3/gtkdata.cxx:827
    #39 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5a81f) [0x7f7536f0b81f]
    #40 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ca57) [0x7f7536f0da57]
    #41 g_main_loop_run in /lib/x86_64-linux-gnu/libglib-2.0.so.0
    ...

Change-Id: Iafed90e6985cf2c05d65be5f74334f58b369d945
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180661
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 57906dd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180681
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
tdf-gerrit pushed a commit that referenced this pull request Jan 30, 2025
This fixes various asserts triggered when opening the sample doc
attachment 198264 from tdf#164460 with the qt6 VCL plugin
and using a current qtbase git dev build, for example:

    ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread QThread(0x7fffbc000f50). Receiver 'QWidgetWindow(0x555556dd9f10, name = "QtMainWindowClassWindow")' was created in thread QThread(0x555555564ee0, name = "Qt mainThread")", file /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp, line 530

    Thread 24 "DocumentEventNo" received signal SIGABRT, Aborted.
    [Switching to Thread 0x7fffc4f4f6c0 (LWP 625101)]
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007ffff789de2f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007ffff7849d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007ffff78324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007fffe3302efd in qAbort () at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:46
    #5  0x00007fffe3349788 in qt_message_fatal<QString&> (context=..., message=...) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:2062
    #6  0x00007fffe334298d in qt_message (msgType=QtFatalMsg, context=..., msg=0x7fffe3a8edf3 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0x7fffc4f478f0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:342
    #7  0x00007fffe3344cdd in QMessageLogger::fatal (this=0x7fffc4f47a90, msg=0x7fffe3a8edf3 "ASSERT failure in %s: \"%s\", file %s, line %d") at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:831
    #8  0x00007fffe3302fb3 in qt_assert_x
        (where=0x7fffe3a98873 "QCoreApplication::sendEvent", what=0x7fffbc000c00 "Cannot send events to objects owned by a different thread. Current thread QThread(0x7fffbc000f50). Receiver 'QWidgetWindow(0x555556dd9f10, name = \"QtMainWindowClassWindow\")' was created in thread QThr"..., file=0x7fffe3a9864f "/home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp", line=530)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:115
    #9  0x00007fffe3447d56 in QCoreApplicationPrivate::checkReceiverThread (receiver=0x555556dd9f10) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:526
    #10 0x00007fffe13e3f91 in QApplication::notify (this=0x555555564e20, receiver=0x555556dd9f10, e=0x7fffc4f486a0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2590
    #11 0x00007fffe3449dc9 in QCoreApplication::notifyInternal2 (receiver=0x555556dd9f10, event=0x7fffc4f486a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #12 0x00007fffe344aa39 in QCoreApplication::sendEvent (receiver=0x555556dd9f10, event=0x7fffc4f486a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1552
    #13 0x00007fffe235f1ff in QWindowPrivate::setCursor (this=0x5555571f48a0, newCursor=0x7fffc4f48770) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindow.cpp:3269
    #14 0x00007fffe235f0ce in QWindow::setCursor (this=0x555556dd9f10, cursor=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindow.cpp:3227
    #15 0x00007fffe1492921 in applyCursor (w=0x555556e5d360, c=...) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:5020
    #16 0x00007fffe148e6e4 in qt_qpa_set_cursor (w=0x55555707ea30, force=false) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:5058
    #17 0x00007fffe14927cc in QWidgetPrivate::setCursor_sys (this=0x555556e37f10, cursor=...) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:4995
    #18 0x00007fffe149274e in QWidget::setCursor (this=0x55555707ea30, cursor=...) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:4985
    #19 0x00007fffe43493b8 in QtFrame::SetPointer (this=0x555556dc14c0, ePointerStyle=PointerStyle::Wait) at vcl/qt6/../qt5/QtFrame.cxx:794
    #20 0x00007fffee3db06e in vcl::Window::EnterWait (this=0x555556df3620) at /home/michi/development/git/libreoffice/vcl/source/window/mouse.cxx:614
    #21 0x00007fffeebd9b16 in SalInstanceWidget::set_busy_cursor (this=0x5555575c9520, bBusy=true) at /home/michi/development/git/libreoffice/vcl/source/app/salvtables.cxx:625
    #22 0x00007fffa505266a in weld::WaitObject::WaitObject (this=0x7fffc4f48a48, pWindow=0x5555575c9560) at include/vcl/weld.hxx:611
    #23 0x00007fffa504c0b1 in dbaui::OApplicationController::ensureConnection (this=0x555556e115f0, _pErrorInfo=0x7fffc4f48b48) at /home/michi/development/git/libreoffice/dbaccess/source/ui/app/AppControllerDnD.cxx:310
    #24 0x00007fffa505f75a in dbaui::OApplicationController::connect (this=0x555556e115f0) at /home/michi/development/git/libreoffice/dbaccess/source/ui/app/AppControllerGen.cxx:316
    #25 0x00007fffe0b370ed in gcc3::callVirtualMethod (pThis=0x555556e11968, nVtableIndex=8, pRegisterReturn=0x0, pReturnTypeRef=0x555555604370, bSimpleReturn=true, pStack=0x7fffc4f48c70, nStack=0, pGPR=0x7fffc4f48f40, pFPR=0x7fffc4f48f00)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87
    #26 0x00007fffe0b35e5b in cpp_call (pThis=0x7fffbc2af2e0, aVtableSlot=..., pReturnTypeRef=0x555555604370, nParams=0, pParams=0x0, pUnoReturn=0x0, pUnoArgs=0x7fffc4f490c0, ppUnoExc=0x7fffc4f49370)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:229
    #27 0x00007fffe0b35626 in unoInterfaceProxyDispatch (pUnoI=0x7fffbc2af2e0, pMemberDescr=0x7fffbc2b0bd0, pReturn=0x0, pArgs=0x7fffc4f490c0, ppException=0x7fffc4f49370)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:409
    #28 0x00007fffb6fe565a in stoc_corefl::(anonymous namespace)::IdlInterfaceMethodImpl::invoke (this=0x7fffbc2b33d0, rObj=uno::Any("com.sun.star.frame.XController": ...), rArgs=empty uno::Sequence)
        at /home/michi/development/git/libreoffice/stoc/source/corereflection/criface.cxx:591
    #29 0x00007fffb6fe5e74 in non-virtual thunk to stoc_corefl::(anonymous namespace)::IdlInterfaceMethodImpl::invoke(com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) ()
        at /home/michi/development/git/libreoffice/instdir/program/libreflectionlo.so
    #30 0x00007ffff4618bde in SbUnoObject::Notify (this=0x7fffbc29fea0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbunoobj.cxx:2249
    #31 0x00007ffff3151a4c in SfxBroadcaster::Broadcast (this=0x7fffbc2b5480, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #32 0x00007ffff47c7ad4 in SbxVariable::Broadcast (this=0x7fffbc2b5990, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:154
    #33 0x00007ffff47c04fd in SbxValue::SbxValue (this=0x7fffbc2808c0, vtt=0x7ffff47eb6d0 <VTT for SbxMethod+16>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:68
    #34 0x00007ffff47c6674 in SbxVariable::SbxVariable (this=0x7fffbc2808c0, vtt=0x7ffff47eb6c8 <VTT for SbxMethod+8>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:48
    #35 0x00007ffff47b6f4a in SbxMethod::SbxMethod (this=0x7fffbc2808c0, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxobj.cxx:842
    #36 0x00007ffff477782a in SbiRuntime::FindElement (this=0x7fffbc1bfb00, pObj=0x7fffbc29fea0, nOp1=75, nOp2=12, nNotFound=..., bLocal=false, bStatic=false) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:3701
    #37 0x00007ffff476adc2 in SbiRuntime::StepELEM (this=0x7fffbc1bfb00, nOp1=75, nOp2=12) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4187
    #38 0x00007ffff476fa77 in SbiRuntime::Step (this=0x7fffbc1bfb00) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:808
    #39 0x00007ffff46638c9 in (anonymous namespace)::RunInitGuard::run (this=0x7fffc4f4a4c0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1017
    #40 0x00007ffff466262d in SbModule::Run (this=0x7fffbc093b00, pMeth=0x7fffbc16d040) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1177
    #41 0x00007ffff4661b41 in SbModule::Notify (this=0x7fffbc093b00, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:775
    #42 0x00007ffff3151a4c in SfxBroadcaster::Broadcast (this=0x7fffbc094fb0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #43 0x00007ffff466879b in SbMethod::Broadcast (this=0x7fffbc095060, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2115
    #44 0x00007ffff47c04fd in SbxValue::SbxValue (this=0x7fffbc1b9590, vtt=0x7ffff47eb6d0 <VTT for SbxMethod+16>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:68
    #45 0x00007ffff47c6674 in SbxVariable::SbxVariable (this=0x7fffbc1b9590, vtt=0x7ffff47eb6c8 <VTT for SbxMethod+8>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:48
    #46 0x00007ffff47b6f4a in SbxMethod::SbxMethod (this=0x7fffbc1b9590, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxobj.cxx:842
    #47 0x00007ffff477782a in SbiRuntime::FindElement (this=0x7fffbc16d360, pObj=0x7fffbc093b00, nOp1=10, nOp2=0, nNotFound=..., bLocal=true, bStatic=false) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:3701
    #48 0x00007ffff4778e95 in SbiRuntime::StepFIND_Impl (this=0x7fffbc16d360, pObj=0x7fffbc093b00, nOp1=10, nOp2=0, nNotFound=..., bStatic=false) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4134
    #49 0x00007ffff476ac0d in SbiRuntime::StepFIND (this=0x7fffbc16d360, nOp1=10, nOp2=0) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4140
    #50 0x00007ffff476fa77 in SbiRuntime::Step (this=0x7fffbc16d360) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:808
    #51 0x00007ffff46638c9 in (anonymous namespace)::RunInitGuard::run (this=0x7fffc4f4b3c0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1017
    #52 0x00007ffff466262d in SbModule::Run (this=0x7fffbc093b00, pMeth=0x7fffbc162760) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1177
    #53 0x00007ffff4661b41 in SbModule::Notify (this=0x7fffbc093b00, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:775
    #54 0x00007ffff3151a4c in SfxBroadcaster::Broadcast (this=0x7fffbc093f10, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #55 0x00007ffff466879b in SbMethod::Broadcast (this=0x7fffbc0938c0, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2115
    #56 0x00007ffff47c0ef3 in SbxValue::Get (this=0x7fffbc0938c0, rRes=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:290
    #57 0x00007ffff466848b in SbMethod::Call (this=0x7fffbc0938c0, pRet=0x7fffbc156ef0, pCaller=0x0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2071
    #58 0x00007fffdc9f4cfe in basprov::BasicScriptImpl::invoke (this=0x7fffbc012bd0, aParams=uno::Sequence of length 1 = {...}, aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence)
        at /home/michi/development/git/libreoffice/scripting/source/basprov/basscript.cxx:262
    #59 0x00007fffdc9f54ac in non-virtual thunk to basprov::BasicScriptImpl::invoke(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) () at /home/michi/development/git/libreoffice/instdir/program/../program/libbasprovlo.so
    #60 0x00007fffdffeedc7 in scripting_protocolhandler::ScriptProtocolHandler::dispatchWithNotification (this=0x7fffbc002330, aURL=..., lArgs=uno::Sequence of length 1 = {...}, xListener=empty uno::Reference)
        at /home/michi/development/git/libreoffice/scripting/source/protocolhandler/scripthandler.cxx:213
    #61 0x00007fffdfff02ef in scripting_protocolhandler::ScriptProtocolHandler::dispatch (this=0x7fffbc002330, aURL=..., lArgs=uno::Sequence of length 1 = {...})
        at /home/michi/development/git/libreoffice/scripting/source/protocolhandler/scripthandler.cxx:286
    #62 0x00007fffc6f7d166 in dbaccess::(anonymous namespace)::lcl_dispatchScriptURL_throw
        (xWeakDocument=..., xURLTransformer=uno::Reference to ((anonymous namespace)::URLTransformer *) 0x555557223d28, _rScriptURL="vnd.sun.star.script:Standard.Backup.DatabaseStart?language=Basic&location=document", _rTrigger=...)
        at /home/michi/development/git/libreoffice/dbaccess/source/core/dataaccess/documenteventexecutor.cxx:100
    #63 0x00007fffc6f7cbe6 in dbaccess::DocumentEventExecutor::documentEventOccured (this=0x55555721f030, Event=...) at /home/michi/development/git/libreoffice/dbaccess/source/core/dataaccess/documenteventexecutor.cxx:169
    #64 0x00007fffc6f8dfb7 in comphelper::OInterfaceContainerHelper3<com::sun::star::document::XDocumentEventListener>::NotifySingleListener<com::sun::star::document::DocumentEvent>::operator()
        (this=0x7fffc4f4d220, listener=uno::Reference to (dbaccess::DocumentEventExecutor *) 0x55555721f058) at include/comphelper/interfacecontainer3.hxx:249
    #65 0x00007fffc6f8dd45 in comphelper::OInterfaceContainerHelper3<com::sun::star::document::XDocumentEventListener>::forEach<comphelper::OInterfaceContainerHelper3<com::sun::star::document::XDocumentEventListener>::NotifySingleListener<com::sun::star::document::DocumentEvent> > (this=0x55555721f368, func=...) at include/comphelper/interfacecontainer3.hxx:275
    #66 0x00007fffc6f7fd33 in comphelper::OInterfaceContainerHelper3<com::sun::star::document::XDocumentEventListener>::notifyEach<com::sun::star::document::DocumentEvent>
        (this=0x55555721f368, NotificationMethod=&virtual table offset 32, Event=...) at include/comphelper/interfacecontainer3.hxx:290
    #67 0x00007fffc6f7f007 in dbaccess::DocumentEventNotifier_Impl::impl_notifyEvent_nothrow (this=0x55555721f320, _rEvent=...) at /home/michi/development/git/libreoffice/dbaccess/source/core/dataaccess/documenteventnotifier.cxx:197
    #68 0x00007fffc6f7f3b9 in dbaccess::DocumentEventNotifier_Impl::processEvent (this=0x55555721f320, _rEvent=...) at /home/michi/development/git/libreoffice/dbaccess/source/core/dataaccess/documenteventnotifier.cxx:230
    #69 0x00007ffff6119f47 in comphelper::AsyncEventNotifierBase::execute (this=0x5555575b4de0) at /home/michi/development/git/libreoffice/comphelper/source/misc/asyncnotification.cxx:139
    #70 0x00007ffff611b074 in comphelper::AsyncEventNotifierAutoJoin::run (this=0x5555575b4de0) at /home/michi/development/git/libreoffice/comphelper/source/misc/asyncnotification.cxx:246
    #71 0x00007ffff612743e in threadFunc (param=0x5555575b4df0) at include/osl/thread.hxx:189
    #72 0x00007ffff7fa2ccb in osl_thread_start_Impl (pData=0x5555575a22b0) at /home/michi/development/git/libreoffice/sal/osl/unx/thread.cxx:237
    #73 0x00007ffff789c083 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
    #74 0x00007ffff791a7b8 in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Change-Id: I0ee7aa62893da92b886acfd3d47be0bdb10d6007
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
tdf-gerrit pushed a commit that referenced this pull request Jan 30, 2025
This fixes this assert triggered when opening the sample doc
attachment 198264 from tdf#164460 with the qt6 VCL plugin
and running the macro, using a current qtbase git dev build:

    ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread QThread(0x7fffbc000f50). Receiver 'QWidget(0x555558de1c00)' was created in thread QThread(0x555555564ee0, name = "Qt mainThread")", file /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp, line 530

    Thread 24 "DocumentEventNo" received signal SIGABRT, Aborted.
    [Switching to Thread 0x7fffc4f4f6c0 (LWP 626865)]
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007ffff789de2f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007ffff7849d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007ffff78324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007fffe3302efd in qAbort () at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:46
    #5  0x00007fffe3349788 in qt_message_fatal<QString&> (context=..., message=...) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:2062
    #6  0x00007fffe334298d in qt_message (msgType=QtFatalMsg, context=..., msg=0x7fffe3a8edf3 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0x7fffc4f41650)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:342
    #7  0x00007fffe3344cdd in QMessageLogger::fatal (this=0x7fffc4f417f0, msg=0x7fffe3a8edf3 "ASSERT failure in %s: \"%s\", file %s, line %d") at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:831
    #8  0x00007fffe3302fb3 in qt_assert_x
        (where=0x7fffe3a98873 "QCoreApplication::sendEvent", what=0x7fff60309060 "Cannot send events to objects owned by a different thread. Current thread QThread(0x7fffbc000f50). Receiver 'QWidget(0x555558de1c00)' was created in thread QThread(0x555555564ee0, name = \"Qt mainThrea"..., file=0x7fffe3a9864f "/home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp", line=530)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:115
    #9  0x00007fffe3447d56 in QCoreApplicationPrivate::checkReceiverThread (receiver=0x555558de1c00) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:526
    #10 0x00007fffe13e3f91 in QApplication::notify (this=0x555555564e20, receiver=0x555558de1c00, e=0x7fffc4f42478) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2590
    #11 0x00007fffe3449dc9 in QCoreApplication::notifyInternal2 (receiver=0x555558de1c00, event=0x7fffc4f42478) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #12 0x00007fffe344aa39 in QCoreApplication::sendEvent (receiver=0x555558de1c00, event=0x7fffc4f42478) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1552
    #13 0x00007fffe148741a in QWidget::~QWidget (this=0x555558de1c00) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:1569
    #14 0x00007fffe1780ab3 in QMenu::~QMenu (this=0x555558de1c00) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmenu.cpp:1798
    #15 0x00007fffe1780b7d in QMenu::~QMenu (this=0x555558de1c00) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmenu.cpp:1782
    #16 0x00007fffe443bf08 in std::default_delete<QMenu>::operator() (this=0x555558de18d8, __ptr=0x555558de1c00) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:93
    #17 0x00007fffe443bd5f in std::unique_ptr<QMenu, std::default_delete<QMenu> >::~unique_ptr (this=0x555558de18d8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:399
    #18 0x00007fffe44379fc in QtMenu::~QtMenu (this=0x555558de1860) at vcl/inc/qt6/../qt5/QtMenu.hxx:40
    #19 0x00007fffe4437a59 in QtMenu::~QtMenu (this=0x555558de1860) at vcl/inc/qt6/../qt5/QtMenu.hxx:40
    #20 0x00007fffee3b8ce8 in std::default_delete<SalMenu>::operator() (this=0x7fff6030d320, __ptr=0x555558de1870) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:93
    #21 0x00007fffee3b8c28 in std::__uniq_ptr_impl<SalMenu, std::default_delete<SalMenu> >::reset (this=0x7fff6030d320, __p=0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:205
    #22 0x00007fffee3b1a2d in std::unique_ptr<SalMenu, std::default_delete<SalMenu> >::reset (this=0x7fff6030d320, __p=0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:504
    #23 0x00007fffee3a27b8 in Menu::dispose (this=0x7fff6030d210) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:225
    #24 0x00007fffee7122a3 in VclReferenceBase::disposeOnce (this=0x7fff6030d210) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    #25 0x00007fffee283ddb in VclPtr<PopupMenu>::disposeAndClear (this=0x7fff60310ba8) at include/vcl/vclptr.hxx:207
    #26 0x00007fffeebdba5c in SalInstanceMenu::~SalInstanceMenu (this=0x7fff60310b80) at /home/michi/development/git/libreoffice/vcl/source/app/salvtables.cxx:974
    #27 0x00007fffeebdbab9 in SalInstanceMenu::~SalInstanceMenu (this=0x7fff60310b80) at /home/michi/development/git/libreoffice/vcl/source/app/salvtables.cxx:971
    #28 0x00007ffff275023b in std::default_delete<weld::Menu>::operator() (this=0x7fffc4f42960, __ptr=0x7fff60310b80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:93
    #29 0x00007ffff273552f in std::unique_ptr<weld::Menu, std::default_delete<weld::Menu> >::~unique_ptr (this=0x7fffc4f42960) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:399
    #30 0x00007ffff2a300fd in (anonymous namespace)::SelectionTypePopup::~SelectionTypePopup (this=0x7fffc4f42950) at /home/michi/development/git/libreoffice/svx/source/stbctrls/selctrl.cxx:48
    #31 0x00007ffff2a2fd68 in SvxSelectionModeControl::StateChangedAtStatusBarControl (this=0x7fff602fa6b0, eState=SfxItemState::DEFAULT, pState=0x7fff6025c330) at /home/michi/development/git/libreoffice/svx/source/stbctrls/selctrl.cxx:130
    #32 0x00007ffff419db7e in SfxStatusBarControl::statusChanged (this=0x7fff602fa6b0, rEvent=...) at /home/michi/development/git/libreoffice/sfx2/source/statbar/stbitem.cxx:263
    #33 0x00007ffff3c9f158 in SfxDispatchController_Impl::addStatusListener (this=0x7fff601c92c0, aListener=uno::Reference to (SvxSelectionModeControl *) 0x7fff602fa6c0, aURL=...)
        at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:841
    #34 0x00007ffff3c9ee04 in SfxOfficeDispatch::addStatusListener (this=0x7fff6030bd90, aListener=uno::Reference to (SvxSelectionModeControl *) 0x7fff602fa6c0, aURL=...)
        at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:283
    #35 0x00007ffff0aa6737 in svt::StatusbarController::bindListener (this=0x7fff602fa6b0) at /home/michi/development/git/libreoffice/svtools/source/uno/statusbarcontroller.cxx:462
    #36 0x00007ffff0aa60c9 in svt::StatusbarController::update (this=0x7fff602fa6b0) at /home/michi/development/git/libreoffice/svtools/source/uno/statusbarcontroller.cxx:169
    #37 0x00007ffff4f4242b in framework::(anonymous namespace)::lcl_UpdateController<std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > > >::operator() (this=0x7fffc4f43117, rElement={...})
        at /home/michi/development/git/libreoffice/framework/source/uielement/statusbarmanager.cxx:69
    #38 0x00007ffff4f3efaf in std::for_each<__gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > >, std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > >, std::bidirectional_iterator_tag>, framework::(anonymous namespace)::lcl_UpdateController<std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > > > > (__first={...}, __last={...}, __f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_algo.h:3786
    #39 0x00007ffff4f3e365 in framework::StatusBarManager::UpdateControllers (this=0x7fff602ccc10) at /home/michi/development/git/libreoffice/framework/source/uielement/statusbarmanager.cxx:269
    #40 0x00007ffff4f40c4b in framework::StatusBarManager::FillStatusBar (this=0x7fff602ccc10, rItemContainer=uno::Reference to (framework::ConstItemContainer *) 0x7fff6029b8c8)
        at /home/michi/development/git/libreoffice/framework/source/uielement/statusbarmanager.cxx:479
    #41 0x00007ffff4f4b7f8 in framework::StatusBarWrapper::initialize (this=0x7fff602d1320, aArguments=uno::Sequence of length 4 = {...}) at /home/michi/development/git/libreoffice/framework/source/uielement/statusbarwrapper.cxx:117
    #42 0x00007ffff4ff9ac4 in framework::MenuBarFactory::CreateUIElement
    [...]

Change-Id: I787bb74644dcf29ccbd6c7a59fe5ca9fc7a50061
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180938
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Jan 30, 2025
Fix crash with the backtrace below when opening sample doc
attachment 198795 from tdf#164885 with macros enabled
when using the qt6 VCL plugin.

sfx2::SfxNotebookBar::StateMethod (frame 80) calls
SystemWindow::SetNotebookBar (frame 79) which calls
ImplBorderWindow::SetNotebookBar (frame 78) which
first disposes and clears the existing
ImplBorderWindow::mpNotebookBar and then creates
a new one.

However, calling the NotebookBar ctor triggers
a recursive call to sfx2::SfxNotebookBar::StateMethod
and SystemWindow::SetNotebookBar again (see frame 4).

When that one calls SystemWindow::SetNotebookBar,
it skips the logic to set a new NoteBookbar, but
the following call to the getter
SystemWindow::GetNotebookBar returns null, because
the previous ImplBorderWindow::SetNotebookBar (in frame 78, s. above)
hasn't finished yet.

For now, prevent such recursion from happening by
returning early in sfx2::SfxNotebookBar::StateMethod
if the NoteBookBar is already in the process of
getting set up.

    Thread 1 received signal SIGSEGV, Segmentation fault.
    0x00007f3030de3eb5 in std::__uniq_ptr_impl<WindowImpl, std::default_delete<WindowImpl> >::_M_ptr (this=0x8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:193
    193           pointer    _M_ptr() const noexcept { return std::get<0>(_M_t); }
    (rr) bt
    #0  0x00007f3030de3eb5 in std::__uniq_ptr_impl<WindowImpl, std::default_delete<WindowImpl> >::_M_ptr (this=0x8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:193
    #1  0x00007f3030de3e95 in std::unique_ptr<WindowImpl, std::default_delete<WindowImpl> >::get (this=0x8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:465
    #2  0x00007f3030e1c6e5 in std::unique_ptr<WindowImpl, std::default_delete<WindowImpl> >::operator bool (this=0x8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:482
    #3  0x00007f30310a1c67 in vcl::Window::Show (this=0x0, bVisible=true, nFlags=ShowFlags::NONE) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:2193
    #4  0x00007f3036cabbf2 in sfx2::SfxNotebookBar::StateMethod (pSysWindow=0x561c07f14910, xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, rUIFile=u"modules/swriter/ui/", bReloadNotebookbar=false)
        at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:524
    #5  0x00007f3036cab110 in sfx2::SfxNotebookBar::StateMethod (rBindings=..., rUIFile=u"modules/swriter/ui/", bReloadNotebookbar=false) at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:422
    #6  0x00007f300b7bc406 in SwDocShell::GetState (this=0x561c07140db0, rSet=SfxItemSet of pool 0x561c07b742c0 with parent 0x0 and Which ranges: [(10338, 10338)])
        at /home/michi/development/git/libreoffice/sw/source/uibase/app/docsh.cxx:1117
    #7  0x00007f300b7bb7cd in SfxStubSwDocShellGetState (pShell=0x561c07140db0, rSet=SfxItemSet of pool 0x561c07b742c0 with parent 0x0 and Which ranges: [(10338, 10338)]) at workdir/SdiTarget/sw/sdi/swslots.hxx:1427
    #8  0x00007f3036822a3a in SfxShell::GetSlotState (this=0x561c07140db0, nSlotId=10338, pIF=0x561c0add4a90, pStateSet=0x0) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:492
    #9  0x00007f30367d1278 in SfxDispatcher::QueryState (this=0x561c0b151ec0, nSlot=10338, rState=...) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:2030
    #10 0x00007f30367cc4e0 in SfxDispatcher::Update_Impl (this=0x561c0b151ec0, bForce=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1135
    #11 0x00007f303682374e in DispatcherUpdate_Impl (pArg=0x561c0b151ec0) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:662
    #12 0x00007f303349e861 in Link<void*, void>::Call (this=0x561c0b87eae0, data=0x561c0b151ec0) at include/tools/link.hxx:105
    #13 0x00007f30334fb3c8 in svtools::AsynchronLink::HandleCall_PostUserEvent (this=0x561c0b87eae0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:66
    #14 0x00007f30334fb31d in svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent (instance=0x561c0b87eae0, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:58
    #15 0x00007f30310c86c1 in Link<void*, void>::Call (this=0x561c0b8811c8, data=0x0) at include/tools/link.hxx:105
    #16 0x00007f30310c48c1 in ImplHandleUserEvent (pSVEvent=0x561c0b8811c0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2285
    #17 0x00007f30310c17ea in ImplWindowFrameProc (_pWindow=0x561c07e19360, nEvent=SalEvent::UserEvent, pEvent=0x561c0b8811c0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2849
    #18 0x00007f3026f5523c in SalFrame::CallCallback (this=0x561c07b6bb80, nEvent=SalEvent::UserEvent, pEvent=0x561c0b8811c0) at vcl/inc/salframe.hxx:311
    #19 0x00007f3026f75d7f in QtInstance::ProcessEvent (this=0x561c066f4840, aEvent=...) at vcl/qt6/../qt5/QtInstance.cxx:527
    #20 0x00007f30317c879d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffd6c8cf850) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #21 0x00007f30317c8676 in SalUserEventList::DispatchUserEvents (this=0x561c066f4878, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #22 0x00007f3026f727c1 in QtInstance::ImplYield (this=0x561c066f4840, bWait=false, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:453
    #23 0x00007f3026f758e1 in QtInstance::DoYield (this=0x561c066f4840, bWait=false, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475
    #24 0x00007f3031893896 in ImplYield (i_bWait=false, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #25 0x00007f30318934ab in Application::Reschedule (i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:409
    #26 0x00007f303736f734 in SbiRuntime::Step (this=0x561c0b2b4e50) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:778
    #27 0x00007f30372638c9 in (anonymous namespace)::RunInitGuard::run (this=0x7ffd6c8d0810) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1017
    #28 0x00007f303726262d in SbModule::Run (this=0x561c0e7f98c0, pMeth=0x561c0d8d6080) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1177
    #29 0x00007f3037261b41 in SbModule::Notify (this=0x561c0e7f98c0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:775
    #30 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c0e851df0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #31 0x00007f303726879b in SbMethod::Broadcast (this=0x561c0e851d20, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2115
    #32 0x00007f30373b2a65 in SbxObject::Call (this=0x561c0e53fa50, rName="interceptor_queryDispatch", pParam=0x561c0cea64d0) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxobj.cxx:273
    #33 0x00007f30371fa7a6 in StarBASIC::Call (this=0x561c0e53fa50, rName="interceptor_queryDispatch", pParam=0x561c0cea64d0) at /home/michi/development/git/libreoffice/basic/source/classes/sb.cxx:1318
    #34 0x00007f303722eeb5 in (anonymous namespace)::BasicAllListener_Impl::firing_impl (this=0x561c0e891750, Event=..., pRet=0x7ffd6c8d1218) at /home/michi/development/git/libreoffice/basic/source/classes/sbunoobj.cxx:3852
    #35 0x00007f303722e9c1 in (anonymous namespace)::BasicAllListener_Impl::approveFiring (this=0x561c0e891750, Event=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbunoobj.cxx:3882
    #36 0x00007f303722eb1c in non-virtual thunk to (anonymous namespace)::BasicAllListener_Impl::approveFiring(com::sun::star::script::AllEventObject const&) () at /home/michi/development/git/libreoffice/instdir/program/libsblo.so
    #37 0x00007f303722f5b8 in (anonymous namespace)::InvocationToAllListenerMapper::invoke (this=0x561c0e891280, FunctionName="queryDispatch", Params=uno::Sequence of length 3 = {...})
        at /home/michi/development/git/libreoffice/basic/source/classes/sbunoobj.cxx:4002
    #38 0x00007f303722f8e4 in non-virtual thunk to (anonymous namespace)::InvocationToAllListenerMapper::invoke(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) () at /home/michi/development/git/libreoffice/instdir/program/libsblo.so
    #39 0x00007f30237370ed in gcc3::callVirtualMethod
        (pThis=0x561c0e8912a8, nVtableIndex=4, pRegisterReturn=0x7ffd6c8d1480, pReturnTypeRef=0x561c0670f930, bSimpleReturn=false, pStack=0x7ffd6c8d14a0, nStack=0, pGPR=0x7ffd6c8d1790, pFPR=0x7ffd6c8d1750)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87
    #40 0x00007f3023735e5b in cpp_call (pThis=0x561c0e8915b0, aVtableSlot=..., pReturnTypeRef=0x561c0670f930, nParams=4, pParams=0x561c0e891c80, pUnoReturn=0x7ffd6c8d19f0, pUnoArgs=0x7ffd6c8d1a20, ppUnoExc=0x7ffd6c8d19d0)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:229
    #41 0x00007f3023735626 in unoInterfaceProxyDispatch (pUnoI=0x561c0e8915b0, pMemberDescr=0x561c0e893b50, pReturn=0x7ffd6c8d19f0, pArgs=0x7ffd6c8d1a20, ppException=0x7ffd6c8d19d0)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:409
    #42 0x00007f30112ef6f2 in stoc_invadp::(anonymous namespace)::AdapterImpl::invoke (this=0x561c0e893aa0, pMemberType=0x561c0e8964c0, pReturn=0x7ffd6c8d1b40, pArgs=0x7ffd6c8d1ae0, ppException=0x7ffd6c8d1c70)
        at /home/michi/development/git/libreoffice/stoc/source/invocation_adapterfactory/iafactory.cxx:456
    #43 0x00007f30112eea48 in stoc_invadp::adapter_dispatch (pUnoI=0x561c0e8923f0, pMemberType=0x561c0e8964c0, pReturn=0x7ffd6c8d1b40, pArgs=0x7ffd6c8d1ae0, ppException=0x7ffd6c8d1c70)
        at /home/michi/development/git/libreoffice/stoc/source/invocation_adapterfactory/iafactory.cxx:604
    #44 0x00007f3023723fdb in cpp2uno_call
        (pThis=0x561c0e895580, pMemberTypeDescr=0x561c0e8964c0, pReturnTypeRef=0x561c082efdb0, nParams=3, pParams=0x561c0e8951c0, gpreg=0x7ffd6c8d2398, fpreg=0x7ffd6c8d23a0, ovrflw=0x7ffd6c8d23f0, pRegisterReturn=0x7ffd6c8d2350)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:190
    #45 0x00007f30237237f5 in cpp_vtable_call (nFunctionIndex=3, nVtableOffset=0, gpreg=0x7ffd6c8d2370, fpreg=0x7ffd6c8d23a0, ovrflw=0x7ffd6c8d23f0, pRegisterReturn=0x7ffd6c8d2350)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:388
    #46 0x00007f30237457a6 in privateSnippetExecutor () at /home/michi/development/git/libreoffice/instdir/program/libgcc3_uno.so
    #47 0x00007f303784bf19 in framework::InterceptionHelper::queryDispatch (this=0x561c07eea430, aURL=..., sTargetFrameName="", nSearchFlags=0) at /home/michi/development/git/libreoffice/framework/source/dispatch/interceptionhelper.cxx:87
    #48 0x00007f303784c03c in non-virtual thunk to framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) () at /home/michi/development/git/libreoffice/instdir/program/libfwklo.so
    #49 0x00007f3037a04d31 in (anonymous namespace)::XFrameImpl::queryDispatch (this=0x561c07ef7d40, aURL=..., sTargetFrameName="", nSearchFlags=0) at /home/michi/development/git/libreoffice/framework/source/services/frame.cxx:2332
    #50 0x00007f3037a08b3c in non-virtual thunk to (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) () at /home/michi/development/git/libreoffice/instdir/program/libfwklo.so
    #51 0x00007f30336b4d74 in svt::ToolboxController::bindListener (this=0x561c0e74d190) at /home/michi/development/git/libreoffice/svtools/source/uno/toolboxcontroller.cxx:513
    #52 0x00007f30336b4987 in svt::ToolboxController::update (this=0x561c0e74d190) at /home/michi/development/git/libreoffice/svtools/source/uno/toolboxcontroller.cxx:235
    #53 0x00007f3036cfff76 in sfx2::sidebar::ControllerFactory::CreateImageController (rxFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, rxParentWindow=uno::Reference to (VCLXToolBox *) 0x561c0cea66b0)
        at /home/michi/development/git/libreoffice/sfx2/source/sidebar/ControllerFactory.cxx:49
    #54 0x00007f3036cf3f71 in sfx2::sidebar::SidebarToolBox::SidebarToolBox (this=0x561c0e74bba0, vtt=0x7f3036ed3bd0 <VTT for sfx2::sidebar::(anonymous namespace)::NotebookbarToolBox+8>, pParentWindow=0x561c0e790ca0)
        at /home/michi/development/git/libreoffice/sfx2/source/sidebar/SidebarToolBox.cxx:75
    #55 0x00007f3036cf6688 in sfx2::sidebar::(anonymous namespace)::NotebookbarToolBox::NotebookbarToolBox (this=0x561c0e74bba0, pParentWindow=0x561c0e790ca0)
        at /home/michi/development/git/libreoffice/sfx2/source/sidebar/SidebarToolBox.cxx:318
    #56 0x00007f3036cf6312 in VclPtrInstance<sfx2::sidebar::(anonymous namespace)::NotebookbarToolBox>::VclPtrInstance<VclPtr<vcl::Window> const&> (this=0x7ffd6c8d2e80, arg=...) at include/vcl/vclptr.hxx:280
    #57 0x00007f3036cf6242 in makeNotebookbarToolBox (rRet=..., pParent=..., rMap=std::__debug::map with 7 elements = {...}) at /home/michi/development/git/libreoffice/sfx2/source/sidebar/SidebarToolBox.cxx:336
    #58 0x00007f3030e685dc in VclBuilder::makeObject (this=0x561c0e6fad80, pParent=0x561c0e790ca0, name="sfxlo-NotebookbarToolBox", id="SectionBottom", rMap=std::__debug::map with 7 elements = {...})
        at /home/michi/development/git/libreoffice/vcl/source/window/builder.cxx:1991
    #59 0x00007f3030e6dd6e in VclBuilder::insertObject
        (this=0x561c0e6fad80, pParent=0x561c0e790ca0, rClass="sfxlo-NotebookbarToolBox", rID="SectionBottom", rProps=std::__debug::map with 7 elements = {...}, rPango=std::__debug::map with 0 elements, rAtk=std::__debug::map with 0 elements) at /home/michi/development/git/libreoffice/vcl/source/window/builder.cxx:2309
    #60 0x00007f3030ebcaba in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0e790ca0, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:234
    #61 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0e790ca0, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #62 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0e0b7e00, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #63 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0e0b7e00, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #64 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0e0b7d10, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #65 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0e0b7d10, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #66 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0e75b7b0, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #67 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0e75b7b0, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #68 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0d9b1f20, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #69 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0d9b1f20, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #70 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0c2d0930, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #71 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0c2d0930, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #72 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0c2d0930, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #73 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0c2d0930, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #74 0x00007f3030e7dd88 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::processUIFile (this=0x561c0e6fad80, pParent=0x561c0c2d0930) at include/vcl/widgetbuilder.hxx:70
    #75 0x00007f3030e598af in VclBuilder::VclBuilder
        (this=0x561c0e6fad80, pParent=0x561c0c2d0930, sUIDir=u"file:///home/michi/development/git/libreoffice/instdir/program/../share/config/soffice.cfg/", sUIFile="modules/swriter/ui/notebookbar.ui", sID="", xFrame=empty uno::Reference, bLegacy=true, pNotebookBarAddonsItem=0x7ffd6c8da430) at /home/michi/development/git/libreoffice/vcl/source/window/builder.cxx:531
    #76 0x00007f30311c39d2 in NotebookBar::NotebookBar
        (this=0x561c0c2d0930, pParent=0x561c07ed3110, rID="NotebookBar", rUIXMLDescription="modules/swriter/ui/notebookbar.ui", rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, aNotebookBarAddonsItem=...)
        at /home/michi/development/git/libreoffice/vcl/source/control/notebookbar.cxx:100
    #77 0x00007f3030e3eae4 in VclPtr<NotebookBar>::Create<ImplBorderWindow*, char const (&) [12], rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, NotebookBarAddonsItem const&>
        (arg=@0x7ffd6c8da0b8: 0x561c07ed3110, arg=..., arg="modules/swriter/ui/notebookbar.ui", arg=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, arg=...) at include/vcl/vclptr.hxx:129
    #78 0x00007f3030e3ca45 in ImplBorderWindow::SetNotebookBar
        (this=0x561c07ed3110, rUIXMLDescription="modules/swriter/ui/notebookbar.ui", rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, aNotebookBarAddonsItem=...)
        at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1945
    #79 0x00007f30310372ac in SystemWindow::SetNotebookBar
        (this=0x561c07f14910, rUIXMLDescription="modules/swriter/ui/notebookbar.ui", rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, aNotebookBarAddonsItem=..., bReloadNotebookbar=true)
        at /home/michi/development/git/libreoffice/vcl/source/window/syswin.cxx:916
    #80 0x00007f3036cabba1 in sfx2::SfxNotebookBar::StateMethod (pSysWindow=0x561c07f14910, xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, rUIFile=u"modules/swriter/ui/", bReloadNotebookbar=true)
        at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:522
    #81 0x00007f3036cab110 in sfx2::SfxNotebookBar::StateMethod (rBindings=..., rUIFile=u"modules/swriter/ui/", bReloadNotebookbar=true) at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:422
    #82 0x00007f3036cad6a2 in sfx2::SfxNotebookBar::ReloadNotebookBar (sUIPath=u"modules/swriter/ui/") at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:683
    #83 0x00007f3036e36b9b in SfxViewFrame::Notify (this=0x561c0b023e80, rHint=...) at /home/michi/development/git/libreoffice/sfx2/source/view/viewfrm.cxx:1574
    #84 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c07140db0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #85 0x00007f303665e339 in (anonymous namespace)::SfxEventAsyncer_Impl::IdleHdl (this=0x561c0c330660, pAsyncIdle=0x561c0c3318b0) at /home/michi/development/git/libreoffice/sfx2/source/appl/appcfg.cxx:109
    #86 0x00007f303665dead in (anonymous namespace)::SfxEventAsyncer_Impl::LinkStubIdleHdl (instance=0x561c0c330660, data=0x561c0c3318b0) at /home/michi/development/git/libreoffice/sfx2/source/appl/appcfg.cxx:102
    #87 0x00007f30318b9641 in Link<Timer*, void>::Call (this=0x561c0c3318d0, data=0x561c0c3318b0) at include/tools/link.hxx:105
    #88 0x00007f30318b94ac in Timer::Invoke (this=0x561c0c3318b0) at /home/michi/development/git/libreoffice/vcl/source/app/timer.cxx:75
    #89 0x00007f30318680b8 in Scheduler::CallbackTaskScheduling () at /home/michi/development/git/libreoffice/vcl/source/app/scheduler.cxx:509
    #90 0x00007f302703fad2 in SalTimer::CallCallback (this=0x561c07960ba0) at vcl/inc/saltimer.hxx:53
    #91 0x00007f302703ef6a in QtTimer::timeoutActivated (this=0x561c07960b90) at vcl/qt6/../qt5/QtTimer.cxx:51
    #92 0x00007f30270400a1 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)::{lambda()#1}::operator()() const (this=0x7ffd6c8dd310)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)::{lambda()#1}&&) (args=0x7ffd6c8dd6d0, fn=...)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #94 0x00007f302703ff0b in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)
        (f=(void (QtTimer::*)(QtTimer * const)) 0x7f302703ee70 <QtTimer::timeoutActivated()>, o=0x561c07960b90, arg=0x7ffd6c8dd6d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #95 0x00007f302703fe8d in QtPrivate::FunctionPointer<void (QtTimer::*)()>::call<QtPrivate::List<>, void>(void (QtTimer::*)(), QtTimer*, void**)
        (f=(void (QtTimer::*)(QtTimer * const)) 0x7f302703ee70 <QtTimer::timeoutActivated()>, o=0x561c07960b90, arg=0x7ffd6c8dd6d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #96 0x00007f302703fdb6 in QtPrivate::QCallableObject<void (QtTimer::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x561c07961090, r=0x561c07960b90, a=0x7ffd6c8dd6d0, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #97 0x00007f302605fc52 in QtPrivate::QSlotObjectBase::call (this=0x561c07961090, r=0x561c07960b90, a=0x7ffd6c8dd6d0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #98 0x00007f302611e6e4 in doActivate<false> (sender=0x561c07960bb0, signal_index=3, argv=0x7ffd6c8dd6d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4128
    #99 0x00007f30261141b3 in QMetaObject::activate (sender=0x561c07960bb0, m=0x7f3026a10b18 <QTimer::staticMetaObject>, local_signal_index=0, argv=0x7ffd6c8dd6d0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4188
    #100 0x00007f302614bb9b in QMetaObject::activate<void, QTimer::QPrivateSignal> (sender=0x561c07960bb0, mo=0x7f3026a10b18 <QTimer::staticMetaObject>, local_signal_index=0, ret=0x0, args=...)
        at qtbase/src/corelib/kernel/qobjectdefs.h:306
    #101 0x00007f302614a3d5 in QTimer::timeout (this=0x561c07960bb0, _t1=...) at qtbase/src/corelib/Core_autogen/include/moc_qtimer.cpp:182
    #102 0x00007f302614a38f in QTimer::timerEvent (this=0x561c07960bb0, e=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtimer.cpp:285
    #103 0x00007f302610aef6 in QObject::event (this=0x561c07960bb0, e=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1404
    #104 0x00007f3023fe2dc0 in QApplicationPrivate::notify_helper (this=0x561c06676ae0, receiver=0x561c07960bb0, e=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #105 0x00007f3023fe6cdd in QApplication::notify (this=0x561c06663e20, receiver=0x561c07960bb0, e=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #106 0x00007f3026049dc9 in QCoreApplication::notifyInternal2 (receiver=0x561c07960bb0, event=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #107 0x00007f302604aa39 in QCoreApplication::sendEvent (receiver=0x561c07960bb0, event=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1552
    #108 0x00007f30263dd90f in QTimerInfoList::activateTimers (this=0x561c066eff30) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtimerinfo_unix.cpp:426
    #109 0x00007f302663b565 in timerSourceDispatch (source=0x561c066efed0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:152
    #110 0x00007f302663b844 in idleTimerSourceDispatch (source=0x561c066eff70) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:199
    #111 0x00007f302cd0b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #112 0x00007f302cd0da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #113 0x00007f302cd0e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #114 0x00007f302663a30b in QEventDispatcherGlib::processEvents (this=0x561c06667e80, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #115 0x00007f3025776a98 in QPAEventDispatcherGlib::processEvents (this=0x561c06667e80, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #116 0x00007f3026063980 in QEventLoop::processEvents (this=0x7ffd6c8de888, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:104
    #117 0x00007f3026063bd3 in QEventLoop::exec (this=0x7ffd6c8de888, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:186
    #118 0x00007f3024483eb7 in QDialog::exec (this=0x561c0e897c80) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:575
    #119 0x00007f3026fe0cfb in QtInstanceMessageDialog::run (this=0x561c0e7811b0) at vcl/qt6/../qt5/QtInstanceMessageDialog.cxx:159
    #120 0x00007f30373468c0 in SbRtl_MsgBox (rPar=...) at /home/michi/development/git/libreoffice/basic/source/runtime/methods.cxx:4242
    #121 0x00007f3037327ca2 in SbiStdObject::Notify (this=0x561c0e785e70, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/runtime/stdobj.cxx:1103
    #122 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c0e7b5620, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #123 0x00007f30373c7ad4 in SbxVariable::Broadcast (this=0x561c0e856200, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:154
    #124 0x00007f30373c04fd in SbxValue::SbxValue (this=0x561c0c2d1e10, vtt=0x7f30373eb6d0 <VTT for SbxMethod+16>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:68
    #125 0x00007f30373c6674 in SbxVariable::SbxVariable (this=0x561c0c2d1e10, vtt=0x7f30373eb6c8 <VTT for SbxMethod+8>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:48
    #126 0x00007f30373b6f4a in SbxMethod::SbxMethod (this=0x561c0c2d1e10, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxobj.cxx:842
    #127 0x00007f303737782a in SbiRuntime::FindElement (this=0x561c0e890580, pObj=0x561c0e785e70, nOp1=32786, nOp2=2, nNotFound=..., bLocal=false, bStatic=false)
        at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:3701
    #128 0x00007f303736ab71 in SbiRuntime::StepRTL (this=0x561c0e890580, nOp1=32786, nOp2=2) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4124
    #129 0x00007f303736fa77 in SbiRuntime::Step (this=0x561c0e890580) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:808
    #130 0x00007f30372638c9 in (anonymous namespace)::RunInitGuard::run (this=0x7ffd6c8df5d0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1017
    #131 0x00007f303726262d in SbModule::Run (this=0x561c0e7f98c0, pMeth=0x561c0e886740) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1177
    #132 0x00007f3037261b41 in SbModule::Notify (this=0x561c0e7f98c0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:775
    #133 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c0e850ce0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #134 0x00007f303726879b in SbMethod::Broadcast (this=0x561c0e850d60, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2115
    #135 0x00007f30373c04fd in SbxValue::SbxValue (this=0x561c0e87af00, vtt=0x7f30373eb6d0 <VTT for SbxMethod+16>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:68
    #136 0x00007f30373c6674 in SbxVariable::SbxVariable (this=0x561c0e87af00, vtt=0x7f30373eb6c8 <VTT for SbxMethod+8>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:48
    #137 0x00007f30373b6f4a in SbxMethod::SbxMethod (this=0x561c0e87af00, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxobj.cxx:842
    #138 0x00007f303737782a in SbiRuntime::FindElement (this=0x561c0e854db0, pObj=0x561c0e7f98c0, nOp1=32775, nOp2=0, nNotFound=..., bLocal=true, bStatic=false)
        at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:3701
    #139 0x00007f3037378e95 in SbiRuntime::StepFIND_Impl (this=0x561c0e854db0, pObj=0x561c0e7f98c0, nOp1=32775, nOp2=0, nNotFound=..., bStatic=false) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4134
    #140 0x00007f303736ac0d in SbiRuntime::StepFIND (this=0x561c0e854db0, nOp1=32775, nOp2=0) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4140
    #141 0x00007f303736fa77 in SbiRuntime::Step (this=0x561c0e854db0) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:808
    #142 0x00007f30372638c9 in (anonymous namespace)::RunInitGuard::run (this=0x7ffd6c8e04d0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1017
    #143 0x00007f303726262d in SbModule::Run (this=0x561c0e7f98c0, pMeth=0x561c0e8544a0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1177
    #144 0x00007f3037261b41 in SbModule::Notify (this=0x561c0e7f98c0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:775
    #145 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c0e850490, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #146 0x00007f303726879b in SbMethod::Broadcast (this=0x561c0e84e6b0, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2115
    #147 0x00007f30373c0ef3 in SbxValue::Get (this=0x561c0e84e6b0, rRes=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:290
    #148 0x00007f303726848b in SbMethod::Call (this=0x561c0e84e6b0, pRet=0x561c0e854c20, pCaller=0x0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2071
    #149 0x00007f301134bcfe in basprov::BasicScriptImpl::invoke (this=0x561c0e807880, aParams=uno::Sequence of length 1 = {...}, aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence)
        at /home/michi/development/git/libreoffice/scripting/source/basprov/basscript.cxx:262
    #150 0x00007f301134c4ac in non-virtual thunk to basprov::BasicScriptImpl::invoke(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) () at /home/michi/development/git/libreoffice/instdir/program/../program/libbasprovlo.so
    #151 0x00007f3011258dc7 in scripting_protocolhandler::ScriptProtocolHandler::dispatchWithNotification (this=0x561c0b213f70, aURL=..., lArgs=uno::Sequence of length 1 = {...}, xListener=empty uno::Reference)
        at /home/michi/development/git/libreoffice/scripting/source/protocolhandler/scripthandler.cxx:213
    #152 0x00007f301125a2ef in scripting_protocolhandler::ScriptProtocolHandler::dispatch (this=0x561c0b213f70, aURL=..., lArgs=uno::Sequence of length 1 = {...})
        at /home/michi/development/git/libreoffice/scripting/source/protocolhandler/scripthandler.cxx:286
    #153 0x00007f3036cbe0ff in SfxEvents_Impl::Execute (aProperties=uno::Sequence of length 2 = {...}, aTrigger=..., pDoc=0x561c07140db0) at /home/michi/development/git/libreoffice/sfx2/source/notify/eventsupplier.cxx:268
    #154 0x00007f3036cbe474 in SfxEvents_Impl::documentEventOccured (this=0x561c0b104010, aEvent=...) at /home/michi/development/git/libreoffice/sfx2/source/notify/eventsupplier.cxx:293
    #155 0x00007f3036c40e77 in (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>::operator()
        (this=0x7ffd6c8e27c0, listener=uno::Reference to (SfxEvents_Impl *) 0x561c0b104040) at /home/michi/development/git/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3335
    #156 0x00007f3036c31e05 in comphelper::OInterfaceContainerHelper3<com::sun::star::document::XDocumentEventListener>::forEach<(anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> > (this=0x561c0a9accf8, func=...) at include/comphelper/interfacecontainer3.hxx:275
    #157 0x00007f3036c31553 in SfxBaseModel::postEvent_Impl (this=0x561c0adc4440, aName="OnViewCreated", xController=uno::Reference to (SwXTextView *) 0x561c0b116e18, supplement=uno::Any(void))
        at /home/michi/development/git/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3369
    #158 0x00007f3036c30a7d in SfxBaseModel::Notify (this=0x561c0adc4440, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3002
    #159 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c07140db0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #160 0x00007f303665db14 in SfxApplication::NotifyEvent (this=0x561c07e29130, rEventHint=..., bSynchron=true) at /home/michi/development/git/libreoffice/sfx2/source/appl/appcfg.cxx:343
    #161 0x00007f3036e057ee in SfxBaseController::attachFrame (this=0x561c0b116df0, xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0)
        at /home/michi/development/git/libreoffice/sfx2/source/view/sfxbasecontroller.cxx:536
    #162 0x00007f3036dd6519 in utl::ConnectFrameControllerModel
        (xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, xController=uno::Reference to (SwXTextView *) 0x561c0b116e18, xModel=uno::Reference to (SwXTextDocument *) 0x561c0adc44d0)
        at include/unotools/fcm.hxx:57
    #163 0x00007f3036dd2b21 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView
        (i_rModel=uno::Reference to (SwXTextDocument *) 0x561c0adc44d0, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, i_rViewFactoryArgs=..., i_rViewName="Default")
        at /home/michi/development/git/libreoffice/sfx2/source/view/frmload.cxx:585
    #164 0x00007f3036dd00bc in (anonymous namespace)::SfxFrameLoader_Impl::load (this=0x561c07efffa0, rArgs=uno::Sequence of length 12 = {...}, _rTargetFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0)
        at /home/michi/development/git/libreoffice/sfx2/source/view/frmload.cxx:764
    #165 0x00007f30379c3004 in framework::LoadEnv::impl_loadContent (this=0x561c078f1e18) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:1180
    #166 0x00007f30379c0165 in framework::LoadEnv::start (this=0x561c078f1e18) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:415
    #167 0x00007f30379bde12 in framework::LoadEnv::startLoading
        (this=0x561c078f1e18, sURL="file:///tmp/hyperlink.fodt", lMediaDescriptor=uno::Sequence of length 4 = {...}, xBaseFrame=uno::Reference to (framework::Desktop *) 0x561c079aab88, sTarget="_default", nSearchFlags=0, eFeature=(LoadEnvFeatures::WorkWithUI | LoadEnvFeatures::AllowContentHandler)) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:311
    #168 0x00007f3037856cd1 in framework::LoadDispatcher::impl_dispatch (this=0x561c078f1dc0, rURL=..., lArguments=uno::Sequence of length 4 = {...}, xListener=empty uno::Reference)
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:107
    #169 0x00007f3037857a31 in framework::LoadDispatcher::dispatchWithReturnValue (this=0x561c078f1dc0, rURL=..., lArguments=uno::Sequence of length 4 = {...})
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:60
    #170 0x00007f3037857ad4 in non-virtual thunk to framework::LoadDispatcher::dispatchWithReturnValue(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:60
    #171 0x00007f3038e10e00 in comphelper::SynchronousDispatch::dispatch
        (xStartPoint=uno::Reference to (framework::Desktop *) 0x561c079aab78, sURL="file:///tmp/hyperlink.fodt", sTarget="_default", lArguments=uno::Sequence of length 4 = {...})
        at /home/michi/development/git/libreoffice/comphelper/source/misc/synchronousdispatch.cxx:62
    #172 0x00007f303a774d3d in desktop::DispatchWatcher::executeDispatchRequests (this=0x561c082f00b0, aDispatchRequestsList=std::__debug::vector of length 1, capacity 1 = {...}, bNoTerminate=false)
        at /home/michi/development/git/libreoffice/desktop/source/app/dispatchwatcher.cxx:529
    #173 0x00007f303a79307a in desktop::RequestHandler::ExecuteCmdLineRequests (aRequest=..., noTerminate=false) at /home/michi/development/git/libreoffice/desktop/source/app/officeipcthread.cxx:1347
    #174 0x00007f303a72d937 in desktop::Desktop::OpenClients () at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:2203
    #175 0x00007f303a72b8c3 in desktop::Desktop::OpenClients_Impl (this=0x7ffd6c8eaae0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1979
    #176 0x00007f303a729f5d in desktop::Desktop::LinkStubOpenClients_Impl (instance=0x7ffd6c8eaae0, data=0x0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1963
    #177 0x00007f30310c86c1 in Link<void*, void>::Call (this=0x561c07f3e718, data=0x0) at include/tools/link.hxx:105
    #178 0x00007f30310c48c1 in ImplHandleUserEvent (pSVEvent=0x561c07f3e710) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2285
    #179 0x00007f30310c17ea in ImplWindowFrameProc (_pWindow=0x561c07e19360, nEvent=SalEvent::UserEvent, pEvent=0x561c07f3e710) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2849
    #180 0x00007f3026f5523c in SalFrame::CallCallback (this=0x561c07b6bb80, nEvent=SalEvent::UserEvent, pEvent=0x561c07f3e710) at vcl/inc/salframe.hxx:311
    #181 0x00007f3026f75d7f in QtInstance::ProcessEvent (this=0x561c066f4840, aEvent=...) at vcl/qt6/../qt5/QtInstance.cxx:527
    #182 0x00007f30317c879d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffd6c8e8f20) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #183 0x00007f30317c8676 in SalUserEventList::DispatchUserEvents (this=0x561c066f4878, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #184 0x00007f3026f727c1 in QtInstance::ImplYield (this=0x561c066f4840, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:453
    #185 0x00007f3026f758e1 in QtInstance::DoYield (this=0x561c066f4840, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475
    #186 0x00007f3031893896 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #187 0x00007f30318931af in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #188 0x00007f3031892f90 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #189 0x00007f303a727f39 in desktop::Desktop::Main (this=0x7ffd6c8eaae0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #190 0x00007f30318b4d16 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #191 0x00007f30318b6909 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #192 0x00007f303a7a181a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #193 0x0000561bdaf4ba6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #194 0x0000561bdaf4ba47 in main (argc=2, argv=0x7ffd6c8eace8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Ie10498c60554783b33aaa03070eebd8252ed9561
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180951
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Feb 1, 2025
Fix crash with the backtrace below when opening sample doc
attachment 198795 from tdf#164885 with macros enabled
when using the qt6 VCL plugin.

sfx2::SfxNotebookBar::StateMethod (frame 80) calls
SystemWindow::SetNotebookBar (frame 79) which calls
ImplBorderWindow::SetNotebookBar (frame 78) which
first disposes and clears the existing
ImplBorderWindow::mpNotebookBar and then creates
a new one.

However, calling the NotebookBar ctor triggers
a recursive call to sfx2::SfxNotebookBar::StateMethod
and SystemWindow::SetNotebookBar again (see frame 4).

When that one calls SystemWindow::SetNotebookBar,
it skips the logic to set a new NoteBookbar, but
the following call to the getter
SystemWindow::GetNotebookBar returns null, because
the previous ImplBorderWindow::SetNotebookBar (in frame 78, s. above)
hasn't finished yet.

For now, prevent such recursion from happening by
returning early in sfx2::SfxNotebookBar::StateMethod
if the NoteBookBar is already in the process of
getting set up.

    Thread 1 received signal SIGSEGV, Segmentation fault.
    0x00007f3030de3eb5 in std::__uniq_ptr_impl<WindowImpl, std::default_delete<WindowImpl> >::_M_ptr (this=0x8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:193
    193           pointer    _M_ptr() const noexcept { return std::get<0>(_M_t); }
    (rr) bt
    #0  0x00007f3030de3eb5 in std::__uniq_ptr_impl<WindowImpl, std::default_delete<WindowImpl> >::_M_ptr (this=0x8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:193
    #1  0x00007f3030de3e95 in std::unique_ptr<WindowImpl, std::default_delete<WindowImpl> >::get (this=0x8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:465
    #2  0x00007f3030e1c6e5 in std::unique_ptr<WindowImpl, std::default_delete<WindowImpl> >::operator bool (this=0x8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:482
    #3  0x00007f30310a1c67 in vcl::Window::Show (this=0x0, bVisible=true, nFlags=ShowFlags::NONE) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:2193
    #4  0x00007f3036cabbf2 in sfx2::SfxNotebookBar::StateMethod (pSysWindow=0x561c07f14910, xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, rUIFile=u"modules/swriter/ui/", bReloadNotebookbar=false)
        at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:524
    #5  0x00007f3036cab110 in sfx2::SfxNotebookBar::StateMethod (rBindings=..., rUIFile=u"modules/swriter/ui/", bReloadNotebookbar=false) at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:422
    #6  0x00007f300b7bc406 in SwDocShell::GetState (this=0x561c07140db0, rSet=SfxItemSet of pool 0x561c07b742c0 with parent 0x0 and Which ranges: [(10338, 10338)])
        at /home/michi/development/git/libreoffice/sw/source/uibase/app/docsh.cxx:1117
    #7  0x00007f300b7bb7cd in SfxStubSwDocShellGetState (pShell=0x561c07140db0, rSet=SfxItemSet of pool 0x561c07b742c0 with parent 0x0 and Which ranges: [(10338, 10338)]) at workdir/SdiTarget/sw/sdi/swslots.hxx:1427
    #8  0x00007f3036822a3a in SfxShell::GetSlotState (this=0x561c07140db0, nSlotId=10338, pIF=0x561c0add4a90, pStateSet=0x0) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:492
    #9  0x00007f30367d1278 in SfxDispatcher::QueryState (this=0x561c0b151ec0, nSlot=10338, rState=...) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:2030
    #10 0x00007f30367cc4e0 in SfxDispatcher::Update_Impl (this=0x561c0b151ec0, bForce=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1135
    #11 0x00007f303682374e in DispatcherUpdate_Impl (pArg=0x561c0b151ec0) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:662
    #12 0x00007f303349e861 in Link<void*, void>::Call (this=0x561c0b87eae0, data=0x561c0b151ec0) at include/tools/link.hxx:105
    #13 0x00007f30334fb3c8 in svtools::AsynchronLink::HandleCall_PostUserEvent (this=0x561c0b87eae0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:66
    #14 0x00007f30334fb31d in svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent (instance=0x561c0b87eae0, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:58
    #15 0x00007f30310c86c1 in Link<void*, void>::Call (this=0x561c0b8811c8, data=0x0) at include/tools/link.hxx:105
    #16 0x00007f30310c48c1 in ImplHandleUserEvent (pSVEvent=0x561c0b8811c0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2285
    #17 0x00007f30310c17ea in ImplWindowFrameProc (_pWindow=0x561c07e19360, nEvent=SalEvent::UserEvent, pEvent=0x561c0b8811c0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2849
    #18 0x00007f3026f5523c in SalFrame::CallCallback (this=0x561c07b6bb80, nEvent=SalEvent::UserEvent, pEvent=0x561c0b8811c0) at vcl/inc/salframe.hxx:311
    #19 0x00007f3026f75d7f in QtInstance::ProcessEvent (this=0x561c066f4840, aEvent=...) at vcl/qt6/../qt5/QtInstance.cxx:527
    #20 0x00007f30317c879d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffd6c8cf850) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #21 0x00007f30317c8676 in SalUserEventList::DispatchUserEvents (this=0x561c066f4878, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #22 0x00007f3026f727c1 in QtInstance::ImplYield (this=0x561c066f4840, bWait=false, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:453
    #23 0x00007f3026f758e1 in QtInstance::DoYield (this=0x561c066f4840, bWait=false, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475
    #24 0x00007f3031893896 in ImplYield (i_bWait=false, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #25 0x00007f30318934ab in Application::Reschedule (i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:409
    #26 0x00007f303736f734 in SbiRuntime::Step (this=0x561c0b2b4e50) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:778
    #27 0x00007f30372638c9 in (anonymous namespace)::RunInitGuard::run (this=0x7ffd6c8d0810) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1017
    #28 0x00007f303726262d in SbModule::Run (this=0x561c0e7f98c0, pMeth=0x561c0d8d6080) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1177
    #29 0x00007f3037261b41 in SbModule::Notify (this=0x561c0e7f98c0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:775
    #30 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c0e851df0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #31 0x00007f303726879b in SbMethod::Broadcast (this=0x561c0e851d20, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2115
    #32 0x00007f30373b2a65 in SbxObject::Call (this=0x561c0e53fa50, rName="interceptor_queryDispatch", pParam=0x561c0cea64d0) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxobj.cxx:273
    #33 0x00007f30371fa7a6 in StarBASIC::Call (this=0x561c0e53fa50, rName="interceptor_queryDispatch", pParam=0x561c0cea64d0) at /home/michi/development/git/libreoffice/basic/source/classes/sb.cxx:1318
    #34 0x00007f303722eeb5 in (anonymous namespace)::BasicAllListener_Impl::firing_impl (this=0x561c0e891750, Event=..., pRet=0x7ffd6c8d1218) at /home/michi/development/git/libreoffice/basic/source/classes/sbunoobj.cxx:3852
    #35 0x00007f303722e9c1 in (anonymous namespace)::BasicAllListener_Impl::approveFiring (this=0x561c0e891750, Event=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbunoobj.cxx:3882
    #36 0x00007f303722eb1c in non-virtual thunk to (anonymous namespace)::BasicAllListener_Impl::approveFiring(com::sun::star::script::AllEventObject const&) () at /home/michi/development/git/libreoffice/instdir/program/libsblo.so
    #37 0x00007f303722f5b8 in (anonymous namespace)::InvocationToAllListenerMapper::invoke (this=0x561c0e891280, FunctionName="queryDispatch", Params=uno::Sequence of length 3 = {...})
        at /home/michi/development/git/libreoffice/basic/source/classes/sbunoobj.cxx:4002
    #38 0x00007f303722f8e4 in non-virtual thunk to (anonymous namespace)::InvocationToAllListenerMapper::invoke(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) () at /home/michi/development/git/libreoffice/instdir/program/libsblo.so
    #39 0x00007f30237370ed in gcc3::callVirtualMethod
        (pThis=0x561c0e8912a8, nVtableIndex=4, pRegisterReturn=0x7ffd6c8d1480, pReturnTypeRef=0x561c0670f930, bSimpleReturn=false, pStack=0x7ffd6c8d14a0, nStack=0, pGPR=0x7ffd6c8d1790, pFPR=0x7ffd6c8d1750)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87
    #40 0x00007f3023735e5b in cpp_call (pThis=0x561c0e8915b0, aVtableSlot=..., pReturnTypeRef=0x561c0670f930, nParams=4, pParams=0x561c0e891c80, pUnoReturn=0x7ffd6c8d19f0, pUnoArgs=0x7ffd6c8d1a20, ppUnoExc=0x7ffd6c8d19d0)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:229
    #41 0x00007f3023735626 in unoInterfaceProxyDispatch (pUnoI=0x561c0e8915b0, pMemberDescr=0x561c0e893b50, pReturn=0x7ffd6c8d19f0, pArgs=0x7ffd6c8d1a20, ppException=0x7ffd6c8d19d0)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:409
    #42 0x00007f30112ef6f2 in stoc_invadp::(anonymous namespace)::AdapterImpl::invoke (this=0x561c0e893aa0, pMemberType=0x561c0e8964c0, pReturn=0x7ffd6c8d1b40, pArgs=0x7ffd6c8d1ae0, ppException=0x7ffd6c8d1c70)
        at /home/michi/development/git/libreoffice/stoc/source/invocation_adapterfactory/iafactory.cxx:456
    #43 0x00007f30112eea48 in stoc_invadp::adapter_dispatch (pUnoI=0x561c0e8923f0, pMemberType=0x561c0e8964c0, pReturn=0x7ffd6c8d1b40, pArgs=0x7ffd6c8d1ae0, ppException=0x7ffd6c8d1c70)
        at /home/michi/development/git/libreoffice/stoc/source/invocation_adapterfactory/iafactory.cxx:604
    #44 0x00007f3023723fdb in cpp2uno_call
        (pThis=0x561c0e895580, pMemberTypeDescr=0x561c0e8964c0, pReturnTypeRef=0x561c082efdb0, nParams=3, pParams=0x561c0e8951c0, gpreg=0x7ffd6c8d2398, fpreg=0x7ffd6c8d23a0, ovrflw=0x7ffd6c8d23f0, pRegisterReturn=0x7ffd6c8d2350)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:190
    #45 0x00007f30237237f5 in cpp_vtable_call (nFunctionIndex=3, nVtableOffset=0, gpreg=0x7ffd6c8d2370, fpreg=0x7ffd6c8d23a0, ovrflw=0x7ffd6c8d23f0, pRegisterReturn=0x7ffd6c8d2350)
        at /home/michi/development/git/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:388
    #46 0x00007f30237457a6 in privateSnippetExecutor () at /home/michi/development/git/libreoffice/instdir/program/libgcc3_uno.so
    #47 0x00007f303784bf19 in framework::InterceptionHelper::queryDispatch (this=0x561c07eea430, aURL=..., sTargetFrameName="", nSearchFlags=0) at /home/michi/development/git/libreoffice/framework/source/dispatch/interceptionhelper.cxx:87
    #48 0x00007f303784c03c in non-virtual thunk to framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) () at /home/michi/development/git/libreoffice/instdir/program/libfwklo.so
    #49 0x00007f3037a04d31 in (anonymous namespace)::XFrameImpl::queryDispatch (this=0x561c07ef7d40, aURL=..., sTargetFrameName="", nSearchFlags=0) at /home/michi/development/git/libreoffice/framework/source/services/frame.cxx:2332
    #50 0x00007f3037a08b3c in non-virtual thunk to (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) () at /home/michi/development/git/libreoffice/instdir/program/libfwklo.so
    #51 0x00007f30336b4d74 in svt::ToolboxController::bindListener (this=0x561c0e74d190) at /home/michi/development/git/libreoffice/svtools/source/uno/toolboxcontroller.cxx:513
    #52 0x00007f30336b4987 in svt::ToolboxController::update (this=0x561c0e74d190) at /home/michi/development/git/libreoffice/svtools/source/uno/toolboxcontroller.cxx:235
    #53 0x00007f3036cfff76 in sfx2::sidebar::ControllerFactory::CreateImageController (rxFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, rxParentWindow=uno::Reference to (VCLXToolBox *) 0x561c0cea66b0)
        at /home/michi/development/git/libreoffice/sfx2/source/sidebar/ControllerFactory.cxx:49
    #54 0x00007f3036cf3f71 in sfx2::sidebar::SidebarToolBox::SidebarToolBox (this=0x561c0e74bba0, vtt=0x7f3036ed3bd0 <VTT for sfx2::sidebar::(anonymous namespace)::NotebookbarToolBox+8>, pParentWindow=0x561c0e790ca0)
        at /home/michi/development/git/libreoffice/sfx2/source/sidebar/SidebarToolBox.cxx:75
    #55 0x00007f3036cf6688 in sfx2::sidebar::(anonymous namespace)::NotebookbarToolBox::NotebookbarToolBox (this=0x561c0e74bba0, pParentWindow=0x561c0e790ca0)
        at /home/michi/development/git/libreoffice/sfx2/source/sidebar/SidebarToolBox.cxx:318
    #56 0x00007f3036cf6312 in VclPtrInstance<sfx2::sidebar::(anonymous namespace)::NotebookbarToolBox>::VclPtrInstance<VclPtr<vcl::Window> const&> (this=0x7ffd6c8d2e80, arg=...) at include/vcl/vclptr.hxx:280
    #57 0x00007f3036cf6242 in makeNotebookbarToolBox (rRet=..., pParent=..., rMap=std::__debug::map with 7 elements = {...}) at /home/michi/development/git/libreoffice/sfx2/source/sidebar/SidebarToolBox.cxx:336
    #58 0x00007f3030e685dc in VclBuilder::makeObject (this=0x561c0e6fad80, pParent=0x561c0e790ca0, name="sfxlo-NotebookbarToolBox", id="SectionBottom", rMap=std::__debug::map with 7 elements = {...})
        at /home/michi/development/git/libreoffice/vcl/source/window/builder.cxx:1991
    #59 0x00007f3030e6dd6e in VclBuilder::insertObject
        (this=0x561c0e6fad80, pParent=0x561c0e790ca0, rClass="sfxlo-NotebookbarToolBox", rID="SectionBottom", rProps=std::__debug::map with 7 elements = {...}, rPango=std::__debug::map with 0 elements, rAtk=std::__debug::map with 0 elements) at /home/michi/development/git/libreoffice/vcl/source/window/builder.cxx:2309
    #60 0x00007f3030ebcaba in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0e790ca0, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:234
    #61 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0e790ca0, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #62 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0e0b7e00, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #63 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0e0b7e00, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #64 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0e0b7d10, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #65 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0e0b7d10, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #66 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0e75b7b0, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #67 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0e75b7b0, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #68 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0d9b1f20, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #69 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0d9b1f20, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #70 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0c2d0930, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #71 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0c2d0930, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #72 0x00007f3030ebcb92 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleObject
        (this=0x561c0e6fad80, pParent=0x561c0c2d0930, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:237
    #73 0x00007f3030ebb52d in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::handleChild (this=0x561c0e6fad80, pParent=0x561c0c2d0930, pAtkProps=0x0, reader=..., bToolbarItem=false)
        at include/vcl/widgetbuilder.hxx:131
    #74 0x00007f3030e7dd88 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu> >::processUIFile (this=0x561c0e6fad80, pParent=0x561c0c2d0930) at include/vcl/widgetbuilder.hxx:70
    #75 0x00007f3030e598af in VclBuilder::VclBuilder
        (this=0x561c0e6fad80, pParent=0x561c0c2d0930, sUIDir=u"file:///home/michi/development/git/libreoffice/instdir/program/../share/config/soffice.cfg/", sUIFile="modules/swriter/ui/notebookbar.ui", sID="", xFrame=empty uno::Reference, bLegacy=true, pNotebookBarAddonsItem=0x7ffd6c8da430) at /home/michi/development/git/libreoffice/vcl/source/window/builder.cxx:531
    #76 0x00007f30311c39d2 in NotebookBar::NotebookBar
        (this=0x561c0c2d0930, pParent=0x561c07ed3110, rID="NotebookBar", rUIXMLDescription="modules/swriter/ui/notebookbar.ui", rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, aNotebookBarAddonsItem=...)
        at /home/michi/development/git/libreoffice/vcl/source/control/notebookbar.cxx:100
    #77 0x00007f3030e3eae4 in VclPtr<NotebookBar>::Create<ImplBorderWindow*, char const (&) [12], rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, NotebookBarAddonsItem const&>
        (arg=@0x7ffd6c8da0b8: 0x561c07ed3110, arg=..., arg="modules/swriter/ui/notebookbar.ui", arg=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, arg=...) at include/vcl/vclptr.hxx:129
    #78 0x00007f3030e3ca45 in ImplBorderWindow::SetNotebookBar
        (this=0x561c07ed3110, rUIXMLDescription="modules/swriter/ui/notebookbar.ui", rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, aNotebookBarAddonsItem=...)
        at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1945
    #79 0x00007f30310372ac in SystemWindow::SetNotebookBar
        (this=0x561c07f14910, rUIXMLDescription="modules/swriter/ui/notebookbar.ui", rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, aNotebookBarAddonsItem=..., bReloadNotebookbar=true)
        at /home/michi/development/git/libreoffice/vcl/source/window/syswin.cxx:916
    #80 0x00007f3036cabba1 in sfx2::SfxNotebookBar::StateMethod (pSysWindow=0x561c07f14910, xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, rUIFile=u"modules/swriter/ui/", bReloadNotebookbar=true)
        at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:522
    #81 0x00007f3036cab110 in sfx2::SfxNotebookBar::StateMethod (rBindings=..., rUIFile=u"modules/swriter/ui/", bReloadNotebookbar=true) at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:422
    #82 0x00007f3036cad6a2 in sfx2::SfxNotebookBar::ReloadNotebookBar (sUIPath=u"modules/swriter/ui/") at /home/michi/development/git/libreoffice/sfx2/source/notebookbar/SfxNotebookBar.cxx:683
    #83 0x00007f3036e36b9b in SfxViewFrame::Notify (this=0x561c0b023e80, rHint=...) at /home/michi/development/git/libreoffice/sfx2/source/view/viewfrm.cxx:1574
    #84 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c07140db0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #85 0x00007f303665e339 in (anonymous namespace)::SfxEventAsyncer_Impl::IdleHdl (this=0x561c0c330660, pAsyncIdle=0x561c0c3318b0) at /home/michi/development/git/libreoffice/sfx2/source/appl/appcfg.cxx:109
    #86 0x00007f303665dead in (anonymous namespace)::SfxEventAsyncer_Impl::LinkStubIdleHdl (instance=0x561c0c330660, data=0x561c0c3318b0) at /home/michi/development/git/libreoffice/sfx2/source/appl/appcfg.cxx:102
    #87 0x00007f30318b9641 in Link<Timer*, void>::Call (this=0x561c0c3318d0, data=0x561c0c3318b0) at include/tools/link.hxx:105
    #88 0x00007f30318b94ac in Timer::Invoke (this=0x561c0c3318b0) at /home/michi/development/git/libreoffice/vcl/source/app/timer.cxx:75
    #89 0x00007f30318680b8 in Scheduler::CallbackTaskScheduling () at /home/michi/development/git/libreoffice/vcl/source/app/scheduler.cxx:509
    #90 0x00007f302703fad2 in SalTimer::CallCallback (this=0x561c07960ba0) at vcl/inc/saltimer.hxx:53
    #91 0x00007f302703ef6a in QtTimer::timeoutActivated (this=0x561c07960b90) at vcl/qt6/../qt5/QtTimer.cxx:51
    #92 0x00007f30270400a1 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)::{lambda()#1}::operator()() const (this=0x7ffd6c8dd310)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)::{lambda()#1}&&) (args=0x7ffd6c8dd6d0, fn=...)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #94 0x00007f302703ff0b in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)
        (f=(void (QtTimer::*)(QtTimer * const)) 0x7f302703ee70 <QtTimer::timeoutActivated()>, o=0x561c07960b90, arg=0x7ffd6c8dd6d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #95 0x00007f302703fe8d in QtPrivate::FunctionPointer<void (QtTimer::*)()>::call<QtPrivate::List<>, void>(void (QtTimer::*)(), QtTimer*, void**)
        (f=(void (QtTimer::*)(QtTimer * const)) 0x7f302703ee70 <QtTimer::timeoutActivated()>, o=0x561c07960b90, arg=0x7ffd6c8dd6d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #96 0x00007f302703fdb6 in QtPrivate::QCallableObject<void (QtTimer::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x561c07961090, r=0x561c07960b90, a=0x7ffd6c8dd6d0, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #97 0x00007f302605fc52 in QtPrivate::QSlotObjectBase::call (this=0x561c07961090, r=0x561c07960b90, a=0x7ffd6c8dd6d0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #98 0x00007f302611e6e4 in doActivate<false> (sender=0x561c07960bb0, signal_index=3, argv=0x7ffd6c8dd6d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4128
    #99 0x00007f30261141b3 in QMetaObject::activate (sender=0x561c07960bb0, m=0x7f3026a10b18 <QTimer::staticMetaObject>, local_signal_index=0, argv=0x7ffd6c8dd6d0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4188
    #100 0x00007f302614bb9b in QMetaObject::activate<void, QTimer::QPrivateSignal> (sender=0x561c07960bb0, mo=0x7f3026a10b18 <QTimer::staticMetaObject>, local_signal_index=0, ret=0x0, args=...)
        at qtbase/src/corelib/kernel/qobjectdefs.h:306
    #101 0x00007f302614a3d5 in QTimer::timeout (this=0x561c07960bb0, _t1=...) at qtbase/src/corelib/Core_autogen/include/moc_qtimer.cpp:182
    #102 0x00007f302614a38f in QTimer::timerEvent (this=0x561c07960bb0, e=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtimer.cpp:285
    #103 0x00007f302610aef6 in QObject::event (this=0x561c07960bb0, e=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1404
    #104 0x00007f3023fe2dc0 in QApplicationPrivate::notify_helper (this=0x561c06676ae0, receiver=0x561c07960bb0, e=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #105 0x00007f3023fe6cdd in QApplication::notify (this=0x561c06663e20, receiver=0x561c07960bb0, e=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #106 0x00007f3026049dc9 in QCoreApplication::notifyInternal2 (receiver=0x561c07960bb0, event=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #107 0x00007f302604aa39 in QCoreApplication::sendEvent (receiver=0x561c07960bb0, event=0x7ffd6c8de470) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1552
    #108 0x00007f30263dd90f in QTimerInfoList::activateTimers (this=0x561c066eff30) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtimerinfo_unix.cpp:426
    #109 0x00007f302663b565 in timerSourceDispatch (source=0x561c066efed0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:152
    #110 0x00007f302663b844 in idleTimerSourceDispatch (source=0x561c066eff70) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:199
    #111 0x00007f302cd0b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #112 0x00007f302cd0da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #113 0x00007f302cd0e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #114 0x00007f302663a30b in QEventDispatcherGlib::processEvents (this=0x561c06667e80, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #115 0x00007f3025776a98 in QPAEventDispatcherGlib::processEvents (this=0x561c06667e80, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #116 0x00007f3026063980 in QEventLoop::processEvents (this=0x7ffd6c8de888, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:104
    #117 0x00007f3026063bd3 in QEventLoop::exec (this=0x7ffd6c8de888, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:186
    #118 0x00007f3024483eb7 in QDialog::exec (this=0x561c0e897c80) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:575
    #119 0x00007f3026fe0cfb in QtInstanceMessageDialog::run (this=0x561c0e7811b0) at vcl/qt6/../qt5/QtInstanceMessageDialog.cxx:159
    #120 0x00007f30373468c0 in SbRtl_MsgBox (rPar=...) at /home/michi/development/git/libreoffice/basic/source/runtime/methods.cxx:4242
    #121 0x00007f3037327ca2 in SbiStdObject::Notify (this=0x561c0e785e70, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/runtime/stdobj.cxx:1103
    #122 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c0e7b5620, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #123 0x00007f30373c7ad4 in SbxVariable::Broadcast (this=0x561c0e856200, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:154
    #124 0x00007f30373c04fd in SbxValue::SbxValue (this=0x561c0c2d1e10, vtt=0x7f30373eb6d0 <VTT for SbxMethod+16>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:68
    #125 0x00007f30373c6674 in SbxVariable::SbxVariable (this=0x561c0c2d1e10, vtt=0x7f30373eb6c8 <VTT for SbxMethod+8>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:48
    #126 0x00007f30373b6f4a in SbxMethod::SbxMethod (this=0x561c0c2d1e10, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxobj.cxx:842
    #127 0x00007f303737782a in SbiRuntime::FindElement (this=0x561c0e890580, pObj=0x561c0e785e70, nOp1=32786, nOp2=2, nNotFound=..., bLocal=false, bStatic=false)
        at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:3701
    #128 0x00007f303736ab71 in SbiRuntime::StepRTL (this=0x561c0e890580, nOp1=32786, nOp2=2) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4124
    #129 0x00007f303736fa77 in SbiRuntime::Step (this=0x561c0e890580) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:808
    #130 0x00007f30372638c9 in (anonymous namespace)::RunInitGuard::run (this=0x7ffd6c8df5d0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1017
    #131 0x00007f303726262d in SbModule::Run (this=0x561c0e7f98c0, pMeth=0x561c0e886740) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1177
    #132 0x00007f3037261b41 in SbModule::Notify (this=0x561c0e7f98c0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:775
    #133 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c0e850ce0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #134 0x00007f303726879b in SbMethod::Broadcast (this=0x561c0e850d60, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2115
    #135 0x00007f30373c04fd in SbxValue::SbxValue (this=0x561c0e87af00, vtt=0x7f30373eb6d0 <VTT for SbxMethod+16>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:68
    #136 0x00007f30373c6674 in SbxVariable::SbxVariable (this=0x561c0e87af00, vtt=0x7f30373eb6c8 <VTT for SbxMethod+8>, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvar.cxx:48
    #137 0x00007f30373b6f4a in SbxMethod::SbxMethod (this=0x561c0e87af00, r=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxobj.cxx:842
    #138 0x00007f303737782a in SbiRuntime::FindElement (this=0x561c0e854db0, pObj=0x561c0e7f98c0, nOp1=32775, nOp2=0, nNotFound=..., bLocal=true, bStatic=false)
        at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:3701
    #139 0x00007f3037378e95 in SbiRuntime::StepFIND_Impl (this=0x561c0e854db0, pObj=0x561c0e7f98c0, nOp1=32775, nOp2=0, nNotFound=..., bStatic=false) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4134
    #140 0x00007f303736ac0d in SbiRuntime::StepFIND (this=0x561c0e854db0, nOp1=32775, nOp2=0) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:4140
    #141 0x00007f303736fa77 in SbiRuntime::Step (this=0x561c0e854db0) at /home/michi/development/git/libreoffice/basic/source/runtime/runtime.cxx:808
    #142 0x00007f30372638c9 in (anonymous namespace)::RunInitGuard::run (this=0x7ffd6c8e04d0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1017
    #143 0x00007f303726262d in SbModule::Run (this=0x561c0e7f98c0, pMeth=0x561c0e8544a0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:1177
    #144 0x00007f3037261b41 in SbModule::Notify (this=0x561c0e7f98c0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:775
    #145 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c0e850490, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #146 0x00007f303726879b in SbMethod::Broadcast (this=0x561c0e84e6b0, nHintId=SfxHintId::BasicDataWanted) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2115
    #147 0x00007f30373c0ef3 in SbxValue::Get (this=0x561c0e84e6b0, rRes=...) at /home/michi/development/git/libreoffice/basic/source/sbx/sbxvalue.cxx:290
    #148 0x00007f303726848b in SbMethod::Call (this=0x561c0e84e6b0, pRet=0x561c0e854c20, pCaller=0x0) at /home/michi/development/git/libreoffice/basic/source/classes/sbxmod.cxx:2071
    #149 0x00007f301134bcfe in basprov::BasicScriptImpl::invoke (this=0x561c0e807880, aParams=uno::Sequence of length 1 = {...}, aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence)
        at /home/michi/development/git/libreoffice/scripting/source/basprov/basscript.cxx:262
    #150 0x00007f301134c4ac in non-virtual thunk to basprov::BasicScriptImpl::invoke(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) () at /home/michi/development/git/libreoffice/instdir/program/../program/libbasprovlo.so
    #151 0x00007f3011258dc7 in scripting_protocolhandler::ScriptProtocolHandler::dispatchWithNotification (this=0x561c0b213f70, aURL=..., lArgs=uno::Sequence of length 1 = {...}, xListener=empty uno::Reference)
        at /home/michi/development/git/libreoffice/scripting/source/protocolhandler/scripthandler.cxx:213
    #152 0x00007f301125a2ef in scripting_protocolhandler::ScriptProtocolHandler::dispatch (this=0x561c0b213f70, aURL=..., lArgs=uno::Sequence of length 1 = {...})
        at /home/michi/development/git/libreoffice/scripting/source/protocolhandler/scripthandler.cxx:286
    #153 0x00007f3036cbe0ff in SfxEvents_Impl::Execute (aProperties=uno::Sequence of length 2 = {...}, aTrigger=..., pDoc=0x561c07140db0) at /home/michi/development/git/libreoffice/sfx2/source/notify/eventsupplier.cxx:268
    #154 0x00007f3036cbe474 in SfxEvents_Impl::documentEventOccured (this=0x561c0b104010, aEvent=...) at /home/michi/development/git/libreoffice/sfx2/source/notify/eventsupplier.cxx:293
    #155 0x00007f3036c40e77 in (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>::operator()
        (this=0x7ffd6c8e27c0, listener=uno::Reference to (SfxEvents_Impl *) 0x561c0b104040) at /home/michi/development/git/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3335
    #156 0x00007f3036c31e05 in comphelper::OInterfaceContainerHelper3<com::sun::star::document::XDocumentEventListener>::forEach<(anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> > (this=0x561c0a9accf8, func=...) at include/comphelper/interfacecontainer3.hxx:275
    #157 0x00007f3036c31553 in SfxBaseModel::postEvent_Impl (this=0x561c0adc4440, aName="OnViewCreated", xController=uno::Reference to (SwXTextView *) 0x561c0b116e18, supplement=uno::Any(void))
        at /home/michi/development/git/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3369
    #158 0x00007f3036c30a7d in SfxBaseModel::Notify (this=0x561c0adc4440, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3002
    #159 0x00007f3035d51a4c in SfxBroadcaster::Broadcast (this=0x561c07140db0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #160 0x00007f303665db14 in SfxApplication::NotifyEvent (this=0x561c07e29130, rEventHint=..., bSynchron=true) at /home/michi/development/git/libreoffice/sfx2/source/appl/appcfg.cxx:343
    #161 0x00007f3036e057ee in SfxBaseController::attachFrame (this=0x561c0b116df0, xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0)
        at /home/michi/development/git/libreoffice/sfx2/source/view/sfxbasecontroller.cxx:536
    #162 0x00007f3036dd6519 in utl::ConnectFrameControllerModel
        (xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, xController=uno::Reference to (SwXTextView *) 0x561c0b116e18, xModel=uno::Reference to (SwXTextDocument *) 0x561c0adc44d0)
        at include/unotools/fcm.hxx:57
    #163 0x00007f3036dd2b21 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView
        (i_rModel=uno::Reference to (SwXTextDocument *) 0x561c0adc44d0, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0, i_rViewFactoryArgs=..., i_rViewName="Default")
        at /home/michi/development/git/libreoffice/sfx2/source/view/frmload.cxx:585
    #164 0x00007f3036dd00bc in (anonymous namespace)::SfxFrameLoader_Impl::load (this=0x561c07efffa0, rArgs=uno::Sequence of length 12 = {...}, _rTargetFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x561c07ef7db0)
        at /home/michi/development/git/libreoffice/sfx2/source/view/frmload.cxx:764
    #165 0x00007f30379c3004 in framework::LoadEnv::impl_loadContent (this=0x561c078f1e18) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:1180
    #166 0x00007f30379c0165 in framework::LoadEnv::start (this=0x561c078f1e18) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:415
    #167 0x00007f30379bde12 in framework::LoadEnv::startLoading
        (this=0x561c078f1e18, sURL="file:///tmp/hyperlink.fodt", lMediaDescriptor=uno::Sequence of length 4 = {...}, xBaseFrame=uno::Reference to (framework::Desktop *) 0x561c079aab88, sTarget="_default", nSearchFlags=0, eFeature=(LoadEnvFeatures::WorkWithUI | LoadEnvFeatures::AllowContentHandler)) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:311
    #168 0x00007f3037856cd1 in framework::LoadDispatcher::impl_dispatch (this=0x561c078f1dc0, rURL=..., lArguments=uno::Sequence of length 4 = {...}, xListener=empty uno::Reference)
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:107
    #169 0x00007f3037857a31 in framework::LoadDispatcher::dispatchWithReturnValue (this=0x561c078f1dc0, rURL=..., lArguments=uno::Sequence of length 4 = {...})
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:60
    #170 0x00007f3037857ad4 in non-virtual thunk to framework::LoadDispatcher::dispatchWithReturnValue(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:60
    #171 0x00007f3038e10e00 in comphelper::SynchronousDispatch::dispatch
        (xStartPoint=uno::Reference to (framework::Desktop *) 0x561c079aab78, sURL="file:///tmp/hyperlink.fodt", sTarget="_default", lArguments=uno::Sequence of length 4 = {...})
        at /home/michi/development/git/libreoffice/comphelper/source/misc/synchronousdispatch.cxx:62
    #172 0x00007f303a774d3d in desktop::DispatchWatcher::executeDispatchRequests (this=0x561c082f00b0, aDispatchRequestsList=std::__debug::vector of length 1, capacity 1 = {...}, bNoTerminate=false)
        at /home/michi/development/git/libreoffice/desktop/source/app/dispatchwatcher.cxx:529
    #173 0x00007f303a79307a in desktop::RequestHandler::ExecuteCmdLineRequests (aRequest=..., noTerminate=false) at /home/michi/development/git/libreoffice/desktop/source/app/officeipcthread.cxx:1347
    #174 0x00007f303a72d937 in desktop::Desktop::OpenClients () at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:2203
    #175 0x00007f303a72b8c3 in desktop::Desktop::OpenClients_Impl (this=0x7ffd6c8eaae0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1979
    #176 0x00007f303a729f5d in desktop::Desktop::LinkStubOpenClients_Impl (instance=0x7ffd6c8eaae0, data=0x0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1963
    #177 0x00007f30310c86c1 in Link<void*, void>::Call (this=0x561c07f3e718, data=0x0) at include/tools/link.hxx:105
    #178 0x00007f30310c48c1 in ImplHandleUserEvent (pSVEvent=0x561c07f3e710) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2285
    #179 0x00007f30310c17ea in ImplWindowFrameProc (_pWindow=0x561c07e19360, nEvent=SalEvent::UserEvent, pEvent=0x561c07f3e710) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2849
    #180 0x00007f3026f5523c in SalFrame::CallCallback (this=0x561c07b6bb80, nEvent=SalEvent::UserEvent, pEvent=0x561c07f3e710) at vcl/inc/salframe.hxx:311
    #181 0x00007f3026f75d7f in QtInstance::ProcessEvent (this=0x561c066f4840, aEvent=...) at vcl/qt6/../qt5/QtInstance.cxx:527
    #182 0x00007f30317c879d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffd6c8e8f20) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #183 0x00007f30317c8676 in SalUserEventList::DispatchUserEvents (this=0x561c066f4878, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #184 0x00007f3026f727c1 in QtInstance::ImplYield (this=0x561c066f4840, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:453
    #185 0x00007f3026f758e1 in QtInstance::DoYield (this=0x561c066f4840, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475
    #186 0x00007f3031893896 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #187 0x00007f30318931af in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #188 0x00007f3031892f90 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #189 0x00007f303a727f39 in desktop::Desktop::Main (this=0x7ffd6c8eaae0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #190 0x00007f30318b4d16 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #191 0x00007f30318b6909 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #192 0x00007f303a7a181a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #193 0x0000561bdaf4ba6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #194 0x0000561bdaf4ba47 in main (argc=2, argv=0x7ffd6c8eace8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Ie10498c60554783b33aaa03070eebd8252ed9561
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180951
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 5797e54)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180971
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
tdf-gerrit pushed a commit that referenced this pull request Feb 4, 2025
When opening the popup menu by right-clicking on a Writer
comment and selecting "Delete All Comments", the SwAnnotationWin
(`mrSidebarWin`) gets disposed while the popup menu and its associated
MenuFloatingWindow are still alive. With the menu floating window
being a child of the SwAnnotationWin, that would trigger the
below assert since

    commit 6708246
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Dec 5 11:06:48 2024 +0000

        tdf#164093 tdf#157001 a11y: Improve menu window disposal

Avoid disposing parent window before its child by not using
the SwAnnotationWin, but its parent as the popup menu
parent.

    warn:legacy.osl:64828:64828:vcl/source/window/window.cxx:307: Window ( N2sw10annotation15SwAnnotationWinE()) with live SystemWindows destroyed:  18MenuFloatingWindow()
    Window ( N2sw10annotation15SwAnnotationWinE()) with live SystemWindows destroyed:  18MenuFloatingWindow()
    [New Thread 64828.64829]
    [New Thread 64828.64830]
    [New Thread 64828.64831]
    [New Thread 64828.64832]
    [New Thread 64828.64833]
    [New Thread 64828.64835]

    Thread 1 received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (rr) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f580ac9de2f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007f580ac49d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f580ac324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f5801fbc2cb in SalAbort (rErrorText="Window ( N2sw10annotation15SwAnnotationWinE()) with live SystemWindows destroyed:  18MenuFloatingWindow()", bDumpCore=true)
        at /home/michi/development/git/libreoffice/vcl/source/app/salplug.cxx:403
    #5  0x00007f5802087961 in Application::Abort (rErrorText="Window ( N2sw10annotation15SwAnnotationWinE()) with live SystemWindows destroyed:  18MenuFloatingWindow()")
        at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:300
    #6  0x00007f580188bba8 in vcl::Window::dispose (this=0x55711f066550) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:308
    #7  0x00007f5801902216 in Control::dispose (this=0x55711f066550) at /home/michi/development/git/libreoffice/vcl/source/control/ctrl.cxx:61
    #8  0x00007f58019552cc in InterimItemWindow::dispose (this=0x55711f066550) at /home/michi/development/git/libreoffice/vcl/source/control/InterimItemWindow.cxx:54
    #9  0x00007f57ca8fb980 in sw::annotation::SwAnnotationWin::dispose (this=0x55711f066550) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/AnnotationWin.cxx:189
    #10 0x00007f5801b06ee3 in VclReferenceBase::disposeOnce (this=0x55711f0667e8) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    #11 0x00007f57ca939d52 in VclPtr<sw::annotation::SwAnnotationWin>::disposeAndClear (this=0x5571205dc3e0) at include/vcl/vclptr.hxx:207
    #12 0x00007f57ca9260b5 in SwPostItMgr::RemoveItem (this=0x55711a340eb0, pBroadcast=0x55711fe07bb0) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/PostItMgr.cxx:529
    #13 0x00007f57ca926662 in SwPostItMgr::Notify (this=0x55711a340eb0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/PostItMgr.cxx:595
    #14 0x00007f5806551a4c in SfxBroadcaster::Broadcast (this=0x55711fe07bb0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #15 0x00007f57ca0e62c9 in SwpHints::DeleteAtPos (this=0x5571215061d0, nPos=0) at /home/michi/development/git/libreoffice/sw/source/core/txtnode/thints.cxx:3440
    #16 0x00007f57ca0b31d1 in SwTextNode::EraseText (this=0x55711a2d3070, rIdx=SwContentIndex (node 9 offset 4), nCount=1, nMode=SwInsertFlags::DEFAULT) at /home/michi/development/git/libreoffice/sw/source/core/txtnode/ndtxt.cxx:2877
    #17 0x00007f57ca0b501d in SwTextNode::EraseText (this=0x55711a2d3070, rIdx=SwPosition (node 9, offset 4), nCount=1, nMode=SwInsertFlags::DEFAULT) at /home/michi/development/git/libreoffice/sw/source/core/txtnode/ndtxt.cxx:2837
    #18 0x00007f57ca1494c2 in SwUndoDelete::SaveContent (this=0x557121daf110, pStart=0x7ffcf6391340, pEnd=0x7ffcf6391388, pSttTextNd=0x55711a2d3070, pEndTextNd=0x55711a2d3070)
        at /home/michi/development/git/libreoffice/sw/source/core/undo/undel.cxx:476
    #19 0x00007f57ca147457 in SwUndoDelete::SwUndoDelete (this=0x557121daf110, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection, bFullPara=false, bCalledByTableCpy=false)
        at /home/michi/development/git/libreoffice/sw/source/core/undo/undel.cxx:264
    #20 0x00007f57c97e72e8 in std::make_unique<SwUndoDelete, SwPaM&, SwDeleteFlags const&> (__args=SwPaM = {...}, __args=@0x7ffcf6391214: SwDeleteFlags::ArtificialSelection)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:1077
    #21 0x00007f57c97d79a1 in sw::DocumentContentOperationsManager::DeleteRangeImplImpl (this=0x55711dbb22d0, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection)
        at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4574
    #22 0x00007f57c97bf899 in sw::DocumentContentOperationsManager::DeleteRangeImpl (this=0x55711dbb22d0, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection)
        at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4500
    #23 0x00007f57c97c2cf9 in sw::DocumentContentOperationsManager::DeleteAndJoinImpl (this=0x55711dbb22d0, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection)
        at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4471
    #24 0x00007f57c97bfc2d in (anonymous namespace)::lcl_DoWithBreaks
        (rDocumentContentOperations=..., rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection, pFunc=(bool (sw::DocumentContentOperationsManager::*)(class sw::DocumentContentOperationsManager * const, class SwPaM &, enum SwDeleteFlags)) 0x7f57c97c2cb0 <sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags)>) at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:686
    #25 0x00007f57c97c1773 in sw::DocumentContentOperationsManager::DeleteAndJoin (this=0x55711dbb22d0, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection)
        at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:2377
    #26 0x00007f57c9a7ef97 in SwEditShell::DeleteSel (this=0x55711b0054e0, rPam=SwPaM = {...}, isArtificialSelection=true, goLeft=false, pUndo=0x7ffcf6391d9f) at /home/michi/development/git/libreoffice/sw/source/core/edit/eddel.cxx:122
    #27 0x00007f57c9a7f538 in SwEditShell::Delete (this=0x55711b0054e0, isArtificialSelection=true, goLeft=false) at /home/michi/development/git/libreoffice/sw/source/core/edit/eddel.cxx:164
    #28 0x00007f57cae1c83b in SwWrtShell::DelRight (this=0x55711b0054e0, isReplaceHeuristic=false) at /home/michi/development/git/libreoffice/sw/source/uibase/wrtsh/delete.cxx:419
    #29 0x00007f57ca930aaa in SwPostItMgr::Delete (this=0x55711a340eb0) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/PostItMgr.cxx:1770
    #30 0x00007f57caa8d050 in SwAnnotationShell::NoteExec (this=0x55711eef12c0, rReq=...) at /home/michi/development/git/libreoffice/sw/source/uibase/shells/annotsh.cxx:1170
    #31 0x00007f57caa8cf15 in SfxStubSwAnnotationShellNoteExec (pShell=0x55711eef12c0, rReq=...) at workdir/SdiTarget/sw/sdi/swslots.hxx:19464
    #32 0x00007f5806fc9fbe in SfxDispatcher::Call_Impl (this=0x55711ae7d3b0, rShell=..., rSlot=..., rReq=..., bRecord=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:255
    #33 0x00007f5806fce446 in SfxDispatcher::Execute_ (this=0x55711ae7d3b0, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:754
    #34 0x00007f5806fb6c8e in SfxBindings::Execute_Impl (this=0x55711de05e80, aReq=..., pSlot=0x7f57caf33a18 <aSwAnnotationShellSlots_Impl+8712>, pShell=0x55711eef12c0)
        at /home/michi/development/git/libreoffice/sfx2/source/control/bindings.cxx:1045
    #35 0x00007f580709d8bd in SfxDispatchController_Impl::dispatch (this=0x55711e141080, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:735
    #36 0x00007f580709c374 in SfxOfficeDispatch::dispatch (this=0x55711e140fe0, aURL=..., aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:254
    #37 0x00007f5808307ddb in framework::MenuBarManager::Select (this=0x55711fe3b8c0, pMenu=0x5571215e12b0) at /home/michi/development/git/libreoffice/framework/source/uielement/menubarmanager.cxx:821
    #38 0x00007f580830784d in framework::MenuBarManager::LinkStubSelect (instance=0x55711fe3b8c0, data=0x5571215e12b0) at /home/michi/development/git/libreoffice/framework/source/uielement/menubarmanager.cxx:776
    #39 0x00007f58017a64f6 in Link<Menu*, bool>::Call (this=0x5571215e1320, data=0x5571215e12b0) at include/tools/link.hxx:105
    #40 0x00007f5801798233 in Menu::Select (this=0x5571215e12b0) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:352
    #41 0x00007f58017a56a8 in PopupMenu::ImplFlushPendingSelect (this=0x5571215e12b0) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:2872
    #42 0x00007f58017a5ced in PopupMenu::FinishRun (this=0x5571215e12b0, pWin=..., pParentWin=..., bRealExecute=true, bIsNativeMenu=true) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:3108
    #43 0x00007f58017a5487 in PopupMenu::ImplExecute
        (this=0x5571215e12b0, pParentWin=..., rRect=..., nPopupModeFlags=(FloatWinPopupFlags::Down | FloatWinPopupFlags::NoKeyClose | FloatWinPopupFlags::AllMouseButtonClose | FloatWinPopupFlags::NewLevel | FloatWinPopupFlags::NoMouseUpClose | FloatWinPopupFlags::GrabFocus), pSFrom=0x0, bPreSelectFirst=false) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:3033
    #44 0x00007f58017a3eca in PopupMenu::Execute (this=0x5571215e12b0, pExecWindow=0x55711f066550, rRect=..., nFlags=(PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose))
        at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:2860
    #45 0x00007f58034b67d3 in VCLXMenu::execute (this=0x5571215df5a0, rxWindowPeer=uno::Reference to (VCLXWindow *) 0x55711ef4bbe8, rPos=..., nFlags=1) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxmenu.cxx:509
    #46 0x00007f5806fd2d91 in SfxDispatcher::ExecutePopup (this=0x55711ae7d3b0, rResName="annotation", pWin=0x55711f066550, pPos=0x7ffcf6394968) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1937
    #47 0x00007f5806fd2186 in SfxDispatcher::ExecutePopup (pWin=0x55711f066550, pPos=0x7ffcf6394968) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1785
    #48 0x00007f57ca95d2c3 in sw::sidebarwindows::SidebarTextControl::Command (this=0x5571215354d0, rCEvt=...) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/SidebarTxtControl.cxx:443
    #49 0x00007f5801fb39e1 in weld::CustomWeld::DoCommand (this=0x557121536330, rPos=...) at /home/michi/development/git/libreoffice/vcl/source/app/customweld.cxx:93
    #50 0x00007f5801fb371d in weld::CustomWeld::LinkStubDoCommand (instance=0x557121536330, data=...) at /home/michi/development/git/libreoffice/vcl/source/app/customweld.cxx:91
    #51 0x00007f57f7799bb6 in Link<CommandEvent const&, bool>::Call (this=0x55711a2c0bd0, data=...) at include/tools/link.hxx:105
    #52 0x00007f57f7703ba8 in (anonymous namespace)::GtkInstanceDrawingArea::signal_command (this=0x55711a2c0900, rCEvt=...) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:19099
    #53 0x00007f57f7701f3d in (anonymous namespace)::GtkInstanceDrawingArea::signal_popup_menu (this=0x55711a2c0900, rCEvt=...) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:18731
    #54 0x00007f57f76e3cc7 in (anonymous namespace)::GtkInstanceWidget::signalPopupMenu (pWidget=0x55712152de30, widget=0x55711a2c0900) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:2701
    #55 0x00007f57f6c9adb5 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #56 0x00007f580552c9c0 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #57 0x00007f5805540d83 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #58 0x00007f5805548440 in g_signal_emitv () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #59 0x00007f57f6cce9f5 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #60 0x00007f57f6cceff0 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #61 0x00007f57f6cd04bb in gtk_bindings_activate_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #62 0x00007f57f6c97caa in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #63 0x00007f580552c9c0 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #64 0x00007f5805541360 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #65 0x00007f5805542072 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #66 0x00007f5805548666 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #67 0x00007f5805548723 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #68 0x00007f57f6f551cc in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #69 0x00007f57f6f78143 in gtk_window_propagate_key_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #70 0x00007f57f6f7c9fb in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #71 0x00007f57f77fc4ac in key_forward (pEvent=0x55711a45b0c0, pDest=0x55711ae7bae0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkframe.cxx:4239
    #72 0x00007f57f77f2f8d in GtkSalFrame::signalKey (pWidget=0x55711ae7bae0, pEvent=0x55711a45b0c0, frame=0x55711af84100) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkframe.cxx:4300
    #73 0x00007f57f6c97caa in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #74 0x00007f580552c9c0 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #75 0x00007f5805540d83 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #76 0x00007f5805542072 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #77 0x00007f5805548666 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #78 0x00007f5805548723 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #79 0x00007f57f6f551cc in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #80 0x00007f57f6e05e6f in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #81 0x00007f57f6e07b76 in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #82 0x00007f57f7da7ce9 in ??? () at /lib/x86_64-linux-gnu/libgdk-3.so.0
    #83 0x00007f57f7ddc096 in ??? () at /lib/x86_64-linux-gnu/libgdk-3.so.0
    #84 0x00007f57fd10b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #85 0x00007f57fd10da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #86 0x00007f57fd10e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #87 0x00007f57f768350c in GtkSalData::Yield (this=0x55711906f850, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:405
    #88 0x00007f57f7688413 in GtkInstance::DoYield (this=0x55711906f700, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:439
    #89 0x00007f5802088706 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #90 0x00007f580208801f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #91 0x00007f5802087e00 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #92 0x00007f580af287f9 in desktop::Desktop::Main (this=0x7ffcf6397a70) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #93 0x00007f58020a9b86 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #94 0x00007f58020ab779 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #95 0x00007f580afa20da in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #96 0x00005570fb1c4a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #97 0x00005570fb1c4a47 in main (argc=2, argv=0x7ffcf6397c78) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: I20d037038c0d4a84d104bf9987bae28835dac609
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181110
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
tdf-gerrit pushed a commit that referenced this pull request Feb 5, 2025
When opening the popup menu by right-clicking on a Writer
comment and selecting "Delete All Comments", the SwAnnotationWin
(`mrSidebarWin`) gets disposed while the popup menu and its associated
MenuFloatingWindow are still alive. With the menu floating window
being a child of the SwAnnotationWin, that would trigger the
below assert since

    commit 6708246
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Dec 5 11:06:48 2024 +0000

        tdf#164093 tdf#157001 a11y: Improve menu window disposal

Avoid disposing parent window before its child by not using
the SwAnnotationWin, but its parent as the popup menu
parent.

    warn:legacy.osl:64828:64828:vcl/source/window/window.cxx:307: Window ( N2sw10annotation15SwAnnotationWinE()) with live SystemWindows destroyed:  18MenuFloatingWindow()
    Window ( N2sw10annotation15SwAnnotationWinE()) with live SystemWindows destroyed:  18MenuFloatingWindow()
    [New Thread 64828.64829]
    [New Thread 64828.64830]
    [New Thread 64828.64831]
    [New Thread 64828.64832]
    [New Thread 64828.64833]
    [New Thread 64828.64835]

    Thread 1 received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (rr) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f580ac9de2f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007f580ac49d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f580ac324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f5801fbc2cb in SalAbort (rErrorText="Window ( N2sw10annotation15SwAnnotationWinE()) with live SystemWindows destroyed:  18MenuFloatingWindow()", bDumpCore=true)
        at /home/michi/development/git/libreoffice/vcl/source/app/salplug.cxx:403
    #5  0x00007f5802087961 in Application::Abort (rErrorText="Window ( N2sw10annotation15SwAnnotationWinE()) with live SystemWindows destroyed:  18MenuFloatingWindow()")
        at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:300
    #6  0x00007f580188bba8 in vcl::Window::dispose (this=0x55711f066550) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:308
    #7  0x00007f5801902216 in Control::dispose (this=0x55711f066550) at /home/michi/development/git/libreoffice/vcl/source/control/ctrl.cxx:61
    #8  0x00007f58019552cc in InterimItemWindow::dispose (this=0x55711f066550) at /home/michi/development/git/libreoffice/vcl/source/control/InterimItemWindow.cxx:54
    #9  0x00007f57ca8fb980 in sw::annotation::SwAnnotationWin::dispose (this=0x55711f066550) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/AnnotationWin.cxx:189
    #10 0x00007f5801b06ee3 in VclReferenceBase::disposeOnce (this=0x55711f0667e8) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    #11 0x00007f57ca939d52 in VclPtr<sw::annotation::SwAnnotationWin>::disposeAndClear (this=0x5571205dc3e0) at include/vcl/vclptr.hxx:207
    #12 0x00007f57ca9260b5 in SwPostItMgr::RemoveItem (this=0x55711a340eb0, pBroadcast=0x55711fe07bb0) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/PostItMgr.cxx:529
    #13 0x00007f57ca926662 in SwPostItMgr::Notify (this=0x55711a340eb0, rBC=..., rHint=...) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/PostItMgr.cxx:595
    #14 0x00007f5806551a4c in SfxBroadcaster::Broadcast (this=0x55711fe07bb0, rHint=...) at /home/michi/development/git/libreoffice/svl/source/notify/SfxBroadcaster.cxx:43
    #15 0x00007f57ca0e62c9 in SwpHints::DeleteAtPos (this=0x5571215061d0, nPos=0) at /home/michi/development/git/libreoffice/sw/source/core/txtnode/thints.cxx:3440
    #16 0x00007f57ca0b31d1 in SwTextNode::EraseText (this=0x55711a2d3070, rIdx=SwContentIndex (node 9 offset 4), nCount=1, nMode=SwInsertFlags::DEFAULT) at /home/michi/development/git/libreoffice/sw/source/core/txtnode/ndtxt.cxx:2877
    #17 0x00007f57ca0b501d in SwTextNode::EraseText (this=0x55711a2d3070, rIdx=SwPosition (node 9, offset 4), nCount=1, nMode=SwInsertFlags::DEFAULT) at /home/michi/development/git/libreoffice/sw/source/core/txtnode/ndtxt.cxx:2837
    #18 0x00007f57ca1494c2 in SwUndoDelete::SaveContent (this=0x557121daf110, pStart=0x7ffcf6391340, pEnd=0x7ffcf6391388, pSttTextNd=0x55711a2d3070, pEndTextNd=0x55711a2d3070)
        at /home/michi/development/git/libreoffice/sw/source/core/undo/undel.cxx:476
    #19 0x00007f57ca147457 in SwUndoDelete::SwUndoDelete (this=0x557121daf110, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection, bFullPara=false, bCalledByTableCpy=false)
        at /home/michi/development/git/libreoffice/sw/source/core/undo/undel.cxx:264
    #20 0x00007f57c97e72e8 in std::make_unique<SwUndoDelete, SwPaM&, SwDeleteFlags const&> (__args=SwPaM = {...}, __args=@0x7ffcf6391214: SwDeleteFlags::ArtificialSelection)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:1077
    #21 0x00007f57c97d79a1 in sw::DocumentContentOperationsManager::DeleteRangeImplImpl (this=0x55711dbb22d0, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection)
        at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4574
    #22 0x00007f57c97bf899 in sw::DocumentContentOperationsManager::DeleteRangeImpl (this=0x55711dbb22d0, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection)
        at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4500
    #23 0x00007f57c97c2cf9 in sw::DocumentContentOperationsManager::DeleteAndJoinImpl (this=0x55711dbb22d0, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection)
        at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4471
    #24 0x00007f57c97bfc2d in (anonymous namespace)::lcl_DoWithBreaks
        (rDocumentContentOperations=..., rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection, pFunc=(bool (sw::DocumentContentOperationsManager::*)(class sw::DocumentContentOperationsManager * const, class SwPaM &, enum SwDeleteFlags)) 0x7f57c97c2cb0 <sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags)>) at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:686
    #25 0x00007f57c97c1773 in sw::DocumentContentOperationsManager::DeleteAndJoin (this=0x55711dbb22d0, rPam=SwPaM = {...}, flags=SwDeleteFlags::ArtificialSelection)
        at /home/michi/development/git/libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:2377
    #26 0x00007f57c9a7ef97 in SwEditShell::DeleteSel (this=0x55711b0054e0, rPam=SwPaM = {...}, isArtificialSelection=true, goLeft=false, pUndo=0x7ffcf6391d9f) at /home/michi/development/git/libreoffice/sw/source/core/edit/eddel.cxx:122
    #27 0x00007f57c9a7f538 in SwEditShell::Delete (this=0x55711b0054e0, isArtificialSelection=true, goLeft=false) at /home/michi/development/git/libreoffice/sw/source/core/edit/eddel.cxx:164
    #28 0x00007f57cae1c83b in SwWrtShell::DelRight (this=0x55711b0054e0, isReplaceHeuristic=false) at /home/michi/development/git/libreoffice/sw/source/uibase/wrtsh/delete.cxx:419
    #29 0x00007f57ca930aaa in SwPostItMgr::Delete (this=0x55711a340eb0) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/PostItMgr.cxx:1770
    #30 0x00007f57caa8d050 in SwAnnotationShell::NoteExec (this=0x55711eef12c0, rReq=...) at /home/michi/development/git/libreoffice/sw/source/uibase/shells/annotsh.cxx:1170
    #31 0x00007f57caa8cf15 in SfxStubSwAnnotationShellNoteExec (pShell=0x55711eef12c0, rReq=...) at workdir/SdiTarget/sw/sdi/swslots.hxx:19464
    #32 0x00007f5806fc9fbe in SfxDispatcher::Call_Impl (this=0x55711ae7d3b0, rShell=..., rSlot=..., rReq=..., bRecord=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:255
    #33 0x00007f5806fce446 in SfxDispatcher::Execute_ (this=0x55711ae7d3b0, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:754
    #34 0x00007f5806fb6c8e in SfxBindings::Execute_Impl (this=0x55711de05e80, aReq=..., pSlot=0x7f57caf33a18 <aSwAnnotationShellSlots_Impl+8712>, pShell=0x55711eef12c0)
        at /home/michi/development/git/libreoffice/sfx2/source/control/bindings.cxx:1045
    #35 0x00007f580709d8bd in SfxDispatchController_Impl::dispatch (this=0x55711e141080, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:735
    #36 0x00007f580709c374 in SfxOfficeDispatch::dispatch (this=0x55711e140fe0, aURL=..., aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:254
    #37 0x00007f5808307ddb in framework::MenuBarManager::Select (this=0x55711fe3b8c0, pMenu=0x5571215e12b0) at /home/michi/development/git/libreoffice/framework/source/uielement/menubarmanager.cxx:821
    #38 0x00007f580830784d in framework::MenuBarManager::LinkStubSelect (instance=0x55711fe3b8c0, data=0x5571215e12b0) at /home/michi/development/git/libreoffice/framework/source/uielement/menubarmanager.cxx:776
    #39 0x00007f58017a64f6 in Link<Menu*, bool>::Call (this=0x5571215e1320, data=0x5571215e12b0) at include/tools/link.hxx:105
    #40 0x00007f5801798233 in Menu::Select (this=0x5571215e12b0) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:352
    #41 0x00007f58017a56a8 in PopupMenu::ImplFlushPendingSelect (this=0x5571215e12b0) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:2872
    #42 0x00007f58017a5ced in PopupMenu::FinishRun (this=0x5571215e12b0, pWin=..., pParentWin=..., bRealExecute=true, bIsNativeMenu=true) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:3108
    #43 0x00007f58017a5487 in PopupMenu::ImplExecute
        (this=0x5571215e12b0, pParentWin=..., rRect=..., nPopupModeFlags=(FloatWinPopupFlags::Down | FloatWinPopupFlags::NoKeyClose | FloatWinPopupFlags::AllMouseButtonClose | FloatWinPopupFlags::NewLevel | FloatWinPopupFlags::NoMouseUpClose | FloatWinPopupFlags::GrabFocus), pSFrom=0x0, bPreSelectFirst=false) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:3033
    #44 0x00007f58017a3eca in PopupMenu::Execute (this=0x5571215e12b0, pExecWindow=0x55711f066550, rRect=..., nFlags=(PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose))
        at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:2860
    #45 0x00007f58034b67d3 in VCLXMenu::execute (this=0x5571215df5a0, rxWindowPeer=uno::Reference to (VCLXWindow *) 0x55711ef4bbe8, rPos=..., nFlags=1) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxmenu.cxx:509
    #46 0x00007f5806fd2d91 in SfxDispatcher::ExecutePopup (this=0x55711ae7d3b0, rResName="annotation", pWin=0x55711f066550, pPos=0x7ffcf6394968) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1937
    #47 0x00007f5806fd2186 in SfxDispatcher::ExecutePopup (pWin=0x55711f066550, pPos=0x7ffcf6394968) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1785
    #48 0x00007f57ca95d2c3 in sw::sidebarwindows::SidebarTextControl::Command (this=0x5571215354d0, rCEvt=...) at /home/michi/development/git/libreoffice/sw/source/uibase/docvw/SidebarTxtControl.cxx:443
    #49 0x00007f5801fb39e1 in weld::CustomWeld::DoCommand (this=0x557121536330, rPos=...) at /home/michi/development/git/libreoffice/vcl/source/app/customweld.cxx:93
    #50 0x00007f5801fb371d in weld::CustomWeld::LinkStubDoCommand (instance=0x557121536330, data=...) at /home/michi/development/git/libreoffice/vcl/source/app/customweld.cxx:91
    #51 0x00007f57f7799bb6 in Link<CommandEvent const&, bool>::Call (this=0x55711a2c0bd0, data=...) at include/tools/link.hxx:105
    #52 0x00007f57f7703ba8 in (anonymous namespace)::GtkInstanceDrawingArea::signal_command (this=0x55711a2c0900, rCEvt=...) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:19099
    #53 0x00007f57f7701f3d in (anonymous namespace)::GtkInstanceDrawingArea::signal_popup_menu (this=0x55711a2c0900, rCEvt=...) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:18731
    #54 0x00007f57f76e3cc7 in (anonymous namespace)::GtkInstanceWidget::signalPopupMenu (pWidget=0x55712152de30, widget=0x55711a2c0900) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:2701
    #55 0x00007f57f6c9adb5 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #56 0x00007f580552c9c0 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #57 0x00007f5805540d83 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #58 0x00007f5805548440 in g_signal_emitv () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #59 0x00007f57f6cce9f5 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #60 0x00007f57f6cceff0 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #61 0x00007f57f6cd04bb in gtk_bindings_activate_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #62 0x00007f57f6c97caa in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #63 0x00007f580552c9c0 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #64 0x00007f5805541360 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #65 0x00007f5805542072 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #66 0x00007f5805548666 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #67 0x00007f5805548723 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #68 0x00007f57f6f551cc in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #69 0x00007f57f6f78143 in gtk_window_propagate_key_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #70 0x00007f57f6f7c9fb in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #71 0x00007f57f77fc4ac in key_forward (pEvent=0x55711a45b0c0, pDest=0x55711ae7bae0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkframe.cxx:4239
    #72 0x00007f57f77f2f8d in GtkSalFrame::signalKey (pWidget=0x55711ae7bae0, pEvent=0x55711a45b0c0, frame=0x55711af84100) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkframe.cxx:4300
    #73 0x00007f57f6c97caa in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #74 0x00007f580552c9c0 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #75 0x00007f5805540d83 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #76 0x00007f5805542072 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #77 0x00007f5805548666 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #78 0x00007f5805548723 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #79 0x00007f57f6f551cc in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #80 0x00007f57f6e05e6f in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #81 0x00007f57f6e07b76 in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #82 0x00007f57f7da7ce9 in ??? () at /lib/x86_64-linux-gnu/libgdk-3.so.0
    #83 0x00007f57f7ddc096 in ??? () at /lib/x86_64-linux-gnu/libgdk-3.so.0
    #84 0x00007f57fd10b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #85 0x00007f57fd10da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #86 0x00007f57fd10e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #87 0x00007f57f768350c in GtkSalData::Yield (this=0x55711906f850, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:405
    #88 0x00007f57f7688413 in GtkInstance::DoYield (this=0x55711906f700, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:439
    #89 0x00007f5802088706 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #90 0x00007f580208801f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #91 0x00007f5802087e00 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #92 0x00007f580af287f9 in desktop::Desktop::Main (this=0x7ffcf6397a70) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #93 0x00007f58020a9b86 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #94 0x00007f58020ab779 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #95 0x00007f580afa20da in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #96 0x00005570fb1c4a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #97 0x00005570fb1c4a47 in main (argc=2, argv=0x7ffcf6397c78) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: I20d037038c0d4a84d104bf9987bae28835dac609
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181110
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
(cherry picked from commit 0467f88)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181134
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
tdf-gerrit pushed a commit that referenced this pull request Feb 7, 2025
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>
tdf-gerrit pushed a commit that referenced this pull request Feb 7, 2025
Fixes a deadlock seen for this scenario
with the qt6 VCL plugin on Linux:

1) start Orca
2) Start Base, create a new database
2) With the "Tables" section enabled, click on
   "Create Table in Design View..."
3) click around in the table, use Tab key to move focus

AccessibleBrowseBoxAccess::commitEvent (frame 20 in the below
backtrace) locks the mutex, and then
AccessibleBrowseBoxAccess::getAccessibleContext (frame 8) tries to
acquire the mutex again and deadlocks.

Locking in AccessibleBrowseBoxAccess::commitEvent was added in

    commit 67158da
    Date:   Fri Oct 4 14:22:22 2024 +0100

        cid#1608061 Data race condition

        and

        cid#1607995 Data race condition

Backtrace:

    Thread 1 "soffice.bin" received signal SIGINT, Interrupt.
    futex_wait (futex_word=0x7fffd804ba30, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    warning: 146    ../sysdeps/nptl/futex-internal.h: No such file or directory
    (gdb) bt
    #0  futex_wait (futex_word=0x7fffd804ba30, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    #1  __GI___lll_lock_wait (futex=futex@entry=0x7fffd804ba30, private=0) at ./nptl/lowlevellock.c:49
    #2  0x00007ffff789f3a2 in lll_mutex_lock_optimized (mutex=0x7fffd804ba30) at ./nptl/pthread_mutex_lock.c:48
    #3  ___pthread_mutex_lock (mutex=0x7fffd804ba30) at ./nptl/pthread_mutex_lock.c:93
    #4  0x00007fffee0d742f in __gthread_mutex_lock (__mutex=0x7fffd804ba30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:762
    #5  0x00007fffee0d9915 in std::mutex::lock (this=0x7fffd804ba30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_mutex.h:113
    #6  0x00007fffee0d98e4 in std::unique_lock<std::mutex>::lock (this=0x7fffffff3b48) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:147
    #7  0x00007fffee0d8108 in std::unique_lock<std::mutex>::unique_lock (this=0x7fffffff3b48, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:73
    #8  0x00007fffee0d729d in AccessibleBrowseBoxAccess::getAccessibleContext (this=0x7fffd804ba00) at /home/michi/development/git/libreoffice/vcl/source/accessibility/AccessibleBrowseBox.cxx:281
    #9  0x00007fffee0d7404 in non-virtual thunk to AccessibleBrowseBoxAccess::getAccessibleContext() () at /home/michi/development/git/libreoffice/instdir/program/libvcllo.so
    #10 0x00007fffe42c3b8c in QtAccessibleWidget::getAccessibleContextImpl (this=0x7fffd804b9a0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:93
    #11 0x00007fffe42c451d in QtAccessibleWidget::childCount (this=0x7fffd804b9a0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:149
    #12 0x00007fffe290e9d5 in AtSpiAdaptor::notifyAboutCreation (this=0x555556916e10, interface=0x7fffd8051df0) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1403
    #13 0x00007fffe290ad18 in AtSpiAdaptor::notify (this=0x555556916e10, event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:971
    #14 0x00007fffe2966779 in QSpiAccessibleBridge::notifyAccessibilityUpdate (this=0x5555568aab30, event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/qspiaccessiblebridge.cpp:85
    #15 0x00007fffe28e5c89 in QAccessible::updateAccessibility (event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/qaccessible.cpp:943
    #16 0x00007fffe42bb466 in QtAccessibleEventListener::notifyEvent (this=0x555557d6de30, rEvent=...) at vcl/qt6/../qt5/QtAccessibleEventListener.cxx:231
    #17 0x00007ffff60ec617 in comphelper::AccessibleEventNotifier::addEvent (_nClient=288, _rEvent=...) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:256
    #18 0x00007ffff60e8107 in comphelper::OCommonAccessibleComponent::NotifyAccessibleEvent (this=0x55555be2f520, _nEventId=7, _rOldValue=uno::Any(void), _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), nIndexHint=-1)
        at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:127
    #19 0x00007fffee0dd7c9 in AccessibleBrowseBoxBase::commitEvent (this=0x55555be2f520, _nEventId=7, _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), _rOldValue=uno::Any(void))
        at /home/michi/development/git/libreoffice/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx:310
    #20 0x00007fffee0d8fb0 in AccessibleBrowseBoxAccess::commitEvent (this=0x7fffd804ba00, nEventId=7, rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), rOldValue=uno::Any(void))
        at vcl/inc/accessibility/AccessibleBrowseBox.hxx:250
    #21 0x00007ffff08806b6 in BrowseBox::commitBrowseBoxEvent (this=0x55555bdc8bf0, _nEventId=7, _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), _rOldValue=uno::Any(void))
        at /home/michi/development/git/libreoffice/svtools/source/brwbox/brwbox3.cxx:406
    #22 0x00007ffff08a090b in svt::EditBrowseBox::implCreateActiveAccessible (this=0x55555bdc8bf0) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox2.cxx:87
    #23 0x00007ffff089c7af in svt::EditBrowseBox::ActivateCell (this=0x55555bdc8bf0, nRow=0, nCol=1, bCellFocus=true) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:945
    #24 0x00007ffff089e6c0 in svt::EditBrowseBox::ActivateCell (this=0x55555bdc8bf0) at include/svtools/editbrowsebox.hxx:1029
    #25 0x00007ffff089b291 in svt::EditBrowseBox::implActivateCellOnMouseEvent (this=0x55555bdc8bf0, _rEvt=..., _bUp=true) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:482
    #26 0x00007ffff089b43c in svt::EditBrowseBox::MouseButtonUp (this=0x55555bdc8bf0, rEvt=...) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:468
    #27 0x00007ffff08876ad in BrowserDataWin::MouseButtonUp (this=0x555556fed350, rEvt=...) at /home/michi/development/git/libreoffice/svtools/source/brwbox/datwin.cxx:490
    #28 0x00007fffee4b1055 in ImplHandleMouseEvent (xWindow=..., nSVEvent=NotifyEventType::MOUSEBUTTONUP, bMouseLeave=false, nX=73, nY=89, nMsgTime=10536810, nCode=1, nMode=(MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT))
        at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:719
    #29 0x00007fffee4b5571 in ImplHandleSalMouseButtonUp (pWindow=0x7fffd80482c0, pEvent=0x7fffffff8118) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2351
    #30 0x00007fffee4b4280 in ImplWindowFrameProc (_pWindow=0x7fffd80482c0, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2700
    #31 0x00007fffe435910c in SalFrame::CallCallback (this=0x555556abc050, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at vcl/inc/salframe.hxx:311
    #32 0x00007fffe43563b5 in QtFrame::CallCallback (this=0x555556abc040, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at vcl/inc/qt6/../qt5/QtFrame.hxx:235
    #33 0x00007fffe445475a in QtWidget::handleMouseButtonEvent (rFrame=..., pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:117
    #34 0x00007fffe4454a11 in QtWidget::mouseReleaseEvent (this=0x7fffd8048d90, pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:128
    #35 0x00007fffe149f8ad in QWidget::event (this=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8964
    #36 0x00007fffe44569ae in QtWidget::event (this=0x7fffd8048d90, pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:678
    #37 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x7fffd8048d90, e=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #38 0x00007fffe13e4af2 in QApplication::notify (this=0x555555564d60, receiver=0x7fffd8048d90, e=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2782
    #39 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #40 0x00007fffe344c119 in QCoreApplication::sendSpontaneousEvent (receiver=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1566
    #41 0x00007fffe13e3747 in QApplicationPrivate::sendMouseEvent
        (receiver=0x7fffd8048d90, event=0x7fffffff93c0, alienWidget=0x7fffd8048d90, nativeWidget=0x555556f2f660, buttonDown=0x7fffe1fca488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
        at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2363
    #42 0x00007fffe14ded48 in QWidgetWindow::handleMouseEvent (this=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:669
    #43 0x00007fffe14dd555 in QWidgetWindow::event (this=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292
    #44 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x5555577f5b40, e=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #45 0x00007fffe13e6d3d in QApplication::notify (this=0x555555564d60, receiver=0x5555577f5b40, e=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #46 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #47 0x00007fffe344c119 in QCoreApplication::sendSpontaneousEvent (receiver=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1566
    #48 0x00007fffe2285ca2 in QGuiApplicationPrivate::processMouseEvent (e=0x7fffd0001560) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2485
    #49 0x00007fffe2284e66 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x7fffd0001560) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2212
    #50 0x00007fffe236d57d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
    #51 0x00007fffe236d42e in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082
    #52 0x00007fffdf8b2685 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555c8390) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:526
    #53 0x00007fffdf8ce4e5 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}::operator()() const (this=0x7fffffffa9a0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #54 0x00007fffdf8ce40d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}&&) (args=0x7fffd0002f98, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #55 0x00007fffdf8ce32f in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**) (f=(void (QtWaylandClient::QWaylandDisplay::*)(class QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf8b2640 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555c8390, arg=0x7fffd0002f98)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #56 0x00007fffdf8ce2a1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(class QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf8b2640 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555c8390, arg=0x7fffd0002f98)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #57 0x00007fffdf8ce1cb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555e1390, r=0x5555555c8390, a=0x7fffd0002f98, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #58 0x00007fffe3461362 in QtPrivate::QSlotObjectBase::call (this=0x5555555e1390, r=0x5555555c8390, a=0x7fffd0002f98) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #59 0x00007fffe350ad5c in QMetaCallEvent::placeMetaCall (this=0x7fffd0002f50, object=0x5555555c8390) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #60 0x00007fffe350cab1 in QObject::event (this=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #61 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #62 0x00007fffe13e6d3d in QApplication::notify (this=0x555555564d60, receiver=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #63 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x5555555c8390, event=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #64 0x00007fffe344c089 in QCoreApplication::sendEvent (receiver=0x5555555c8390, event=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1552
    #65 0x00007fffe344cfc8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55555559f110) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1892
    #66 0x00007fffe344becc in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1746
    #67 0x00007fffe3a3d4a1 in postEventSourceDispatch (s=0x5555555f0f80) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #68 0x00007fffea10b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #69 0x00007fffea10da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #70 0x00007fffea10e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #71 0x00007fffe3a3c6db in QEventDispatcherGlib::processEvents (this=0x555555568dc0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #72 0x00007fffe2b7a148 in QPAEventDispatcherGlib::processEvents (this=0x555555568dc0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #73 0x00007fffe4376a82 in QtInstance::ImplYield (this=0x5555555f5a00, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:485
    #74 0x00007fffe4379d51 in QtInstance::DoYield (this=0x5555555f5a00, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:496
    #75 0x00007fffeec869b6 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #76 0x00007fffeec862cf in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #77 0x00007fffeec860b0 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #78 0x00007ffff7b287f9 in desktop::Desktop::Main (this=0x7fffffffd5d0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #79 0x00007fffeeca7e36 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #80 0x00007fffeeca9a29 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #81 0x00007ffff7ba20da in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #82 0x0000555555555a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #83 0x0000555555555a47 in main (argc=2, argv=0x7fffffffd7d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Id3832663f5c5c66a4d624054fee4d48219732b95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181155
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Feb 8, 2025
... and merge it with QtMenu::ImplRemoveMenuBarButton
that it was previously calling.

This fixes the below assert that gets triggered when
extension updates are available.
(In my case, a fake update notification was triggered
by forcing it with the changes from demo Gerrit change [1].)

    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007fb5a6e9de2f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007fb5a6e49d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007fb5a6e324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007fb592902f8d in qAbort () at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:46
    #5  0x00007fb592949948 in qt_message_fatal<QString&> (context=..., message=...) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:2062
    #6  0x00007fb592942b4d in qt_message (msgType=QtFatalMsg, context=..., msg=0x7fb593090df3 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0x7fb55fffb4b0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:342
    #7  0x00007fb592944e9d in QMessageLogger::fatal (this=0x7fb55fffb650, msg=0x7fb593090df3 "ASSERT failure in %s: \"%s\", file %s, line %d") at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:831
    #8  0x00007fb592903043 in qt_assert_x
        (where=0x7fb59309a8b9 "QCoreApplication::sendEvent", what=0x5628d475e9f0 "Cannot send events to objects owned by a different thread. Current thread QThread(0x5628d4691800). Receiver 'QWidget(0x5628d4472f70)' was created in thread QThread(0x5628cb7b0e20, name = \"Qt mainThrea"..., file=0x7fb59309a695 "/home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp", line=530)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:115
    #9  0x00007fb592a490b6 in QCoreApplicationPrivate::checkReceiverThread (receiver=0x5628d4472f70) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:526
    #10 0x00007fb5909e4011 in QApplication::notify (this=0x5628cb7b0d60, receiver=0x5628d4472f70, e=0x7fb55fffc2d8) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2590
    #11 0x00007fb592a4a8d9 in QCoreApplication::notifyInternal2 (receiver=0x5628d4472f70, event=0x7fb55fffc2d8) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1098
    #12 0x00007fb592a4b549 in QCoreApplication::sendEvent (receiver=0x5628d4472f70, event=0x7fb55fffc2d8) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1538
    #13 0x00007fb590a8816a in QWidget::~QWidget (this=0x5628d4472f70) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:1569
    #14 0x00007fb590c285db in QAbstractButton::~QAbstractButton (this=0x5628d4472f70) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:453
    #15 0x00007fb590da0b89 in QPushButton::~QPushButton (this=0x5628d4472f70) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qpushbutton.cpp:250
    #16 0x00007fb590da0bcd in QPushButton::~QPushButton (this=0x5628d4472f70) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qpushbutton.cpp:249
    #17 0x00007fb593a30f8a in QtMenu::ImplRemoveMenuBarButton (this=0x5628d06d8840, nId=2) at vcl/qt6/../qt5/QtMenu.cxx:872
    #18 0x00007fb593a315a0 in QtMenu::RemoveMenuBarButton (this=0x5628d06d8840, nId=2) at vcl/qt6/../qt5/QtMenu.cxx:900
    #19 0x00007fb59d9af55e in MenuBarWindow::RemoveMenuBarButton (this=0x5628d08cd990, nId=2) at /home/michi/development/git/libreoffice/vcl/source/window/menubarwindow.cxx:1191
    #20 0x00007fb59d99b766 in MenuBar::RemoveMenuBarButton (this=0x5628d06e8140, nId=2) at /home/michi/development/git/libreoffice/vcl/source/window/menu.cxx:2720
    #21 0x00007fb59d7e6ad0 in MenuBarUpdateIconManager::RemoveMenuBarIcon (this=0x5628d48922e8, pMenuBar=0x5628d06e8140) at /home/michi/development/git/libreoffice/vcl/source/window/bubblewindow.cxx:574
    #22 0x00007fb59d7e71d2 in MenuBarUpdateIconManager::RemoveMenuBarIcons (this=0x5628d48922e8) at /home/michi/development/git/libreoffice/vcl/source/window/bubblewindow.cxx:422
    #23 0x00007fb59d7e7284 in MenuBarUpdateIconManager::SetShowMenuIcon (this=0x5628d48922e8, bShowMenuIcon=false) at /home/michi/development/git/libreoffice/vcl/source/window/bubblewindow.cxx:435
    #24 0x00007fb58e5effc7 in (anonymous namespace)::UpdateCheckUI::setPropertyValue (this=0x5628d4892290, rPropertyName="MenuIconVisible", rValue=uno::Any("boolean": 0 '\000'))
        at /home/michi/development/git/libreoffice/extensions/source/update/ui/updatecheckui.cxx:215
    #25 0x00007fb57cafd80e in UpdateCheck::handleMenuBarUI (this=0x7fb560025d40, rUpdateHandler=rtl::Reference to 0x7fb5600279f0, eState=@0x7fb55fffcc44: UPDATESTATE_NO_UPDATE_AVAIL, suppressBubble=true)
        at /home/michi/development/git/libreoffice/extensions/source/update/check/updatecheck.cxx:1287
    #26 0x00007fb57cafa135 in UpdateCheck::setUIState (this=0x7fb560025d40, eState=UPDATESTATE_NO_UPDATE_AVAIL, suppressBubble=true) at /home/michi/development/git/libreoffice/extensions/source/update/check/updatecheck.cxx:1332
    #27 0x00007fb57cafd368 in UpdateCheck::setUpdateInfo (this=0x7fb560025d40, aInfo=...) at /home/michi/development/git/libreoffice/extensions/source/update/check/updatecheck.cxx:1253
    #28 0x00007fb57caff7c3 in (anonymous namespace)::UpdateCheckThread::runCheck (this=0x7fb5600269e0, rbExtensionsChecked=@0x7fb55fffd1a7: false)
        at /home/michi/development/git/libreoffice/extensions/source/update/check/updatecheck.cxx:389
    #29 0x00007fb57cafefd3 in (anonymous namespace)::UpdateCheckThread::run (this=0x7fb5600269e0) at /home/michi/development/git/libreoffice/extensions/source/update/check/updatecheck.cxx:508
    #30 0x00007fb57cb08a4e in threadFunc (param=0x7fb5600269e0) at include/osl/thread.hxx:189
    #31 0x00007fb5a7502ccb in osl_thread_start_Impl (pData=0x7fb5600271b0) at /home/michi/development/git/libreoffice/sal/osl/unx/thread.cxx:237
    #32 0x00007fb5a6e9c083 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
    #33 0x00007fb5a6f1a5f0 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100

[1] https://gerrit.libreoffice.org/c/core/+/106922

Change-Id: I571ec792bf4f83d61f0bc327199559fc47159dca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181281
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Feb 10, 2025
until oTextPara has been applied to the field's associated postit
window.

This became a noticeable problem since:

commit 2fba6df
CommitDate: Thu Dec 5 15:31:06 2024 +0100

    LOK: don't recreate the dialogs of an old view when loading new views

In the broken situation the contents of the postit are sent back to kit
as apparently empty, so newly inserted comments appear to be empty.

The broadcast bt of this scenario is:

 #0  sw::annotation::SwAnnotationWin::GetSimpleHtml (this=0x19f38790) at sw/source/uibase/docvw/AnnotationWin.cxx:516
 #1  0x00007f37d246283e in (anonymous namespace)::lcl_CommentNotification (pView=0x267cac40, nType=(anonymous namespace)::CommentNotificationType::Add,
     pItem=0x26baf4e0, nPostItId=0) at sw/source/uibase/docvw/PostItMgr.cxx:176
 #2  0x00007f37d2467fef in SwPostItMgr::LayoutPostIts (this=0x266d7160) at sw/source/uibase/docvw/PostItMgr.cxx:1084
 #3  0x00007f37d209dd1b in SwViewShell::VisPortChgd (this=0x267cce90, rRect=...) at sw/source/core/view/viewsh.cxx:1326
 #4  0x00007f37d119030d in SwCursorShell::VisPortChgd (this=0x267cce90, rRect=...) at sw/source/core/crsr/crsrsh.cxx:1788
 #5  0x00007f37d276478b in SwView::SetVisArea (this=0x267cac40, rRect=..., bUpdateScrollbar=true)
     at sw/source/uibase/uiview/viewport.cxx:249
 #6  0x00007f37d2764cc3 in SwView::SetVisArea (this=0x267cac40, rPt=..., bUpdateScrollbar=true)
     at sw/source/uibase/uiview/viewport.cxx:311
 #7  0x00007f37d2765e2e in SwView::Scroll (this=0x267cac40, rRect=..., nRangeX=65535, nRangeY=65535)
     at sw/source/uibase/uiview/viewport.cxx:495
 #8  0x00007f37d24d7708 in ScrollMDI (pVwSh=0x267cce90, rRect=..., nRangeX=65535, nRangeY=65535)
     at sw/source/uibase/docvw/edtwin3.cxx:41
 #9  0x00007f37d209a896 in SwViewShell::MakeVisible (this=0x267cce90, rRect=...) at sw/source/core/view/viewsh.cxx:665
 #10 0x00007f37d119a238 in SwCursorShell::MakeSelVisible (this=0x267cce90) at sw/source/core/crsr/crsrsh.cxx:3490
 #11 0x00007f37d1837671 in SwFEShell::MakeSelVisible (this=0x267cce90) at sw/source/core/frmedt/feshview.cxx:2677
 #12 0x00007f37d1192fcc in SwCursorShell::UpdateCursor (this=0x267cce90, eFlags=6, bIdleEnd=false)
     at sw/source/core/crsr/crsrsh.cxx:2345
 #13 0x00007f37d11886f9 in SwCursorShell::EndAction (this=0x267cce90, bIdleEnd=false) at sw/source/core/crsr/crsrsh.cxx:280
 #14 0x00007f37d178ed62 in SwEditShell::EndAllAction (this=0x267cce90) at sw/source/core/edit/edws.cxx:102
 #15 0x00007f37d2503daf in SwFieldMgr::InsertField (this=0x7fff88937c00, rData=...) at sw/source/uibase/fldui/fldmgr.cxx:1561
 #16 0x00007f37d292df75 in SwWrtShell::InsertPostIt (this=0x267cce90, rFieldMgr=..., rReq=...)

while in the "working" case IsScrollMDI is false and MakeVisible returns early.

2fba6df causes the profile's desire to restore core's SID_SIDEBAR to be
ignored and so the results of IsScrollMDI differ between the two
scenarios.

Which makes it more likely that IsScrollMDI is true when queried by
SwViewShell::MakeVisible, and so LayoutPostIts triggers before
pPostIt->SetTextObject, so the contents of that TextObject, while
applied to the postit, are not broadcast back via the kit.

put a StartAction/EndAction pairing when oTextPara is present to
suppress the update until oTextPara is applied.

Change-Id: Id42ff1be85fec4b1053e5a7726cf6d2ba8d7de84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178326
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
(cherry picked from commit c29a10b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178390
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
tdf-gerrit pushed a commit that referenced this pull request Feb 13, 2025
Fixes a deadlock seen for this scenario
with the qt6 VCL plugin on Linux:

1) start Orca
2) Start Base, create a new database
2) With the "Tables" section enabled, click on
   "Create Table in Design View..."
3) click around in the table, use Tab key to move focus

AccessibleBrowseBoxAccess::commitEvent (frame 20 in the below
backtrace) locks the mutex, and then
AccessibleBrowseBoxAccess::getAccessibleContext (frame 8) tries to
acquire the mutex again and deadlocks.

Locking in AccessibleBrowseBoxAccess::commitEvent was added in

    commit 67158da
    Date:   Fri Oct 4 14:22:22 2024 +0100

        cid#1608061 Data race condition

        and

        cid#1607995 Data race condition

Backtrace:

    Thread 1 "soffice.bin" received signal SIGINT, Interrupt.
    futex_wait (futex_word=0x7fffd804ba30, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    warning: 146    ../sysdeps/nptl/futex-internal.h: No such file or directory
    (gdb) bt
    #0  futex_wait (futex_word=0x7fffd804ba30, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    #1  __GI___lll_lock_wait (futex=futex@entry=0x7fffd804ba30, private=0) at ./nptl/lowlevellock.c:49
    #2  0x00007ffff789f3a2 in lll_mutex_lock_optimized (mutex=0x7fffd804ba30) at ./nptl/pthread_mutex_lock.c:48
    #3  ___pthread_mutex_lock (mutex=0x7fffd804ba30) at ./nptl/pthread_mutex_lock.c:93
    #4  0x00007fffee0d742f in __gthread_mutex_lock (__mutex=0x7fffd804ba30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:762
    #5  0x00007fffee0d9915 in std::mutex::lock (this=0x7fffd804ba30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_mutex.h:113
    #6  0x00007fffee0d98e4 in std::unique_lock<std::mutex>::lock (this=0x7fffffff3b48) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:147
    #7  0x00007fffee0d8108 in std::unique_lock<std::mutex>::unique_lock (this=0x7fffffff3b48, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:73
    #8  0x00007fffee0d729d in AccessibleBrowseBoxAccess::getAccessibleContext (this=0x7fffd804ba00) at /home/michi/development/git/libreoffice/vcl/source/accessibility/AccessibleBrowseBox.cxx:281
    #9  0x00007fffee0d7404 in non-virtual thunk to AccessibleBrowseBoxAccess::getAccessibleContext() () at /home/michi/development/git/libreoffice/instdir/program/libvcllo.so
    #10 0x00007fffe42c3b8c in QtAccessibleWidget::getAccessibleContextImpl (this=0x7fffd804b9a0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:93
    #11 0x00007fffe42c451d in QtAccessibleWidget::childCount (this=0x7fffd804b9a0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:149
    #12 0x00007fffe290e9d5 in AtSpiAdaptor::notifyAboutCreation (this=0x555556916e10, interface=0x7fffd8051df0) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1403
    #13 0x00007fffe290ad18 in AtSpiAdaptor::notify (this=0x555556916e10, event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:971
    #14 0x00007fffe2966779 in QSpiAccessibleBridge::notifyAccessibilityUpdate (this=0x5555568aab30, event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/qspiaccessiblebridge.cpp:85
    #15 0x00007fffe28e5c89 in QAccessible::updateAccessibility (event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/qaccessible.cpp:943
    #16 0x00007fffe42bb466 in QtAccessibleEventListener::notifyEvent (this=0x555557d6de30, rEvent=...) at vcl/qt6/../qt5/QtAccessibleEventListener.cxx:231
    #17 0x00007ffff60ec617 in comphelper::AccessibleEventNotifier::addEvent (_nClient=288, _rEvent=...) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:256
    #18 0x00007ffff60e8107 in comphelper::OCommonAccessibleComponent::NotifyAccessibleEvent (this=0x55555be2f520, _nEventId=7, _rOldValue=uno::Any(void), _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), nIndexHint=-1)
        at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:127
    #19 0x00007fffee0dd7c9 in AccessibleBrowseBoxBase::commitEvent (this=0x55555be2f520, _nEventId=7, _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), _rOldValue=uno::Any(void))
        at /home/michi/development/git/libreoffice/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx:310
    #20 0x00007fffee0d8fb0 in AccessibleBrowseBoxAccess::commitEvent (this=0x7fffd804ba00, nEventId=7, rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), rOldValue=uno::Any(void))
        at vcl/inc/accessibility/AccessibleBrowseBox.hxx:250
    #21 0x00007ffff08806b6 in BrowseBox::commitBrowseBoxEvent (this=0x55555bdc8bf0, _nEventId=7, _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), _rOldValue=uno::Any(void))
        at /home/michi/development/git/libreoffice/svtools/source/brwbox/brwbox3.cxx:406
    #22 0x00007ffff08a090b in svt::EditBrowseBox::implCreateActiveAccessible (this=0x55555bdc8bf0) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox2.cxx:87
    #23 0x00007ffff089c7af in svt::EditBrowseBox::ActivateCell (this=0x55555bdc8bf0, nRow=0, nCol=1, bCellFocus=true) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:945
    #24 0x00007ffff089e6c0 in svt::EditBrowseBox::ActivateCell (this=0x55555bdc8bf0) at include/svtools/editbrowsebox.hxx:1029
    #25 0x00007ffff089b291 in svt::EditBrowseBox::implActivateCellOnMouseEvent (this=0x55555bdc8bf0, _rEvt=..., _bUp=true) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:482
    #26 0x00007ffff089b43c in svt::EditBrowseBox::MouseButtonUp (this=0x55555bdc8bf0, rEvt=...) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:468
    #27 0x00007ffff08876ad in BrowserDataWin::MouseButtonUp (this=0x555556fed350, rEvt=...) at /home/michi/development/git/libreoffice/svtools/source/brwbox/datwin.cxx:490
    #28 0x00007fffee4b1055 in ImplHandleMouseEvent (xWindow=..., nSVEvent=NotifyEventType::MOUSEBUTTONUP, bMouseLeave=false, nX=73, nY=89, nMsgTime=10536810, nCode=1, nMode=(MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT))
        at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:719
    #29 0x00007fffee4b5571 in ImplHandleSalMouseButtonUp (pWindow=0x7fffd80482c0, pEvent=0x7fffffff8118) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2351
    #30 0x00007fffee4b4280 in ImplWindowFrameProc (_pWindow=0x7fffd80482c0, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2700
    #31 0x00007fffe435910c in SalFrame::CallCallback (this=0x555556abc050, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at vcl/inc/salframe.hxx:311
    #32 0x00007fffe43563b5 in QtFrame::CallCallback (this=0x555556abc040, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at vcl/inc/qt6/../qt5/QtFrame.hxx:235
    #33 0x00007fffe445475a in QtWidget::handleMouseButtonEvent (rFrame=..., pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:117
    #34 0x00007fffe4454a11 in QtWidget::mouseReleaseEvent (this=0x7fffd8048d90, pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:128
    #35 0x00007fffe149f8ad in QWidget::event (this=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8964
    #36 0x00007fffe44569ae in QtWidget::event (this=0x7fffd8048d90, pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:678
    #37 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x7fffd8048d90, e=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #38 0x00007fffe13e4af2 in QApplication::notify (this=0x555555564d60, receiver=0x7fffd8048d90, e=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2782
    #39 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #40 0x00007fffe344c119 in QCoreApplication::sendSpontaneousEvent (receiver=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1566
    #41 0x00007fffe13e3747 in QApplicationPrivate::sendMouseEvent
        (receiver=0x7fffd8048d90, event=0x7fffffff93c0, alienWidget=0x7fffd8048d90, nativeWidget=0x555556f2f660, buttonDown=0x7fffe1fca488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
        at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2363
    #42 0x00007fffe14ded48 in QWidgetWindow::handleMouseEvent (this=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:669
    #43 0x00007fffe14dd555 in QWidgetWindow::event (this=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292
    #44 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x5555577f5b40, e=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #45 0x00007fffe13e6d3d in QApplication::notify (this=0x555555564d60, receiver=0x5555577f5b40, e=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #46 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #47 0x00007fffe344c119 in QCoreApplication::sendSpontaneousEvent (receiver=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1566
    #48 0x00007fffe2285ca2 in QGuiApplicationPrivate::processMouseEvent (e=0x7fffd0001560) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2485
    #49 0x00007fffe2284e66 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x7fffd0001560) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2212
    #50 0x00007fffe236d57d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
    #51 0x00007fffe236d42e in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082
    #52 0x00007fffdf8b2685 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555c8390) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:526
    #53 0x00007fffdf8ce4e5 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}::operator()() const (this=0x7fffffffa9a0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #54 0x00007fffdf8ce40d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}&&) (args=0x7fffd0002f98, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #55 0x00007fffdf8ce32f in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**) (f=(void (QtWaylandClient::QWaylandDisplay::*)(class QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf8b2640 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555c8390, arg=0x7fffd0002f98)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #56 0x00007fffdf8ce2a1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(class QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf8b2640 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555c8390, arg=0x7fffd0002f98)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #57 0x00007fffdf8ce1cb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555e1390, r=0x5555555c8390, a=0x7fffd0002f98, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #58 0x00007fffe3461362 in QtPrivate::QSlotObjectBase::call (this=0x5555555e1390, r=0x5555555c8390, a=0x7fffd0002f98) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #59 0x00007fffe350ad5c in QMetaCallEvent::placeMetaCall (this=0x7fffd0002f50, object=0x5555555c8390) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #60 0x00007fffe350cab1 in QObject::event (this=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #61 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #62 0x00007fffe13e6d3d in QApplication::notify (this=0x555555564d60, receiver=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #63 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x5555555c8390, event=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #64 0x00007fffe344c089 in QCoreApplication::sendEvent (receiver=0x5555555c8390, event=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1552
    #65 0x00007fffe344cfc8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55555559f110) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1892
    #66 0x00007fffe344becc in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1746
    #67 0x00007fffe3a3d4a1 in postEventSourceDispatch (s=0x5555555f0f80) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #68 0x00007fffea10b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #69 0x00007fffea10da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #70 0x00007fffea10e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #71 0x00007fffe3a3c6db in QEventDispatcherGlib::processEvents (this=0x555555568dc0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #72 0x00007fffe2b7a148 in QPAEventDispatcherGlib::processEvents (this=0x555555568dc0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #73 0x00007fffe4376a82 in QtInstance::ImplYield (this=0x5555555f5a00, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:485
    #74 0x00007fffe4379d51 in QtInstance::DoYield (this=0x5555555f5a00, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:496
    #75 0x00007fffeec869b6 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #76 0x00007fffeec862cf in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #77 0x00007fffeec860b0 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #78 0x00007ffff7b287f9 in desktop::Desktop::Main (this=0x7fffffffd5d0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #79 0x00007fffeeca7e36 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #80 0x00007fffeeca9a29 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #81 0x00007ffff7ba20da in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #82 0x0000555555555a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #83 0x0000555555555a47 in main (argc=2, argv=0x7fffffffd7d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Id3832663f5c5c66a4d624054fee4d48219732b95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181155
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 71d1432)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181542
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
tdf-gerrit pushed a commit that referenced this pull request Feb 13, 2025
XAccessibleComponent::getAccessibleAtPoint can return
an empty ref if there is no child at the given position
(e.g. also for any a11y object that doesn't have any children.)

Fixes the following critical warning seen with the gtk3
VCL plugin when using Accerciser's "Inspect object under mouse"
feature when the mouse pointer is over one of the items
in the "Insert" -> "Fontwork" dialog.

Backtrace received with G_DEBUG=fatal-criticals:

    ** (soffice:2129541): CRITICAL **: 14:07:18.230: AtkObject *atk_object_wrapper_ref(const uno::Reference<accessibility::XAccessible> &, bool): assertion 'bool(rxAccessible)' failed

    Fatal exception: Signal 5
    Stack:
    #0 sal::backtrace_get(unsigned int) at /home/michi/development/git/libreoffice/sal/osl/unx/backtraceapi.cxx:42
    #1 (anonymous namespace)::printStack(int) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:289
    #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:330
    #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:427
    #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3fda0) [0x7f57da649da0]
    #5 g_logv in /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #6 g_log in /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #7 atk_object_wrapper_ref at /home/michi/development/git/libreoffice/vcl/unx/gtk3/a11y/atkwrapper.cxx:936
    #8 component_wrapper_ref_accessible_at_point(_AtkComponent*, int, int, AtkCoordType) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/a11y/atkcomponent.cxx:174
    #9 /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0(+0x1b57d) [0x7f57c736c57d]
    #10 /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0(+0x2348d) [0x7f57c737448d]
    #11 /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x29024) [0x7f57da4f6024]
    #12 dbus_connection_dispatch in /lib/x86_64-linux-gnu/libdbus-1.so.3
    #13 /lib/x86_64-linux-gnu/libatspi.so.0(+0x1bb79) [0x7f57c62adb79]
    #14 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ad5f) [0x7f57ccf03d5f]
    #15 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5cfd7) [0x7f57ccf05fd7]
    #16 g_main_context_iteration in /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #17 GtkSalData::Yield(bool, bool) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:405
    #18 GtkInstance::DoYield(bool, bool) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:439
    #19 ImplYield(bool, bool) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #20 Application::Yield() at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:489
    #21 Application::Execute() at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #22 desktop::Desktop::Main() at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #23 ImplSVMain() at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #24 SVMain() at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #25 soffice_main at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #26 sal_main at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #27 main at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49
    #28 __libc_start_call_main at ./csu/../sysdeps/nptl/libc_start_call_main.h:74
    #29 call_init at ./csu/../csu/libc-start.c:128
    #30 _start in ./instdir/program/soffice.bin

Change-Id: I07b3f8a8a1b817fcc666c8477f90b54b5f97fe5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181622
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Feb 14, 2025
Fixes a deadlock seen for this scenario
with the qt6 VCL plugin on Linux:

1) start Orca
2) Start Base, create a new database
2) With the "Tables" section enabled, click on
   "Create Table in Design View..."
3) click around in the table, use Tab key to move focus

AccessibleBrowseBoxAccess::commitEvent (frame 20 in the below
backtrace) locks the mutex, and then
AccessibleBrowseBoxAccess::getAccessibleContext (frame 8) tries to
acquire the mutex again and deadlocks.

Locking in AccessibleBrowseBoxAccess::commitEvent was added in

    commit 67158da
    Date:   Fri Oct 4 14:22:22 2024 +0100

        cid#1608061 Data race condition

        and

        cid#1607995 Data race condition

Backtrace:

    Thread 1 "soffice.bin" received signal SIGINT, Interrupt.
    futex_wait (futex_word=0x7fffd804ba30, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    warning: 146    ../sysdeps/nptl/futex-internal.h: No such file or directory
    (gdb) bt
    #0  futex_wait (futex_word=0x7fffd804ba30, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    #1  __GI___lll_lock_wait (futex=futex@entry=0x7fffd804ba30, private=0) at ./nptl/lowlevellock.c:49
    #2  0x00007ffff789f3a2 in lll_mutex_lock_optimized (mutex=0x7fffd804ba30) at ./nptl/pthread_mutex_lock.c:48
    #3  ___pthread_mutex_lock (mutex=0x7fffd804ba30) at ./nptl/pthread_mutex_lock.c:93
    #4  0x00007fffee0d742f in __gthread_mutex_lock (__mutex=0x7fffd804ba30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:762
    #5  0x00007fffee0d9915 in std::mutex::lock (this=0x7fffd804ba30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_mutex.h:113
    #6  0x00007fffee0d98e4 in std::unique_lock<std::mutex>::lock (this=0x7fffffff3b48) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:147
    #7  0x00007fffee0d8108 in std::unique_lock<std::mutex>::unique_lock (this=0x7fffffff3b48, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:73
    #8  0x00007fffee0d729d in AccessibleBrowseBoxAccess::getAccessibleContext (this=0x7fffd804ba00) at /home/michi/development/git/libreoffice/vcl/source/accessibility/AccessibleBrowseBox.cxx:281
    #9  0x00007fffee0d7404 in non-virtual thunk to AccessibleBrowseBoxAccess::getAccessibleContext() () at /home/michi/development/git/libreoffice/instdir/program/libvcllo.so
    #10 0x00007fffe42c3b8c in QtAccessibleWidget::getAccessibleContextImpl (this=0x7fffd804b9a0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:93
    #11 0x00007fffe42c451d in QtAccessibleWidget::childCount (this=0x7fffd804b9a0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:149
    #12 0x00007fffe290e9d5 in AtSpiAdaptor::notifyAboutCreation (this=0x555556916e10, interface=0x7fffd8051df0) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1403
    #13 0x00007fffe290ad18 in AtSpiAdaptor::notify (this=0x555556916e10, event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:971
    #14 0x00007fffe2966779 in QSpiAccessibleBridge::notifyAccessibilityUpdate (this=0x5555568aab30, event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/qspiaccessiblebridge.cpp:85
    #15 0x00007fffe28e5c89 in QAccessible::updateAccessibility (event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/qaccessible.cpp:943
    #16 0x00007fffe42bb466 in QtAccessibleEventListener::notifyEvent (this=0x555557d6de30, rEvent=...) at vcl/qt6/../qt5/QtAccessibleEventListener.cxx:231
    #17 0x00007ffff60ec617 in comphelper::AccessibleEventNotifier::addEvent (_nClient=288, _rEvent=...) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:256
    #18 0x00007ffff60e8107 in comphelper::OCommonAccessibleComponent::NotifyAccessibleEvent (this=0x55555be2f520, _nEventId=7, _rOldValue=uno::Any(void), _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), nIndexHint=-1)
        at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:127
    #19 0x00007fffee0dd7c9 in AccessibleBrowseBoxBase::commitEvent (this=0x55555be2f520, _nEventId=7, _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), _rOldValue=uno::Any(void))
        at /home/michi/development/git/libreoffice/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx:310
    #20 0x00007fffee0d8fb0 in AccessibleBrowseBoxAccess::commitEvent (this=0x7fffd804ba00, nEventId=7, rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), rOldValue=uno::Any(void))
        at vcl/inc/accessibility/AccessibleBrowseBox.hxx:250
    #21 0x00007ffff08806b6 in BrowseBox::commitBrowseBoxEvent (this=0x55555bdc8bf0, _nEventId=7, _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), _rOldValue=uno::Any(void))
        at /home/michi/development/git/libreoffice/svtools/source/brwbox/brwbox3.cxx:406
    #22 0x00007ffff08a090b in svt::EditBrowseBox::implCreateActiveAccessible (this=0x55555bdc8bf0) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox2.cxx:87
    #23 0x00007ffff089c7af in svt::EditBrowseBox::ActivateCell (this=0x55555bdc8bf0, nRow=0, nCol=1, bCellFocus=true) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:945
    #24 0x00007ffff089e6c0 in svt::EditBrowseBox::ActivateCell (this=0x55555bdc8bf0) at include/svtools/editbrowsebox.hxx:1029
    #25 0x00007ffff089b291 in svt::EditBrowseBox::implActivateCellOnMouseEvent (this=0x55555bdc8bf0, _rEvt=..., _bUp=true) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:482
    #26 0x00007ffff089b43c in svt::EditBrowseBox::MouseButtonUp (this=0x55555bdc8bf0, rEvt=...) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:468
    #27 0x00007ffff08876ad in BrowserDataWin::MouseButtonUp (this=0x555556fed350, rEvt=...) at /home/michi/development/git/libreoffice/svtools/source/brwbox/datwin.cxx:490
    #28 0x00007fffee4b1055 in ImplHandleMouseEvent (xWindow=..., nSVEvent=NotifyEventType::MOUSEBUTTONUP, bMouseLeave=false, nX=73, nY=89, nMsgTime=10536810, nCode=1, nMode=(MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT))
        at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:719
    #29 0x00007fffee4b5571 in ImplHandleSalMouseButtonUp (pWindow=0x7fffd80482c0, pEvent=0x7fffffff8118) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2351
    #30 0x00007fffee4b4280 in ImplWindowFrameProc (_pWindow=0x7fffd80482c0, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2700
    #31 0x00007fffe435910c in SalFrame::CallCallback (this=0x555556abc050, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at vcl/inc/salframe.hxx:311
    #32 0x00007fffe43563b5 in QtFrame::CallCallback (this=0x555556abc040, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at vcl/inc/qt6/../qt5/QtFrame.hxx:235
    #33 0x00007fffe445475a in QtWidget::handleMouseButtonEvent (rFrame=..., pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:117
    #34 0x00007fffe4454a11 in QtWidget::mouseReleaseEvent (this=0x7fffd8048d90, pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:128
    #35 0x00007fffe149f8ad in QWidget::event (this=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8964
    #36 0x00007fffe44569ae in QtWidget::event (this=0x7fffd8048d90, pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:678
    #37 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x7fffd8048d90, e=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #38 0x00007fffe13e4af2 in QApplication::notify (this=0x555555564d60, receiver=0x7fffd8048d90, e=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2782
    #39 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #40 0x00007fffe344c119 in QCoreApplication::sendSpontaneousEvent (receiver=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1566
    #41 0x00007fffe13e3747 in QApplicationPrivate::sendMouseEvent
        (receiver=0x7fffd8048d90, event=0x7fffffff93c0, alienWidget=0x7fffd8048d90, nativeWidget=0x555556f2f660, buttonDown=0x7fffe1fca488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
        at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2363
    #42 0x00007fffe14ded48 in QWidgetWindow::handleMouseEvent (this=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:669
    #43 0x00007fffe14dd555 in QWidgetWindow::event (this=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292
    #44 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x5555577f5b40, e=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #45 0x00007fffe13e6d3d in QApplication::notify (this=0x555555564d60, receiver=0x5555577f5b40, e=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #46 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #47 0x00007fffe344c119 in QCoreApplication::sendSpontaneousEvent (receiver=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1566
    #48 0x00007fffe2285ca2 in QGuiApplicationPrivate::processMouseEvent (e=0x7fffd0001560) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2485
    #49 0x00007fffe2284e66 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x7fffd0001560) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2212
    #50 0x00007fffe236d57d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
    #51 0x00007fffe236d42e in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082
    #52 0x00007fffdf8b2685 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555c8390) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:526
    #53 0x00007fffdf8ce4e5 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}::operator()() const (this=0x7fffffffa9a0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #54 0x00007fffdf8ce40d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}&&) (args=0x7fffd0002f98, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #55 0x00007fffdf8ce32f in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**) (f=(void (QtWaylandClient::QWaylandDisplay::*)(class QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf8b2640 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555c8390, arg=0x7fffd0002f98)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #56 0x00007fffdf8ce2a1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(class QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf8b2640 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555c8390, arg=0x7fffd0002f98)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #57 0x00007fffdf8ce1cb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555e1390, r=0x5555555c8390, a=0x7fffd0002f98, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #58 0x00007fffe3461362 in QtPrivate::QSlotObjectBase::call (this=0x5555555e1390, r=0x5555555c8390, a=0x7fffd0002f98) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #59 0x00007fffe350ad5c in QMetaCallEvent::placeMetaCall (this=0x7fffd0002f50, object=0x5555555c8390) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #60 0x00007fffe350cab1 in QObject::event (this=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #61 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #62 0x00007fffe13e6d3d in QApplication::notify (this=0x555555564d60, receiver=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #63 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x5555555c8390, event=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #64 0x00007fffe344c089 in QCoreApplication::sendEvent (receiver=0x5555555c8390, event=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1552
    #65 0x00007fffe344cfc8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55555559f110) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1892
    #66 0x00007fffe344becc in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1746
    #67 0x00007fffe3a3d4a1 in postEventSourceDispatch (s=0x5555555f0f80) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #68 0x00007fffea10b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #69 0x00007fffea10da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #70 0x00007fffea10e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #71 0x00007fffe3a3c6db in QEventDispatcherGlib::processEvents (this=0x555555568dc0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #72 0x00007fffe2b7a148 in QPAEventDispatcherGlib::processEvents (this=0x555555568dc0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #73 0x00007fffe4376a82 in QtInstance::ImplYield (this=0x5555555f5a00, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:485
    #74 0x00007fffe4379d51 in QtInstance::DoYield (this=0x5555555f5a00, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:496
    #75 0x00007fffeec869b6 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #76 0x00007fffeec862cf in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #77 0x00007fffeec860b0 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #78 0x00007ffff7b287f9 in desktop::Desktop::Main (this=0x7fffffffd5d0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #79 0x00007fffeeca7e36 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #80 0x00007fffeeca9a29 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #81 0x00007ffff7ba20da in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #82 0x0000555555555a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #83 0x0000555555555a47 in main (argc=2, argv=0x7fffffffd7d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Id3832663f5c5c66a4d624054fee4d48219732b95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181155
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 71d1432)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181543
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
tdf-gerrit pushed a commit that referenced this pull request Feb 14, 2025
Fixes a deadlock seen for this scenario
with the qt6 VCL plugin on Linux:

1) start Orca
2) Start Base, create a new database
2) With the "Tables" section enabled, click on
   "Create Table in Design View..."
3) click around in the table, use Tab key to move focus

AccessibleBrowseBoxAccess::commitEvent (frame 20 in the below
backtrace) locks the mutex, and then
AccessibleBrowseBoxAccess::getAccessibleContext (frame 8) tries to
acquire the mutex again and deadlocks.

Locking in AccessibleBrowseBoxAccess::commitEvent was added in

    commit 67158da
    Date:   Fri Oct 4 14:22:22 2024 +0100

        cid#1608061 Data race condition

        and

        cid#1607995 Data race condition

Backtrace:

    Thread 1 "soffice.bin" received signal SIGINT, Interrupt.
    futex_wait (futex_word=0x7fffd804ba30, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    warning: 146    ../sysdeps/nptl/futex-internal.h: No such file or directory
    (gdb) bt
    #0  futex_wait (futex_word=0x7fffd804ba30, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    #1  __GI___lll_lock_wait (futex=futex@entry=0x7fffd804ba30, private=0) at ./nptl/lowlevellock.c:49
    #2  0x00007ffff789f3a2 in lll_mutex_lock_optimized (mutex=0x7fffd804ba30) at ./nptl/pthread_mutex_lock.c:48
    #3  ___pthread_mutex_lock (mutex=0x7fffd804ba30) at ./nptl/pthread_mutex_lock.c:93
    #4  0x00007fffee0d742f in __gthread_mutex_lock (__mutex=0x7fffd804ba30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:762
    #5  0x00007fffee0d9915 in std::mutex::lock (this=0x7fffd804ba30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_mutex.h:113
    #6  0x00007fffee0d98e4 in std::unique_lock<std::mutex>::lock (this=0x7fffffff3b48) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:147
    #7  0x00007fffee0d8108 in std::unique_lock<std::mutex>::unique_lock (this=0x7fffffff3b48, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:73
    #8  0x00007fffee0d729d in AccessibleBrowseBoxAccess::getAccessibleContext (this=0x7fffd804ba00) at /home/michi/development/git/libreoffice/vcl/source/accessibility/AccessibleBrowseBox.cxx:281
    #9  0x00007fffee0d7404 in non-virtual thunk to AccessibleBrowseBoxAccess::getAccessibleContext() () at /home/michi/development/git/libreoffice/instdir/program/libvcllo.so
    #10 0x00007fffe42c3b8c in QtAccessibleWidget::getAccessibleContextImpl (this=0x7fffd804b9a0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:93
    #11 0x00007fffe42c451d in QtAccessibleWidget::childCount (this=0x7fffd804b9a0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:149
    #12 0x00007fffe290e9d5 in AtSpiAdaptor::notifyAboutCreation (this=0x555556916e10, interface=0x7fffd8051df0) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1403
    #13 0x00007fffe290ad18 in AtSpiAdaptor::notify (this=0x555556916e10, event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:971
    #14 0x00007fffe2966779 in QSpiAccessibleBridge::notifyAccessibilityUpdate (this=0x5555568aab30, event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/linux/qspiaccessiblebridge.cpp:85
    #15 0x00007fffe28e5c89 in QAccessible::updateAccessibility (event=0x7fffffff5e40) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/qaccessible.cpp:943
    #16 0x00007fffe42bb466 in QtAccessibleEventListener::notifyEvent (this=0x555557d6de30, rEvent=...) at vcl/qt6/../qt5/QtAccessibleEventListener.cxx:231
    #17 0x00007ffff60ec617 in comphelper::AccessibleEventNotifier::addEvent (_nClient=288, _rEvent=...) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:256
    #18 0x00007ffff60e8107 in comphelper::OCommonAccessibleComponent::NotifyAccessibleEvent (this=0x55555be2f520, _nEventId=7, _rOldValue=uno::Any(void), _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), nIndexHint=-1)
        at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:127
    #19 0x00007fffee0dd7c9 in AccessibleBrowseBoxBase::commitEvent (this=0x55555be2f520, _nEventId=7, _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), _rOldValue=uno::Any(void))
        at /home/michi/development/git/libreoffice/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx:310
    #20 0x00007fffee0d8fb0 in AccessibleBrowseBoxAccess::commitEvent (this=0x7fffd804ba00, nEventId=7, rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), rOldValue=uno::Any(void))
        at vcl/inc/accessibility/AccessibleBrowseBox.hxx:250
    #21 0x00007ffff08806b6 in BrowseBox::commitBrowseBoxEvent (this=0x55555bdc8bf0, _nEventId=7, _rNewValue=uno::Any("com.sun.star.accessibility.XAccessible": ...), _rOldValue=uno::Any(void))
        at /home/michi/development/git/libreoffice/svtools/source/brwbox/brwbox3.cxx:406
    #22 0x00007ffff08a090b in svt::EditBrowseBox::implCreateActiveAccessible (this=0x55555bdc8bf0) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox2.cxx:87
    #23 0x00007ffff089c7af in svt::EditBrowseBox::ActivateCell (this=0x55555bdc8bf0, nRow=0, nCol=1, bCellFocus=true) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:945
    #24 0x00007ffff089e6c0 in svt::EditBrowseBox::ActivateCell (this=0x55555bdc8bf0) at include/svtools/editbrowsebox.hxx:1029
    #25 0x00007ffff089b291 in svt::EditBrowseBox::implActivateCellOnMouseEvent (this=0x55555bdc8bf0, _rEvt=..., _bUp=true) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:482
    #26 0x00007ffff089b43c in svt::EditBrowseBox::MouseButtonUp (this=0x55555bdc8bf0, rEvt=...) at /home/michi/development/git/libreoffice/svtools/source/brwbox/editbrowsebox.cxx:468
    #27 0x00007ffff08876ad in BrowserDataWin::MouseButtonUp (this=0x555556fed350, rEvt=...) at /home/michi/development/git/libreoffice/svtools/source/brwbox/datwin.cxx:490
    #28 0x00007fffee4b1055 in ImplHandleMouseEvent (xWindow=..., nSVEvent=NotifyEventType::MOUSEBUTTONUP, bMouseLeave=false, nX=73, nY=89, nMsgTime=10536810, nCode=1, nMode=(MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT))
        at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:719
    #29 0x00007fffee4b5571 in ImplHandleSalMouseButtonUp (pWindow=0x7fffd80482c0, pEvent=0x7fffffff8118) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2351
    #30 0x00007fffee4b4280 in ImplWindowFrameProc (_pWindow=0x7fffd80482c0, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2700
    #31 0x00007fffe435910c in SalFrame::CallCallback (this=0x555556abc050, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at vcl/inc/salframe.hxx:311
    #32 0x00007fffe43563b5 in QtFrame::CallCallback (this=0x555556abc040, nEvent=SalEvent::MouseButtonUp, pEvent=0x7fffffff8118) at vcl/inc/qt6/../qt5/QtFrame.hxx:235
    #33 0x00007fffe445475a in QtWidget::handleMouseButtonEvent (rFrame=..., pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:117
    #34 0x00007fffe4454a11 in QtWidget::mouseReleaseEvent (this=0x7fffd8048d90, pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:128
    #35 0x00007fffe149f8ad in QWidget::event (this=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8964
    #36 0x00007fffe44569ae in QtWidget::event (this=0x7fffd8048d90, pEvent=0x7fffffff93c0) at vcl/qt6/../qt5/QtWidget.cxx:678
    #37 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x7fffd8048d90, e=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #38 0x00007fffe13e4af2 in QApplication::notify (this=0x555555564d60, receiver=0x7fffd8048d90, e=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2782
    #39 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #40 0x00007fffe344c119 in QCoreApplication::sendSpontaneousEvent (receiver=0x7fffd8048d90, event=0x7fffffff93c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1566
    #41 0x00007fffe13e3747 in QApplicationPrivate::sendMouseEvent
        (receiver=0x7fffd8048d90, event=0x7fffffff93c0, alienWidget=0x7fffd8048d90, nativeWidget=0x555556f2f660, buttonDown=0x7fffe1fca488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
        at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2363
    #42 0x00007fffe14ded48 in QWidgetWindow::handleMouseEvent (this=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:669
    #43 0x00007fffe14dd555 in QWidgetWindow::event (this=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292
    #44 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x5555577f5b40, e=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #45 0x00007fffe13e6d3d in QApplication::notify (this=0x555555564d60, receiver=0x5555577f5b40, e=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #46 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #47 0x00007fffe344c119 in QCoreApplication::sendSpontaneousEvent (receiver=0x5555577f5b40, event=0x7fffffffa498) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1566
    #48 0x00007fffe2285ca2 in QGuiApplicationPrivate::processMouseEvent (e=0x7fffd0001560) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2485
    #49 0x00007fffe2284e66 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x7fffd0001560) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2212
    #50 0x00007fffe236d57d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
    #51 0x00007fffe236d42e in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082
    #52 0x00007fffdf8b2685 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555c8390) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:526
    #53 0x00007fffdf8ce4e5 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}::operator()() const (this=0x7fffffffa9a0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #54 0x00007fffdf8ce40d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::{lambda()#1}&&) (args=0x7fffd0002f98, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #55 0x00007fffdf8ce32f in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**) (f=(void (QtWaylandClient::QWaylandDisplay::*)(class QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf8b2640 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555c8390, arg=0x7fffd0002f98)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #56 0x00007fffdf8ce2a1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(class QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf8b2640 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555c8390, arg=0x7fffd0002f98)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #57 0x00007fffdf8ce1cb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555e1390, r=0x5555555c8390, a=0x7fffd0002f98, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #58 0x00007fffe3461362 in QtPrivate::QSlotObjectBase::call (this=0x5555555e1390, r=0x5555555c8390, a=0x7fffd0002f98) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #59 0x00007fffe350ad5c in QMetaCallEvent::placeMetaCall (this=0x7fffd0002f50, object=0x5555555c8390) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #60 0x00007fffe350cab1 in QObject::event (this=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #61 0x00007fffe13e2e20 in QApplicationPrivate::notify_helper (this=0x555555577ae0, receiver=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305
    #62 0x00007fffe13e6d3d in QApplication::notify (this=0x555555564d60, receiver=0x5555555c8390, e=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255
    #63 0x00007fffe344b419 in QCoreApplication::notifyInternal2 (receiver=0x5555555c8390, event=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1112
    #64 0x00007fffe344c089 in QCoreApplication::sendEvent (receiver=0x5555555c8390, event=0x7fffd0002f50) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1552
    #65 0x00007fffe344cfc8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55555559f110) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1892
    #66 0x00007fffe344becc in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1746
    #67 0x00007fffe3a3d4a1 in postEventSourceDispatch (s=0x5555555f0f80) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #68 0x00007fffea10b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #69 0x00007fffea10da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #70 0x00007fffea10e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #71 0x00007fffe3a3c6db in QEventDispatcherGlib::processEvents (this=0x555555568dc0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #72 0x00007fffe2b7a148 in QPAEventDispatcherGlib::processEvents (this=0x555555568dc0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #73 0x00007fffe4376a82 in QtInstance::ImplYield (this=0x5555555f5a00, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:485
    #74 0x00007fffe4379d51 in QtInstance::DoYield (this=0x5555555f5a00, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:496
    #75 0x00007fffeec869b6 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #76 0x00007fffeec862cf in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #77 0x00007fffeec860b0 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #78 0x00007ffff7b287f9 in desktop::Desktop::Main (this=0x7fffffffd5d0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #79 0x00007fffeeca7e36 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #80 0x00007fffeeca9a29 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #81 0x00007ffff7ba20da in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #82 0x0000555555555a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #83 0x0000555555555a47 in main (argc=2, argv=0x7fffffffd7d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Id3832663f5c5c66a4d624054fee4d48219732b95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181155
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 71d1432)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181542
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
tdf-gerrit pushed a commit that referenced this pull request Feb 14, 2025
As the GVariant format string doc says [1] about
pointers:

> The `&` character is used to indicate that serialised data should be
> directly exchanged via a pointer.
>
> Currently, the only use for this character is when it is applied to a
> string (ie: `&s`, `&o` or `&g`). For `g_variant_new()` this has absolutely no
> effect. The string is collected and duplicated normally. For
> `g_variant_get()` it means that instead of creating a newly allocated copy
> of the string, a pointer to the serialised data is returned. This
> pointer should not be freed. Validity checks are performed to ensure
> that the string data will always be properly nul-terminated.

Therefore, freeing the string with

    g_free(pLabel);

is incorrect and resulted in a crash when starting Writer with
the gtk4 VCL plugin, s. backtrace below.

Use just "s" instead of "&s" for the format string to get a
string copy that is owned and can be freed.

(Dropping the `g_free` might be an alternative and avoid
a string copy, but it's not instantly clear to me whether
using "a pointer to the serialised data" is safe without
digging any deeper what exactly that means.)

Backtrace:

    free(): invalid pointer
    [New Thread 125500.125502]
    [New Thread 125500.125503]
    [New Thread 125500.125504]
    [New Thread 125500.125505]
    [New Thread 125500.125506]
    [New Thread 125500.125507]
    [New Thread 125500.125508]
    [New Thread 125500.125510]
    [New Thread 125500.125511]
    [New Thread 125500.125525]

    Thread 1 received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (rr) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f0bb969de2f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007f0bb9649d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f0bb96324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f0bb963332d in __libc_message_impl (fmt=fmt@entry=0x7f0bb97b5303 "%s\n") at ../sysdeps/posix/libc_fatal.c:134
    #5  0x00007f0bb96a7965 in malloc_printerr (str=str@entry=0x7f0bb97b3082 "free(): invalid pointer") at ./malloc/malloc.c:5772
    #6  0x00007f0bb96a9bf4 in _int_free (av=0x7f0bb97f1ac0 <main_arena>, p=<optimized out>, have_lock=have_lock@entry=0) at ./malloc/malloc.c:4507
    #7  0x00007f0bb96ac43f in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3398
    #8  0x00007f0ba62b908a in (anonymous namespace)::MenuHelper::get_item_label (this=0x55b0c8dcd360, rIdent="standard") at vcl/unx/gtk4/../gtk3/gtkinst.cxx:5684
    #9  0x00007f0ba63013d8 in (anonymous namespace)::GtkInstanceMenu::get_label (this=0x55b0c8dcd360, rIdent="standard") at vcl/unx/gtk4/../gtk3/gtkinst.cxx:11694
    #10 0x00007f0ba6301b2f in virtual thunk to (anonymous namespace)::GtkInstanceMenu::get_label(rtl::OUString const&) const () at vcl/unx/gtk4/../gtk3/gtkinst.cxx:11823
    #11 0x00007f0bb482d026 in (anonymous namespace)::SelectionTypePopup::GetItemTextForState (this=0x7ffed304ad80, nState=0) at /home/michi/development/git/libreoffice/svx/source/stbctrls/selctrl.cxx:56
    #12 0x00007f0bb482cc59 in SvxSelectionModeControl::StateChangedAtStatusBarControl (this=0x55b0c8d2d6e0, eState=SfxItemState::DEFAULT, pState=0x55b0c8f331c0) at /home/michi/development/git/libreoffice/svx/source/stbctrls/selctrl.cxx:128
    #13 0x00007f0bb5f9af1e in SfxStatusBarControl::statusChanged (this=0x55b0c8d2d6e0, rEvent=...) at /home/michi/development/git/libreoffice/sfx2/source/statbar/stbitem.cxx:263
    #14 0x00007f0bb5a9d4c8 in SfxDispatchController_Impl::addStatusListener (this=0x55b0c8ed6380, aListener=uno::Reference to (SvxSelectionModeControl *) 0x55b0c8d2d6f0, aURL=...)
        at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:841
    #15 0x00007f0bb5a9d174 in SfxOfficeDispatch::addStatusListener (this=0x55b0c8f280e0, aListener=uno::Reference to (SvxSelectionModeControl *) 0x55b0c8d2d6f0, aURL=...)
        at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:283
    #16 0x00007f0bb28a8577 in svt::StatusbarController::bindListener (this=0x55b0c8d2d6e0) at /home/michi/development/git/libreoffice/svtools/source/uno/statusbarcontroller.cxx:462
    #17 0x00007f0bb28a7f09 in svt::StatusbarController::update (this=0x55b0c8d2d6e0) at /home/michi/development/git/libreoffice/svtools/source/uno/statusbarcontroller.cxx:169
    #18 0x00007f0bb6d41a6b in framework::(anonymous namespace)::lcl_UpdateController<std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > > >::operator() (this=0x7ffed304b547, rElement={...})
        at /home/michi/development/git/libreoffice/framework/source/uielement/statusbarmanager.cxx:69
    #19 0x00007f0bb6d3e5ef in std::for_each<__gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > >, std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > >, std::bidirectional_iterator_tag>, framework::(anonymous namespace)::lcl_UpdateController<std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > > > > (__first={...}, __last={...}, __f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_algo.h:3786
    #20 0x00007f0bb6d3d9a5 in framework::StatusBarManager::UpdateControllers (this=0x55b0c8cefc90) at /home/michi/development/git/libreoffice/framework/source/uielement/statusbarmanager.cxx:269
    #21 0x00007f0bb6d4028b in framework::StatusBarManager::FillStatusBar (this=0x55b0c8cefc90, rItemContainer=uno::Reference to (framework::ConstItemContainer *) 0x55b0c8e017e8)
        at /home/michi/development/git/libreoffice/framework/source/uielement/statusbarmanager.cxx:479
    #22 0x00007f0bb6d4ae38 in framework::StatusBarWrapper::initialize (this=0x55b0c8d0f060, aArguments=uno::Sequence of length 4 = {...}) at /home/michi/development/git/libreoffice/framework/source/uielement/statusbarwrapper.cxx:117
    #23 0x00007f0bb6df9104 in framework::MenuBarFactory::CreateUIElement
        (ResourceURL="private:resource/statusbar/statusbar", Args=uno::Sequence of length 2 = {...}, ResourceType=u"private:resource/statusbar/", _xMenuBar=uno::Reference to (framework::StatusBarWrapper *) 0x55b0c8d0f0f8, _rxContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x55b0ba8b8308) at /home/michi/development/git/libreoffice/framework/source/uifactory/menubarfactory.cxx:158
    #24 0x00007f0bb6df9c0a in (anonymous namespace)::StatusBarFactory::createUIElement (this=0x55b0c8e03800, ResourceURL="private:resource/statusbar/statusbar", Args=uno::Sequence of length 2 = {...})
        at /home/michi/development/git/libreoffice/framework/source/uifactory/statusbarfactory.cxx:68
    #25 0x00007f0bb6df9d74 in non-virtual thunk to (anonymous namespace)::StatusBarFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
        at /home/michi/development/git/libreoffice/instdir/program/libfwklo.so
    #26 0x00007f0bb6e01290 in (anonymous namespace)::UIElementFactoryManager::createUIElement (this=0x55b0bf803260, ResourceURL="private:resource/statusbar/statusbar", Args=uno::Sequence of length 2 = {...})
        at /home/michi/development/git/libreoffice/framework/source/uifactory/uielementfactorymanager.cxx:440
    #27 0x00007f0bb6e024f4 in non-virtual thunk to (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
        at /home/michi/development/git/libreoffice/instdir/program/libfwklo.so
    #28 0x00007f0bb6b6d427 in framework::LayoutManager::implts_createElement (this=0x55b0c1e3a170, aName="private:resource/statusbar/statusbar")
        at /home/michi/development/git/libreoffice/framework/source/layoutmanager/layoutmanager.cxx:730
    #29 0x00007f0bb6b71852 in framework::LayoutManager::implts_createStatusBar (this=0x55b0c1e3a170, aStatusBarName="private:resource/statusbar/statusbar")
        at /home/michi/development/git/libreoffice/framework/source/layoutmanager/layoutmanager.cxx:849
    #30 0x00007f0bb6b75bcc in framework::LayoutManager::createElement (this=0x55b0c1e3a170, aName="private:resource/statusbar/statusbar") at /home/michi/development/git/libreoffice/framework/source/layoutmanager/layoutmanager.cxx:1443
    #31 0x00007f0bb6b76b57 in framework::LayoutManager::requestElement (this=0x55b0c1e3a170, rResourceURL="private:resource/statusbar/statusbar")
        at /home/michi/development/git/libreoffice/framework/source/layoutmanager/layoutmanager.cxx:1570
    #32 0x00007f0bb595f0b5 in SfxWorkWindow::UpdateStatusBar_Impl (this=0x55b0bf82f570) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1471
    #33 0x00007f0bb595e9a0 in SfxWorkWindow::UpdateObjectBars_Impl2 (this=0x55b0bf82f570) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1242
    #34 0x00007f0bb595e001 in SfxWorkWindow::UpdateObjectBars_Impl (this=0x55b0bf82f570) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1095
    #35 0x00007f0bb59ca573 in SfxDispatcher::Update_Impl (this=0x55b0c742b5b0, bForce=false) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1123
    #36 0x00007f0bb6003921 in SfxBaseController::ConnectSfxFrame_Impl (this=0x55b0c7469930, i_eConnect=SfxBaseController::E_CONNECT) at /home/michi/development/git/libreoffice/sfx2/source/view/sfxbasecontroller.cxx:1207
    #37 0x00007f0bb6002ade in SfxBaseController::attachFrame (this=0x55b0c7469930, xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x55b0bfb36e40)
        at /home/michi/development/git/libreoffice/sfx2/source/view/sfxbasecontroller.cxx:531
    #38 0x00007f0bb5fd38b9 in utl::ConnectFrameControllerModel
        (xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x55b0bfb36e40, xController=uno::Reference to (SwXTextView *) 0x55b0c7469958, xModel=uno::Reference to (SwXTextDocument *) 0x55b0c71c0670)
        at include/unotools/fcm.hxx:57
    #39 0x00007f0bb5fcfec1 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView
        (i_rModel=uno::Reference to (SwXTextDocument *) 0x55b0c71c0670, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x55b0bfb36e40, i_rViewFactoryArgs=..., i_rViewName="Default")
        at /home/michi/development/git/libreoffice/sfx2/source/view/frmload.cxx:585
    #40 0x00007f0bb5fcd45c in (anonymous namespace)::SfxFrameLoader_Impl::load (this=0x55b0c22dc9f0, rArgs=uno::Sequence of length 9 = {...}, _rTargetFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x55b0bfb36e40)
        at /home/michi/development/git/libreoffice/sfx2/source/view/frmload.cxx:764
    #41 0x00007f0bb6bc2644 in framework::LoadEnv::impl_loadContent (this=0x55b0c1271ec8) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:1180
    #42 0x00007f0bb6bbf7a5 in framework::LoadEnv::start (this=0x55b0c1271ec8) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:415
    #43 0x00007f0bb6bbd452 in framework::LoadEnv::startLoading
        (this=0x55b0c1271ec8, sURL="private:factory/swriter", lMediaDescriptor=uno::Sequence of length 4 = {...}, xBaseFrame=uno::Reference to (framework::Desktop *) 0x55b0bbbee8c8, sTarget="_default", nSearchFlags=0, eFeature=(LoadEnvFeatu--Type <RET> for more, q to quit, c to continue without paging--
    res::WorkWithUI | LoadEnvFeatures::AllowContentHandler)) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:311
    #44 0x00007f0bb6a56311 in framework::LoadDispatcher::impl_dispatch (this=0x55b0c1271e70, rURL=..., lArguments=uno::Sequence of length 4 = {...}, xListener=empty uno::Reference)
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:107
    #45 0x00007f0bb6a57071 in framework::LoadDispatcher::dispatchWithReturnValue (this=0x55b0c1271e70, rURL=..., lArguments=uno::Sequence of length 4 = {...})
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:60
    #46 0x00007f0bb6a57114 in non-virtual thunk to framework::LoadDispatcher::dispatchWithReturnValue(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:60
    #47 0x00007f0bb80110b0 in comphelper::SynchronousDispatch::dispatch (xStartPoint=uno::Reference to (framework::Desktop *) 0x55b0bbbee8b8, sURL="private:factory/swriter", sTarget="_default", lArguments=uno::Sequence of length 4 = {...})
        at /home/michi/development/git/libreoffice/comphelper/source/misc/synchronousdispatch.cxx:62
    #48 0x00007f0bb99757fd in desktop::DispatchWatcher::executeDispatchRequests (this=0x55b0c16043b0, aDispatchRequestsList=std::__debug::vector of length 1, capacity 1 = {...}, bNoTerminate=false)
        at /home/michi/development/git/libreoffice/desktop/source/app/dispatchwatcher.cxx:529
    #49 0x00007f0bb9993b5a in desktop::RequestHandler::ExecuteCmdLineRequests (aRequest=..., noTerminate=false) at /home/michi/development/git/libreoffice/desktop/source/app/officeipcthread.cxx:1347
    #50 0x00007f0bb992f196 in desktop::Desktop::OpenDefault () at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:2276
    #51 0x00007f0bb992e5cd in desktop::Desktop::OpenClients () at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:2220
    #52 0x00007f0bb992c3a3 in desktop::Desktop::OpenClients_Impl (this=0x7ffed3055280) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1979
    #53 0x00007f0bb992aa3d in desktop::Desktop::LinkStubOpenClients_Impl (instance=0x7ffed3055280, data=0x0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1963
    #54 0x00007f0bb02ac091 in Link<void*, void>::Call (this=0x55b0bffb6ba8, data=0x0) at include/tools/link.hxx:105
    #55 0x00007f0bb02a8291 in ImplHandleUserEvent (pSVEvent=0x55b0bffb6ba0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2285
    #56 0x00007f0bb02a51ba in ImplWindowFrameProc (_pWindow=0x55b0bfc9e9b0, nEvent=SalEvent::UserEvent, pEvent=0x55b0bffb6ba0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2849
    #57 0x00007f0bb0e665bc in SalFrame::CallCallback (this=0x55b0bf7eaa50, nEvent=SalEvent::UserEvent, pEvent=0x55b0bffb6ba0) at vcl/inc/salframe.hxx:311
    #58 0x00007f0bb0e8ef5f in SalGenericDisplay::ProcessEvent (this=0x55b0baa61510, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #59 0x00007f0bb09aaddd in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffed3053530) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #60 0x00007f0bb09aacb6 in SalUserEventList::DispatchUserEvents (this=0x55b0baa61510, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #61 0x00007f0bb0e8eeb5 in SalGenericDisplay::DispatchInternalEvent (this=0x55b0baa61510, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #62 0x00007f0ba628536f in call_userEventFn (data=0x55b0ba8d13e0) at vcl/unx/gtk4/../gtk3/gtkdata.cxx:827
    #63 0x00007f0babd03d5f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #64 0x00007f0babd05fd7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #65 0x00007f0babd06740 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #66 0x00007f0ba62840ac in GtkSalData::Yield (this=0x55b0ba8d13e0, bWait=true, bHandleAllCurrentEvents=false) at vcl/unx/gtk4/../gtk3/gtkdata.cxx:405
    #67 0x00007f0ba6289863 in GtkInstance::DoYield (this=0x55b0ba8d1290, bWait=true, bHandleAllCurrentEvents=false) at vcl/unx/gtk4/../gtk3/gtkinst.cxx:439
    #68 0x00007f0bb0a75c06 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #69 0x00007f0bb0a7551f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #70 0x00007f0bb0a75300 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #71 0x00007f0bb9928a19 in desktop::Desktop::Main (this=0x7ffed3055280) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #72 0x00007f0bb0a970d6 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #73 0x00007f0bb0a98cc9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #74 0x00007f0bb99a22fa in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #75 0x000055b09e4b3a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #76 0x000055b09e4b3a47 in main (argc=2, argv=0x7ffed3055488) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

[1] https://docs.gtk.org/glib/gvariant-format-strings.html#pointers

Change-Id: I87bd2840ac573426264d1dff2fd40ab292f09fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181666
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Feb 20, 2025
According to [1], libandroid_support is no longer needed
for API level >= 21. Quoting from the issue:

> Dropping KitKat will have greater benefits than the other API levels
> we've dropped support for over the years (and while not the only reason,
> one motivation for the prior support removals was getting us
> closer to being able to drop 19/20):
>
> 1. libandroid_support will no longer be needed.
>   i. libandroid_support
>      adds to the APK size for all apps. Even if your minSdkVersion is
>      21+, libc++ is built for the lowest API level supported by the NDK,
>      so it includes some pieces of libandroid_support.
> [...]

The LO Android build no longer supports API versions < 21
since:

    commit c2fc2c8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Dec 5 09:57:22 2023 +0100

        android: Bump minSdkVersion to 21 (Android 5.0)

The linker flag was otherwise now causing linker errors in an NDK 28
build in a WIP branch including a fix for tdf#162769, using

    --with-distro=LibreOfficeAndroidX86`
    --with-android-sdk=/home/michi/Android/Sdk
    --with-android-ndk=/home/michi/Android/Sdk/ndk/28.0.13004108/

Error:

    Linking /home/michi/development/git/libreoffice-WORKTREE-android/android/obj/local/x86/liblo-native-code.so
    ld.lld: error: unable to find library -landroid_support
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)

The linker flag had already been dropped earlier in

    commit a7f6338
    Author: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
    Date:   Wed Aug 7 12:06:25 2019 +0200

        android: support NDK 19 and above (20 as of this commit)

but was restored in

    commit f68a36b
    Date:   Fri Oct 25 07:42:30 2019 +0200

        android: Fix problems with unwinding in the Online-based Android app.

        This partially reverts a7f6338.  The
        problem is that with that approach, the problems with unwinding as
        described in 312eeee were plaguing the
        Online-based Android app, leading to mysterious crashes with stack
        traces like:

         #00 pc 0005f2b6  /apex/com.android.runtime/lib/bionic/libc.so (abort+166) (BuildId: 68c87e04526a60689ecb5deb329804a0)
         #1 pc 05caaae7  /data/app/libreoffice.debug-fBEOIUwPHY3_k3eQid159Q==/lib/arm/liblo-native-code.so (BuildId: 1c3d0e6336ddfc3578e1c186944160252a750b8b)
         ...
         #6 pc 07452e43  /data/app/libreoffice.debug-fBEOIUwPHY3_k3eQid159Q==/lib/arm/liblo-native-code.so (BuildId: 1c3d0e6336ddfc3578e1c186944160252a750b8b)
         #7 pc 0005a37c  /apex/com.android.runtime/lib/bionic/libc.so (__restore_rt) (BuildId: 68c87e04526a60689ecb5deb329804a0)
         #8 pc 0005f2b2  /apex/com.android.runtime/lib/bionic/libc.so (abort+162) (BuildId: 68c87e04526a60689ecb5deb329804a0)
         #9 pc 07565d3b  /data/app/libreoffice.debug-fBEOIUwPHY3_k3eQid159Q==/lib/arm/liblo-native-code.so (BuildId: 1c3d0e6336ddfc3578e1c186944160252a750b8b)
         ...
         #11 pc 07565641  /data/app/libreoffice.debug-fBEOIUwPHY3_k3eQid159Q==/lib/arm/liblo-native-code.so (BuildId: 1c3d0e6336ddfc3578e1c186944160252a750b8b)
         #12 pc 0001e394  /apex/com.android.runtime/lib/bionic/libm.so (__gnu_Unwind_RaiseException+108) (BuildId: 0ee3a75927e0da4fa0fe29469ccf8b39)
         #13 pc 0001eee8  /apex/com.android.runtime/lib/bionic/libm.so (_Unwind_RaiseException+20) (BuildId: 0ee3a75927e0da4fa0fe29469ccf8b39)

Hopefully whatever was the problem back then is not
retriggered by dropping `-landroid_support` again
these days.

[1] android/ndk#1751

Change-Id: Icd45abee58e13a2fc77d78d12e823a8045272b4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181898
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
tdf-gerrit pushed a commit that referenced this pull request Feb 26, 2025
So far, the ValueItemAcc objects created by
ValueSet were never disposed.

While this is a preexisting issue, this started triggering
crashes with the qt6 VCL plugin after

    Change-Id: If448008b3a6dc7b22a06b6ed551b08a40b2d5de3
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Feb 25 12:14:24 2025 +0100

        valueset a11y: Use OAccessibleComponentHelper for ValueItemAcc

as described in its commit message.

Fix this by disposing the objects in ValueSet::ImplDeleteItems,
and not just sending an AccessibleEventId::CHILD event.

Adjust the logic to be independent of whether the item is visible,
but instead do this for all items that have an associated ValueItemAcc.
Add a new `bCreate` param to ValueSetItem::GetAccessible and pass
false here to avoid creating new ones.

In the ValueSet dtor, call `ImplDeleteItems` before invalidating
the accessible object, as it may still be needed in `ImplDeleteItems`
to send the events.

This fixes the crash on exit for the scenario described in the
above-mentioned commit.

Backtrace of such a crash/assert:

    soffice.bin: /home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:142: bool (anonymous namespace)::implLookupClient(const AccessibleEventNotifier::TClientId, ClientMap::iterator &): Assertion `rClients.end() != rPos && "AccessibleEventNotifier::implLookupClient: invalid client id " "(did you register your client?)!"' failed.
    [New Thread 9546.9547]
    [New Thread 9546.9548]
    [New Thread 9546.9549]
    [New Thread 9546.9557]

    Thread 1 received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    warning: 44     ./nptl/pthread_kill.c: No such file or directory
    (rr) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007ff8c289de2f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78
    #2  0x00007ff8c2849d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007ff8c28324f0 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007ff8c2832418 in __assert_fail_base
        (fmt=0x7ff8c29b6ca0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ff8c0f27cc6 "rClients.end() != rPos && \"AccessibleEventNotifier::implLookupClient: invalid client id \" \"(did you register your client?)!\"", file=file@entry=0x7ff8c0f360b9 "/home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx", line=line@entry=142, function=function@entry=0x7ff8c0efd262 "bool (anonymous namespace)::implLookupClient(const AccessibleEventNotifier::TClientId, ClientMap::iterator &)") at ./assert/assert.c:96
    #5  0x00007ff8c2842612 in __assert_fail
        (assertion=0x7ff8c0f27cc6 "rClients.end() != rPos && \"AccessibleEventNotifier::implLookupClient: invalid client id \" \"(did you register your client?)!\"", file=0x7ff8c0f360b9 "/home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx", line=142, function=0x7ff8c0efd262 "bool (anonymous namespace)::implLookupClient(const AccessibleEventNotifier::TClientId, ClientMap::iterator &)") at ./assert/assert.c:105
    #6  0x00007ff8c10eb4c8 in (anonymous namespace)::implLookupClient (nClient=24, rPos=...) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:140
    #7  0x00007ff8c10eb938 in comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing (_nClient=24, _rxEventSource=uno::Reference to (ValueItemAcc *) 0x558da6f7a220)
        at /home/michi/development/git/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:185
    #8  0x00007ff8c10e751d in comphelper::OCommonAccessibleComponent::disposing (this=0x558da6f7a220) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:61
    #9  0x00007ff8c0b3cee0 in cppu::WeakComponentImplHelperBase::dispose (this=0x558da6f7a220) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase.cxx:104
    #10 0x00007ff8bb84a0c5 in cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext2, com::sun::star::accessibility::XAccessibleEventBroadcaster>::dispose (this=0x558da6f7a220)
        at include/cppuhelper/compbase.hxx:90
    #11 0x00007ff8c0b3cc07 in cppu::WeakComponentImplHelperBase::release (this=0x558da6f7a220) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase.cxx:79
    #12 0x00007ff8bb84d6c5 in cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext2, com::sun::star::accessibility::XAccessibleEventBroadcaster>::release (this=0x558da6f7a220)
        at include/cppuhelper/compbase.hxx:86
    #13 0x00007ff8bb8e0b95 in cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>::release (this=0x558da6f7a220) at include/cppuhelper/implbase.hxx:171
    #14 0x00007ff8bb97d595 in cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper, com::sun::star::accessibility::XAccessible>::release (this=0x558da6f7a220) at include/cppuhelper/implbase.hxx:171
    #15 0x00007ff8af309baa in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>::~Reference (this=0x558da6f7a428) at include/com/sun/star/uno/Reference.hxx:114
    #16 0x00007ff8af321bad in QtAccessibleWidget::~QtAccessibleWidget (this=0x558da6f7a3e0) at vcl/inc/qt6/../qt5/QtAccessibleWidget.hxx:39
    #17 0x00007ff8af321c49 in QtAccessibleWidget::~QtAccessibleWidget (this=0x558da6f7a3e0) at vcl/inc/qt6/../qt5/QtAccessibleWidget.hxx:39
    #18 0x00007ff8ad8faf48 in QAccessibleCache::deleteInterface (this=0x558d9fbd0ac0, id=2147483692, obj=0x558da6eecdb0) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/qaccessiblecache.cpp:173
    #19 0x00007ff8ad8fad78 in QAccessibleCache::~QAccessibleCache (this=0x558d9fbd0ac0) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/qaccessiblecache.cpp:31
    #20 0x00007ff8ad8faf8d in QAccessibleCache::~QAccessibleCache (this=0x558d9fbd0ac0) at /home/michi/development/git/qt5/qtbase/src/gui/accessible/qaccessiblecache.cpp:29
    #21 0x00007ff8ad8fb027 in cleanupAccessibleCache () at /home/michi/development/git/qt5/qtbase/src/gui/accessible/qaccessiblecache.cpp:24
    #22 0x00007ff8ae44a792 in qt_call_post_routines () at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:343
    #23 0x00007ff8ac3ddee4 in QApplication::~QApplication (this=0x558d9e8c76c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:667
    #24 0x00007ff8ac3de29d in QApplication::~QApplication (this=0x558d9e8c76c0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:663
    #25 0x00007ff8af3d63b8 in std::default_delete<QApplication>::operator() (this=0x558d9e955870, __ptr=0x558d9e8c76c0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:93
    #26 0x00007ff8af3d7da8 in std::__uniq_ptr_impl<QApplication, std::default_delete<QApplication> >::reset (this=0x558d9e955870, __p=0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:205
    #27 0x00007ff8af3cfcbd in std::unique_ptr<QApplication, std::default_delete<QApplication> >::reset (this=0x558d9e955870, __p=0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:504
    #28 0x00007ff8af3c7b34 in QtInstance::~QtInstance (this=0x558d9e9556e0) at vcl/qt6/../qt5/QtInstance.cxx:323
    #29 0x00007ff8af3c7c29 in QtInstance::~QtInstance (this=0x558d9e9556e0) at vcl/qt6/../qt5/QtInstance.cxx:320
    #30 0x00007ff8b9bb1c54 in DestroySalInstance (pInst=0x558d9e9556f0) at /home/michi/development/git/libreoffice/vcl/source/app/salplug.cxx:361
    #31 0x00007ff8b9ca1509 in DeInitVCL () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:629
    #32 0x00007ff8b9c9fa4f in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:241
    #33 0x00007ff8b9ca15e9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #34 0x00007ff8c2b9f4ba in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #35 0x0000558d9330ba6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #36 0x0000558d9330ba47 in main (argc=2, argv=0x7ffd2669fb48) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Ifa7e18393edcc1889bcb390fa453c611d9345bdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182174
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants