Skip to content

Conversation

@zonnebloempje
Copy link

No description provided.

@github-actions
Copy link

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

@github-actions github-actions bot closed this Feb 12, 2023
tdf-gerrit pushed a commit that referenced this pull request Feb 12, 2023
sporadically reproducible with tsan and
./instdir/program/soffice.bin --headless --convert-to pdf ~/forum-mso-en4-802501.xlsx

move getTables().applyAutoFilters(), which wants to query tab 1 while
tab 1 is still getting imported, until after the threaded import has
completed.

This call was moved before in:

commit edd51b8
Date:   Thu Aug 15 16:23:46 2013 +0100

    fix for bnc#834705 missing drop downs for autofilter

==================
WARNING: ThreadSanitizer: data race (pid=3791886)
  Read of size 8 at 0x7b5000040f20 by thread T7 (mutexes: write M0, write M1):
    #0 __gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>::__normal_iterator(unsigned long const* const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20 (libsclo.so+0x3d31c4) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #1 std::vector<unsigned long, std::allocator<unsigned long>>::cend() const /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:960:16 (libsclo.so+0x3d31c4)
    #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::cbegin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3771:34 (libsclo.so+0x3d31c4)
    #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::begin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3753:12 (libsclo.so+0x3d31c4)
    #4 ScColumn::InitBlockPosition(sc::ColumnBlockConstPosition&) const core/sc/source/core/data/column3.cxx:1135:35 (libsclo.so+0x3d31c4)
    #5 ScTable::GetDataArea(short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/table1.cxx:908:19 (libsclo.so+0x637b39) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #6 ScDocument::GetDataArea(short, short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/document.cxx:1104:23 (libsclo.so+0x49b696) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #7 ScDBData::ExtendDataArea(ScDocument const&) core/sc/source/core/tool/dbdata.cxx:654:10 (libsclo.so+0x741e77) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #8 ScDocument::GetFilterEntries(short, int, short, ScFilterEntries&) core/sc/source/core/data/documen3.cxx:1577:14 (libsclo.so+0x46e7a6) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #9 (anonymous namespace)::fillQueryParam(ScQueryParam&, ScDocument*, com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1164:27 (libsclo.so+0xf7dd72) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #10 ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1380:5 (libsclo.so+0xf7dd72)
    #11 non-virtual thunk to ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx (libsclo.so+0xf7e2c2) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #12 oox::xls::AutoFilter::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:803:22 (libscfiltlo.so+0x3cca2c) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #13 oox::xls::AutoFilterBuffer::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:950:22 (libscfiltlo.so+0x3cdc0b) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #14 oox::xls::Table::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:143:23 (libscfiltlo.so+0x4b9268) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #15 void std::__invoke_impl<void, void (oox::xls::Table::*&)(), oox::xls::Table&>(std::__invoke_memfun_ref, void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:67:14 (libscfiltlo.so+0x4b9d96) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #16 std::__invoke_result<void (oox::xls::Table::*&)(), oox::xls::Table&>::type std::__invoke<void (oox::xls::Table::*&)(), oox::xls::Table&>(void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14 (libscfiltlo.so+0x4b9d96)
    #17 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::__call<void, oox::xls::Table&, 0ul>(std::tuple<oox::xls::Table&>&&, std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11 (libscfiltlo.so+0x4b9d96)
    #18 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::operator()<oox::xls::Table&, void>(oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17 (libscfiltlo.so+0x4b9d96)
    #19 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>::operator()(std::pair<int const, std::shared_ptr<oox::xls::Table>> const&) core/include/oox/helper/refmap.hxx:122:89 (libscfiltlo.so+0x4b9d96)
    #20 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>> std::for_each<std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>>(std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:3787:2 (libscfiltlo.so+0x4b9d96)
    #21 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEach<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>(std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()> const&) const core/include/oox/helper/refmap.hxx:71:29 (libscfiltlo.so+0x4b9d96)
    #22 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEachMem<void (oox::xls::Table::*)()>(void (oox::xls::Table::*)()) const core/include/oox/helper/refmap.hxx:79:29 (libscfiltlo.so+0x4b9d96)
    #23 oox::xls::TableBuffer::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:179:16 (libscfiltlo.so+0x4b9d96)
    #24 oox::xls::WorksheetGlobals::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:943:17 (libscfiltlo.so+0x4ee58e) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #25 oox::xls::WorksheetHelper::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:1625:17 (libscfiltlo.so+0x4f2cff) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #26 oox::xls::WorksheetFragment::finalizeImport() core/sc/source/filter/oox/worksheetfragment.cxx:632:5 (libscfiltlo.so+0x4e91cc) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #27 oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx:53:5 (libooxlo.so+0x1c20d9) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #28 non-virtual thunk to oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx (libooxlo.so+0x1c20d9)
    #29 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:910:36 (libexpwraplo.so+0x2a06a) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #30 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #31 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #32 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #33 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #34 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #35 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #36 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335)
    #37 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1)
    #38 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    #39 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267)
    #40 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    #41 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac)

  Previous write of size 8 at 0x7b5000040f20 by thread T6 (mutexes: write M2):
    #0 std::vector<unsigned long, std::allocator<unsigned long>>::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:556:29 (libsclo.so+0x2f6766) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #1 std::vector<unsigned long, std::allocator<unsigned long>>::insert(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:1435:2 (libsclo.so+0x2ffd3a) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::blocks_type::insert(unsigned long, unsigned long) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:99:15 (libsclo.so+0x2ffd3a)
    #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_new_block_to_middle(unsigned long, unsigned long, unsigned long, bool) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:4326:19 (libsclo.so+0x2ffd3a)
    #4 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_middle_of_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3999:19 (libsclo.so+0x3259fe) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #5 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_empty_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3313:12 (libsclo.so+0x3259fe)
    #6 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_impl<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1260:16 (libsclo.so+0x32492f) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #7 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set<double>(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> const&, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:754:20 (libsclo.so+0x4cc138) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #8 ScDocumentImport::setNumericCell(ScAddress const&, double) core/sc/source/core/data/documentimport.cxx:259:35 (libsclo.so+0x4cc138)
    #9 oox::xls::SheetDataBuffer::setValueCell(oox::xls::CellModel const&, double) core/sc/source/filter/oox/sheetdatabuffer.cxx:107:20 (libscfiltlo.so+0x4833c0) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #10 oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx:185:25 (libscfiltlo.so+0x48fed2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #11 non-virtual thunk to oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx (libscfiltlo.so+0x48fff9) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #12 oox::core::ContextHandler2Helper::implEndElement(int) core/oox/source/core/contexthandler2.cxx:125:9 (libooxlo.so+0x1ac82b) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #13 oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx:220:5 (libooxlo.so+0x1ac82b)
    #14 non-virtual thunk to oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx (libooxlo.so+0x1ac82b)
    #15 (anonymous namespace)::Entity::endElement() core/sax/source/fastparser/fastparser.cxx:515:27 (libexpwraplo.so+0x3042f) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #16 sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) core/sax/source/fastparser/fastparser.cxx:1029:25 (libexpwraplo.so+0x29d37) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #17 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:869:22 (libexpwraplo.so+0x29d37)
    #18 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #19 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #20 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #21 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #22 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #23 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #24 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335)
    #25 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1)
    #26 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    #27 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267)
    #28 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    #29 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac)

Change-Id: I7542432749fded8ab5e35f79cb221ad712f7802d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146430
Tested-by: Jenkins
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
(cherry picked from commit 6652768)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146531
Reviewed-by: Xisco Fauli <[email protected]>
wwjiang007 pushed a commit to wwjiang007/LibreOffice-core that referenced this pull request Feb 13, 2023
sporadically reproducible with tsan and
./instdir/program/soffice.bin --headless --convert-to pdf ~/forum-mso-en4-802501.xlsx

move getTables().applyAutoFilters(), which wants to query tab 1 while
tab 1 is still getting imported, until after the threaded import has
completed.

This call was moved before in:

commit edd51b8
Date:   Thu Aug 15 16:23:46 2013 +0100

    fix for bnc#834705 missing drop downs for autofilter

==================
WARNING: ThreadSanitizer: data race (pid=3791886)
  Read of size 8 at 0x7b5000040f20 by thread T7 (mutexes: write M0, write M1):
    #0 __gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>::__normal_iterator(unsigned long const* const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20 (libsclo.so+0x3d31c4) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#1 std::vector<unsigned long, std::allocator<unsigned long>>::cend() const /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:960:16 (libsclo.so+0x3d31c4)
    LibreOffice#2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::cbegin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3771:34 (libsclo.so+0x3d31c4)
    LibreOffice#3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::begin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3753:12 (libsclo.so+0x3d31c4)
    LibreOffice#4 ScColumn::InitBlockPosition(sc::ColumnBlockConstPosition&) const core/sc/source/core/data/column3.cxx:1135:35 (libsclo.so+0x3d31c4)
    LibreOffice#5 ScTable::GetDataArea(short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/table1.cxx:908:19 (libsclo.so+0x637b39) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#6 ScDocument::GetDataArea(short, short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/document.cxx:1104:23 (libsclo.so+0x49b696) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#7 ScDBData::ExtendDataArea(ScDocument const&) core/sc/source/core/tool/dbdata.cxx:654:10 (libsclo.so+0x741e77) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#8 ScDocument::GetFilterEntries(short, int, short, ScFilterEntries&) core/sc/source/core/data/documen3.cxx:1577:14 (libsclo.so+0x46e7a6) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#9 (anonymous namespace)::fillQueryParam(ScQueryParam&, ScDocument*, com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1164:27 (libsclo.so+0xf7dd72) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#10 ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1380:5 (libsclo.so+0xf7dd72)
    LibreOffice#11 non-virtual thunk to ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx (libsclo.so+0xf7e2c2) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#12 oox::xls::AutoFilter::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:803:22 (libscfiltlo.so+0x3cca2c) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#13 oox::xls::AutoFilterBuffer::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:950:22 (libscfiltlo.so+0x3cdc0b) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#14 oox::xls::Table::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:143:23 (libscfiltlo.so+0x4b9268) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#15 void std::__invoke_impl<void, void (oox::xls::Table::*&)(), oox::xls::Table&>(std::__invoke_memfun_ref, void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:67:14 (libscfiltlo.so+0x4b9d96) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#16 std::__invoke_result<void (oox::xls::Table::*&)(), oox::xls::Table&>::type std::__invoke<void (oox::xls::Table::*&)(), oox::xls::Table&>(void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14 (libscfiltlo.so+0x4b9d96)
    LibreOffice#17 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::__call<void, oox::xls::Table&, 0ul>(std::tuple<oox::xls::Table&>&&, std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11 (libscfiltlo.so+0x4b9d96)
    LibreOffice#18 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::operator()<oox::xls::Table&, void>(oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17 (libscfiltlo.so+0x4b9d96)
    LibreOffice#19 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>::operator()(std::pair<int const, std::shared_ptr<oox::xls::Table>> const&) core/include/oox/helper/refmap.hxx:122:89 (libscfiltlo.so+0x4b9d96)
    LibreOffice#20 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>> std::for_each<std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>>(std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:3787:2 (libscfiltlo.so+0x4b9d96)
    LibreOffice#21 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEach<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>(std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()> const&) const core/include/oox/helper/refmap.hxx:71:29 (libscfiltlo.so+0x4b9d96)
    LibreOffice#22 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEachMem<void (oox::xls::Table::*)()>(void (oox::xls::Table::*)()) const core/include/oox/helper/refmap.hxx:79:29 (libscfiltlo.so+0x4b9d96)
    LibreOffice#23 oox::xls::TableBuffer::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:179:16 (libscfiltlo.so+0x4b9d96)
    LibreOffice#24 oox::xls::WorksheetGlobals::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:943:17 (libscfiltlo.so+0x4ee58e) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#25 oox::xls::WorksheetHelper::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:1625:17 (libscfiltlo.so+0x4f2cff) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#26 oox::xls::WorksheetFragment::finalizeImport() core/sc/source/filter/oox/worksheetfragment.cxx:632:5 (libscfiltlo.so+0x4e91cc) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#27 oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx:53:5 (libooxlo.so+0x1c20d9) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#28 non-virtual thunk to oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx (libooxlo.so+0x1c20d9)
    LibreOffice#29 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:910:36 (libexpwraplo.so+0x2a06a) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#30 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#31 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#32 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#33 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#34 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#35 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#36 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335)
    LibreOffice#37 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1)
    LibreOffice#38 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    LibreOffice#39 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267)
    LibreOffice#40 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    LibreOffice#41 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac)

  Previous write of size 8 at 0x7b5000040f20 by thread T6 (mutexes: write M2):
    #0 std::vector<unsigned long, std::allocator<unsigned long>>::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:556:29 (libsclo.so+0x2f6766) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#1 std::vector<unsigned long, std::allocator<unsigned long>>::insert(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:1435:2 (libsclo.so+0x2ffd3a) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::blocks_type::insert(unsigned long, unsigned long) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:99:15 (libsclo.so+0x2ffd3a)
    LibreOffice#3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_new_block_to_middle(unsigned long, unsigned long, unsigned long, bool) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:4326:19 (libsclo.so+0x2ffd3a)
    LibreOffice#4 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_middle_of_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3999:19 (libsclo.so+0x3259fe) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#5 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_empty_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3313:12 (libsclo.so+0x3259fe)
    LibreOffice#6 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_impl<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1260:16 (libsclo.so+0x32492f) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#7 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set<double>(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> const&, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:754:20 (libsclo.so+0x4cc138) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#8 ScDocumentImport::setNumericCell(ScAddress const&, double) core/sc/source/core/data/documentimport.cxx:259:35 (libsclo.so+0x4cc138)
    LibreOffice#9 oox::xls::SheetDataBuffer::setValueCell(oox::xls::CellModel const&, double) core/sc/source/filter/oox/sheetdatabuffer.cxx:107:20 (libscfiltlo.so+0x4833c0) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#10 oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx:185:25 (libscfiltlo.so+0x48fed2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#11 non-virtual thunk to oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx (libscfiltlo.so+0x48fff9) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#12 oox::core::ContextHandler2Helper::implEndElement(int) core/oox/source/core/contexthandler2.cxx:125:9 (libooxlo.so+0x1ac82b) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#13 oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx:220:5 (libooxlo.so+0x1ac82b)
    LibreOffice#14 non-virtual thunk to oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx (libooxlo.so+0x1ac82b)
    LibreOffice#15 (anonymous namespace)::Entity::endElement() core/sax/source/fastparser/fastparser.cxx:515:27 (libexpwraplo.so+0x3042f) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#16 sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) core/sax/source/fastparser/fastparser.cxx:1029:25 (libexpwraplo.so+0x29d37) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#17 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:869:22 (libexpwraplo.so+0x29d37)
    LibreOffice#18 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#19 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#20 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#21 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#22 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#23 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#24 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335)
    LibreOffice#25 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1)
    LibreOffice#26 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    LibreOffice#27 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267)
    LibreOffice#28 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    LibreOffice#29 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac)

Change-Id: I7542432749fded8ab5e35f79cb221ad712f7802d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146430
Tested-by: Jenkins
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
@zonnebloempje zonnebloempje deleted the windowsinstaller branch February 22, 2023 12:52
tdf-gerrit pushed a commit that referenced this pull request Feb 22, 2023
sporadically reproducible with tsan and
./instdir/program/soffice.bin --headless --convert-to pdf ~/forum-mso-en4-802501.xlsx

move getTables().applyAutoFilters(), which wants to query tab 1 while
tab 1 is still getting imported, until after the threaded import has
completed.

This call was moved before in:

commit edd51b8
Date:   Thu Aug 15 16:23:46 2013 +0100

    fix for bnc#834705 missing drop downs for autofilter

==================
WARNING: ThreadSanitizer: data race (pid=3791886)
  Read of size 8 at 0x7b5000040f20 by thread T7 (mutexes: write M0, write M1):
    #0 __gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>::__normal_iterator(unsigned long const* const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20 (libsclo.so+0x3d31c4) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #1 std::vector<unsigned long, std::allocator<unsigned long>>::cend() const /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:960:16 (libsclo.so+0x3d31c4)
    #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::cbegin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3771:34 (libsclo.so+0x3d31c4)
    #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::begin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3753:12 (libsclo.so+0x3d31c4)
    #4 ScColumn::InitBlockPosition(sc::ColumnBlockConstPosition&) const core/sc/source/core/data/column3.cxx:1135:35 (libsclo.so+0x3d31c4)
    #5 ScTable::GetDataArea(short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/table1.cxx:908:19 (libsclo.so+0x637b39) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #6 ScDocument::GetDataArea(short, short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/document.cxx:1104:23 (libsclo.so+0x49b696) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #7 ScDBData::ExtendDataArea(ScDocument const&) core/sc/source/core/tool/dbdata.cxx:654:10 (libsclo.so+0x741e77) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #8 ScDocument::GetFilterEntries(short, int, short, ScFilterEntries&) core/sc/source/core/data/documen3.cxx:1577:14 (libsclo.so+0x46e7a6) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #9 (anonymous namespace)::fillQueryParam(ScQueryParam&, ScDocument*, com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1164:27 (libsclo.so+0xf7dd72) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #10 ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1380:5 (libsclo.so+0xf7dd72)
    #11 non-virtual thunk to ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx (libsclo.so+0xf7e2c2) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #12 oox::xls::AutoFilter::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:803:22 (libscfiltlo.so+0x3cca2c) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #13 oox::xls::AutoFilterBuffer::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:950:22 (libscfiltlo.so+0x3cdc0b) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #14 oox::xls::Table::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:143:23 (libscfiltlo.so+0x4b9268) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #15 void std::__invoke_impl<void, void (oox::xls::Table::*&)(), oox::xls::Table&>(std::__invoke_memfun_ref, void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:67:14 (libscfiltlo.so+0x4b9d96) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #16 std::__invoke_result<void (oox::xls::Table::*&)(), oox::xls::Table&>::type std::__invoke<void (oox::xls::Table::*&)(), oox::xls::Table&>(void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14 (libscfiltlo.so+0x4b9d96)
    #17 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::__call<void, oox::xls::Table&, 0ul>(std::tuple<oox::xls::Table&>&&, std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11 (libscfiltlo.so+0x4b9d96)
    #18 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::operator()<oox::xls::Table&, void>(oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17 (libscfiltlo.so+0x4b9d96)
    #19 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>::operator()(std::pair<int const, std::shared_ptr<oox::xls::Table>> const&) core/include/oox/helper/refmap.hxx:122:89 (libscfiltlo.so+0x4b9d96)
    #20 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>> std::for_each<std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>>(std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:3787:2 (libscfiltlo.so+0x4b9d96)
    #21 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEach<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>(std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()> const&) const core/include/oox/helper/refmap.hxx:71:29 (libscfiltlo.so+0x4b9d96)
    #22 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEachMem<void (oox::xls::Table::*)()>(void (oox::xls::Table::*)()) const core/include/oox/helper/refmap.hxx:79:29 (libscfiltlo.so+0x4b9d96)
    #23 oox::xls::TableBuffer::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:179:16 (libscfiltlo.so+0x4b9d96)
    #24 oox::xls::WorksheetGlobals::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:943:17 (libscfiltlo.so+0x4ee58e) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #25 oox::xls::WorksheetHelper::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:1625:17 (libscfiltlo.so+0x4f2cff) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #26 oox::xls::WorksheetFragment::finalizeImport() core/sc/source/filter/oox/worksheetfragment.cxx:632:5 (libscfiltlo.so+0x4e91cc) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #27 oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx:53:5 (libooxlo.so+0x1c20d9) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #28 non-virtual thunk to oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx (libooxlo.so+0x1c20d9)
    #29 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:910:36 (libexpwraplo.so+0x2a06a) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #30 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #31 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #32 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #33 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #34 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #35 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #36 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335)
    #37 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1)
    #38 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    #39 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267)
    #40 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    #41 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac)

  Previous write of size 8 at 0x7b5000040f20 by thread T6 (mutexes: write M2):
    #0 std::vector<unsigned long, std::allocator<unsigned long>>::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:556:29 (libsclo.so+0x2f6766) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #1 std::vector<unsigned long, std::allocator<unsigned long>>::insert(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:1435:2 (libsclo.so+0x2ffd3a) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::blocks_type::insert(unsigned long, unsigned long) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:99:15 (libsclo.so+0x2ffd3a)
    #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_new_block_to_middle(unsigned long, unsigned long, unsigned long, bool) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:4326:19 (libsclo.so+0x2ffd3a)
    #4 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_middle_of_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3999:19 (libsclo.so+0x3259fe) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #5 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_empty_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3313:12 (libsclo.so+0x3259fe)
    #6 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_impl<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1260:16 (libsclo.so+0x32492f) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #7 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set<double>(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> const&, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:754:20 (libsclo.so+0x4cc138) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #8 ScDocumentImport::setNumericCell(ScAddress const&, double) core/sc/source/core/data/documentimport.cxx:259:35 (libsclo.so+0x4cc138)
    #9 oox::xls::SheetDataBuffer::setValueCell(oox::xls::CellModel const&, double) core/sc/source/filter/oox/sheetdatabuffer.cxx:107:20 (libscfiltlo.so+0x4833c0) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #10 oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx:185:25 (libscfiltlo.so+0x48fed2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #11 non-virtual thunk to oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx (libscfiltlo.so+0x48fff9) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #12 oox::core::ContextHandler2Helper::implEndElement(int) core/oox/source/core/contexthandler2.cxx:125:9 (libooxlo.so+0x1ac82b) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #13 oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx:220:5 (libooxlo.so+0x1ac82b)
    #14 non-virtual thunk to oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx (libooxlo.so+0x1ac82b)
    #15 (anonymous namespace)::Entity::endElement() core/sax/source/fastparser/fastparser.cxx:515:27 (libexpwraplo.so+0x3042f) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #16 sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) core/sax/source/fastparser/fastparser.cxx:1029:25 (libexpwraplo.so+0x29d37) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #17 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:869:22 (libexpwraplo.so+0x29d37)
    #18 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    #19 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #20 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #21 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    #22 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #23 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    #24 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335)
    #25 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1)
    #26 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    #27 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267)
    #28 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    #29 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac)

Change-Id: I7542432749fded8ab5e35f79cb221ad712f7802d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146430
Tested-by: Jenkins
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
(cherry picked from commit 6652768)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146531
Reviewed-by: Xisco Fauli <[email protected]>
(cherry picked from commit a1f175f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146695
Reviewed-by: Michael Stahl <[email protected]>
Tested-by: Christian Lohmaier <[email protected]>
Reviewed-by: Christian Lohmaier <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Apr 1, 2023
…Chart"

...as happens during UITest_chart
UITEST_TEST_NAME=tdf107097.tdf107097.test_tdf107097 ever since
86b1929 "tdf#107097: sc: Add UItest" added that
test (see <https://ci.libreoffice.org/job/lo_ubsan/1919/>),

> /chart2/source/tools/XMLRangeHelper.cxx:136:52: runtime error: signed integer overflow: 15 * 308915776 cannot be represented in type 'int'
>     #0 0x2ad74a554918 in (anonymous namespace)::lcl_getSingleCellAddressFromXMLString(rtl::OUString const&, int, int, chart::XMLRangeHelper::Cell&) /chart2/source/tools/XMLRangeHelper.cxx:136:52
>     #1 0x2ad74a553482 in (anonymous namespace)::lcl_getCellAddressFromXMLString(rtl::OUString const&, int, int, chart::XMLRangeHelper::Cell&, rtl::OUString&) /chart2/source/tools/XMLRangeHelper.cxx:217:13
>     #2 0x2ad74a5505da in (anonymous namespace)::lcl_getCellRangeAddressFromXMLString(rtl::OUString const&, int, int, chart::XMLRangeHelper::CellRange&) /chart2/source/tools/XMLRangeHelper.cxx:253:19
>     #3 0x2ad74a54fde1 in chart::XMLRangeHelper::getCellRangeFromXMLString(rtl::OUString const&) /chart2/source/tools/XMLRangeHelper.cxx:328:15
>     #4 0x2ad74a2aed4d in chart::InternalDataProvider::convertRangeFromXML(rtl::OUString const&) /chart2/source/tools/InternalDataProvider.cxx:1227:39
>     #5 0x2ad74a2b0164 in non-virtual thunk to chart::InternalDataProvider::convertRangeFromXML(rtl::OUString const&) /chart2/source/tools/InternalDataProvider.cxx
>     #6 0x2ad6c4784257 in (anonymous namespace)::lcl_ConvertRange(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&) /xmloff/source/chart/SchXMLPlotAreaContext.cxx:76:32
>     #7 0x2ad6c4779a67 in SchXMLPlotAreaContext::startFastElement(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /xmloff/source/chart/SchXMLPlotAreaContext.cxx:233:34
>     #8 0x2ad6c4c6328a in SvXMLImport::startFastElement(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /xmloff/source/core/xmlimp.cxx:797:15
>     #9 0x2ad704988b78 in (anonymous namespace)::Entity::startElement((anonymous namespace)::Event const*) /sax/source/fastparser/fastparser.cxx:468:27
>     #10 0x2ad70496f681 in sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) /sax/source/fastparser/fastparser.cxx:1026:25
>     #11 0x2ad70496c65f in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:870:22
>     #12 0x2ad7049905d1 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1482:13
>     #13 0x2ad6c4c52b80 in SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) /xmloff/source/core/xmlimp.cxx:504:15
>     #14 0x2ad749aafe1e in chart::XMLFilter::impl_ImportStream(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiComponentFactory> const&, com::sun::star::uno::Reference<com::sun::star::document::XGraphicStorageHandler> const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&) /chart2/source/model/filter/XMLFilter.cxx:473:34
>     #15 0x2ad749aa9f01 in chart::XMLFilter::impl_Import(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /chart2/source/model/filter/XMLFilter.cxx:375:35
>     #16 0x2ad749aa0988 in chart::XMLFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /chart2/source/model/filter/XMLFilter.cxx:221:13
>     #17 0x2ad749c2c76e in chart::ChartModel::impl_load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) /chart2/source/model/main/ChartModel_Persistence.cxx:567:18
>     #18 0x2ad749c30eea in chart::ChartModel::loadFromStorage(com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /chart2/source/model/main/ChartModel_Persistence.cxx:759:5
>     #19 0x2ad74244b977 in OCommonEmbeddedObject::LoadDocumentFromStorage_Impl() /embeddedobj/source/commonembedding/persistence.cxx:535:19
>     #20 0x2ad7423d7bde in OCommonEmbeddedObject::SwitchStateTo_Impl(int) /embeddedobj/source/commonembedding/embedobj.cxx:185:49
>     #21 0x2ad7423e32ff in OCommonEmbeddedObject::changeState(int) /embeddedobj/source/commonembedding/embedobj.cxx:453:13
>     #22 0x2ad7424b7057 in OCommonEmbeddedObject::getPreferredVisualRepresentation(long) /embeddedobj/source/commonembedding/visobj.cxx:168:9
>     #23 0x2ad67e08fdb6 in comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(long, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&, rtl::OUString*) /comphelper/source/container/embeddedobjectcontainer.cxx:1425:54
>     #24 0x2ad6a447182c in svt::EmbeddedObjectRef::GetGraphicReplacementStream(long, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&, rtl::OUString*) /svtools/source/misc/embedhlp.cxx:809:12
>     #25 0x2ad6a446c7d4 in svt::EmbeddedObjectRef::GetGraphicStream(bool) const /svtools/source/misc/embedhlp.cxx:616:23
>     #26 0x2ad6a4469e58 in svt::EmbeddedObjectRef::GetReplacement(bool) /svtools/source/misc/embedhlp.cxx:424:46
>     #27 0x2ad6a446d4ea in svt::EmbeddedObjectRef::GetGraphic() const /svtools/source/misc/embedhlp.cxx:453:54
>     #28 0x2ad69d4a9470 in SdrOle2Obj::GetGraphic() const /svx/source/svdraw/svdoole2.cxx:1635:33
>     #29 0x2ad71b222d01 in ScDrawTransferObj::ScDrawTransferObj(std::unique_ptr<SdrModel, std::default_delete<SdrModel> >, ScDocShell*, TransferableObjectDescriptor const&) /sc/source/ui/app/drwtrans.cxx:191:107
>     #30 0x2ad71d7da932 in ScDrawView::DoCopy() /sc/source/ui/view/drawvie4.cxx:364:56
>     #31 0x2ad71c1fb75a in ScDrawShell::ExecDrawFunc(SfxRequest&) /sc/source/ui/drawfunc/drawsh5.cxx:328:20
>     #32 0x2ad71c1b181f in SfxStubScDrawShellExecDrawFunc(SfxShell*, SfxRequest&) /workdir/SdiTarget/sc/sdi/scslots.hxx:2823:1
>     #33 0x2ad68de39d05 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) /include/sfx2/shell.hxx:197:35
>     #34 0x2ad68ddd1214 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:16
>     #35 0x2ad68dde721f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9
>     #36 0x2ad68dd5edff in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) /sfx2/source/control/bindings.cxx:1060:22
>     #37 0x2ad68e24a322 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:758:53
>     #38 0x2ad68e245261 in SfxOfficeDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/control/unoctitm.cxx:229:16
>     #39 0x2ad67e465052 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /comphelper/source/misc/dispatchcommand.cxx:61:12
>     #40 0x2ad67e4657c5 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /comphelper/source/misc/dispatchcommand.cxx:76:12
>     #41 0x2ad6b39a49a6 in UITest::executeCommand(rtl::OUString const&) /vcl/source/uitest/uitest.cxx:24:12
>     #42 0x2ad6b39b7240 in (anonymous namespace)::UITestUnoObj::executeCommand(rtl::OUString const&) /vcl/source/uitest/uno/uitest_uno.cxx:69:12
>     #43 0x2ad6ee6508db in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) /bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5
>     #44 0x2ad6ee64abf2 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) /bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13
>     #45 0x2ad6ee64773d in unoInterfaceProxyDispatch /bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13
>     #46 0x2ad6f3a7d2ca in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const /binaryurp/source/incomingrequest.cxx:235:13

Creating a pivot chart apparently generates XML output containing

  <chart:plot-area table:cell-range-address="PivotChart" ...>

which does not conform to ODF, see the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2021-February/086884.html>
"Integer overflow in Calc lcl_getSingleCellAddressFromXMLString nColumn
computation" for details.

And, ignoring the signed-integer-overflow UB for now,
InternalDataProvider::convertRangeFromXML would always have returned an empty
OUString for an input of aXMLRange="PivotChart":
chart::XMLRangeHelper::getCellRangeFromXMLString with rXMLString="PivotChart"
calls lcl_getCellAddressFromXMLString with rXMLString="PivotChart", nStartPos=0,
nEndPos=9, its leading while-loop mis-computes nDelimiterPos=nEndPos, so calls
lcl_getCellAddressFromXMLString with rXMLString="PivotChart", nStartPos=0,
nEndPos=9, its leading while-loop mis-computes nDelimiterPos=nEndPos, so it
doesn't set rOutTableName, so lcl_getCellAddressFromXMLString returns
bResult=false, so chart::XMLRangeHelper::getCellRangeFromXMLString returns an
empty CellRange().

So, similar to 9e5314f "tdf#107097 invoke
internal DP and correctly handle 'range' names" added special handling of
aXMLRange values starting with "PT@" to
InternalDataProvider::convertRangeFromXML, also add explicit special handling
for "PivotChart" (instead of relying on the later code returning an empty
string, but after invoking UB).

Change-Id: I1671f0ab3b3ab00dce8e348aa3b7141ebebaaad5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112207
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
(cherry picked from commit 6d43ba1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125233
Tested-by: Michael Stahl <[email protected]>
Reviewed-by: Michael Stahl <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Apr 11, 2023
...e.g. during CppunitTest_sd_import_tests,

> /oox/source/drawingml/colorchoicecontext.cxx:280:78: runtime error: 35000 is outside the range of representable values of type 'short'
>     #0 0x7f3b8abf6278 in oox::drawingml::ColorValueContext::onCreateContext(int, oox::AttributeList const&) /oox/source/drawingml/colorchoicecontext.cxx:280:78
>     #1 0x7f3b8abf6534 in non-virtual thunk to oox::drawingml::ColorValueContext::onCreateContext(int, oox::AttributeList const&) /oox/source/drawingml/colorchoicecontext.cxx
>     #2 0x7f3b8a94baff in oox::core::ContextHandler2Helper::implCreateChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx:100:34
>     #3 0x7f3b8a94eabb in oox::core::ContextHandler2::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx:204:12
>     #4 0x7f3b8a950484 in non-virtual thunk to oox::core::ContextHandler2::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx
>     #5 0x7f3b43e81c45 in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:164:67
>     #6 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20
>     #7 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20
>     #8 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20
>     #9 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20
>     #10 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20
>     #11 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20
>     #12 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20
>     #13 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20
>     #14 0x7f3b43df8a50 in DOM::CDocument::fastSaxify(DOM::Context&) /unoxml/source/dom/document.cxx:289:20
>     #15 0x7f3b43e117af in DOM::CDocument::fastSerialize(com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastDocumentHandler> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastTokenHandler> const&, com::sun::star::uno::Sequence<com::sun::star::beans::StringPair> const&, com::sun::star::uno::Sequence<com::sun::star::beans::Pair<rtl::OUString, int> > const&) /unoxml/source/dom/document.cxx:1023:9
>     #16 0x7f3b8aa55f81 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastSAXSerializable> const&) /oox/source/core/xmlfilterbase.cxx:470:23
>     #17 0x7f3b8bd30d0f in oox::ppt::PresentationFragmentHandler::importSlide(unsigned int, bool, bool) /oox/source/ppt/presentationfragmenthandler.cxx:357:41
>     #18 0x7f3b8bd3cd16 in oox::ppt::PresentationFragmentHandler::finalizeImport() /oox/source/ppt/presentationfragmenthandler.cxx:543:17
>     #19 0x7f3b8a9f79ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5
>     #20 0x7f3b548344f0 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:897:36
>     #21 0x7f3b54855150 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1469:13
>     #22 0x7f3b8a97ff11 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15
>     #23 0x7f3b8a9806a8 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5
>     #24 0x7f3b8aa548a4 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:412:21
>     #25 0x7f3b8aa531fd in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:342:12
>     #26 0x7f3b8bcbaf54 in oox::ppt::PowerPointImport::importDocument() /oox/source/ppt/pptimport.cxx:109:17
>     #27 0x7f3b8a99493c in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49
>     #28 0x7f3b8bcbe067 in oox::ppt::PowerPointImport::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/ppt/pptimport.cxx:192:24
>     #29 0x7f3b7a89c1c6 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2272:34
>     #30 0x7f3b82834e18 in sd::DrawDocShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sd/source/ui/docshell/docshel4.cxx:429:39
>     #31 0x7f3b7a85bd64 in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:739:23
>     #32 0x7f3b7aa63c10 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1940:36
>     #33 0x7f3b7b1c142c 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&) /sfx2/source/view/frmload.cxx:720:28
>     #34 0x7f3b4ff0f5fb in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37
>     #35 0x7f3b4ff059fb in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20
>     #36 0x7f3b4fefd8bc 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) /framework/source/loadenv/loadenv.cxx:308:5
>     #37 0x7f3b4fef8c50 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&) /framework/source/loadenv/loadenv.cxx:168:14
>     #38 0x7f3b4ffc334d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:593:16
>     #39 0x7f3b4ffc3576 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&) /framework/source/services/desktop.cxx
>     #40 0x7f3b5feedd95 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:71:62
>     #41 0x7f3b75b0aef9 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:115:11
>     #42 0x7f3b75b0baf4 in UnoApiTest::loadFromURL(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:127:5
>     #43 0x7f3b95d2f402 in SdModelTestBase::createSdImpressDoc(char const*, char const*) /sd/qa/unit/sdmodeltestbase.hxx:54:13
>     #44 0x7f3b95d025c8 in testBnc584721_1::TestBody() /sd/qa/unit/import-tests.cxx:1281:5

(<https://ci.libreoffice.org/job/lo_ubsan/2741/>).

Presumably it was just a typo that f707834
"oox: write color transforms to model::ColorDefinition" used 10.0 rather than 10
as divisor.

Change-Id: I42de6daaa6db86bf4444243ec2c9173d6d514b02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150216
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request May 8, 2023
bb19817 "MCGR: Make MCGR default for oox
im/export, cleanup" started to cause CppunitTest_chart2_geometry
CPPUNIT_TEST_NAME=Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import to
fail with the below UBSan failure (even though the relevant code appears to be
even older than that commit).

At least for now, lets silence that by explicitly using +INF in case the divisor
is zero (and the dividend is known non-negative).

> /drawinglayer/source/texture/texture.cxx:246:71: runtime error: division by zero
>     #0 0x7f2e61d80f7f in drawinglayer::texture::GeoTexSvxGradientLinear::appendTransformationsAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) /drawinglayer/source/texture/texture.cxx:246:71
>     #1 0x7f2e616e187d in drawinglayer::primitive2d::FillGradientPrimitive2D::generateMatricesAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:75:31
>     #2 0x7f2e616e4f4f in drawinglayer::primitive2d::FillGradientPrimitive2D::createFill(drawinglayer::primitive2d::Primitive2DContainer&, bool) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:172:17
>     #3 0x7f2e616e66ca in drawinglayer::primitive2d::FillGradientPrimitive2D::create2DDecomposition(drawinglayer::primitive2d::Primitive2DContainer&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:269:17
>     #4 0x7f2e76cecd04 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:36:9
>     #5 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>     #6 0x7f2e61a38a25 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:917:13
>     #7 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #8 0x7f2e61a5cc3e in drawinglayer::processor2d::VclMetafileProcessor2D::processMaskPrimitive2D(drawinglayer::primitive2d::MaskPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2139:13
>     #9 0x7f2e61a3734a in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:833:13
>     #10 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #11 0x7f2e619b952c in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>     #12 0x7f2e76ced03a in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>     #13 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>     #14 0x7f2e61a595e3 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonGradientPrimitive2D(drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2014:9
>     #15 0x7f2e61a36fc0 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:821:13
>     #16 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #17 0x7f2e61a2e0da in drawinglayer::processor2d::VclMetafileProcessor2D::impDumpToMetaFile(drawinglayer::primitive2d::Primitive2DContainer const&, GDIMetaFile&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:244:5
>     #18 0x7f2e61a60f4a in drawinglayer::processor2d::VclMetafileProcessor2D::processTransparencePrimitive2D(drawinglayer::primitive2d::TransparencePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2292:52
>     #19 0x7f2e61a378cb in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:851:13
>     #20 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #21 0x7f2e619b952c in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>     #22 0x7f2e76ced03a in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>     #23 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>     #24 0x7f2e61a38a25 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:917:13
>     #25 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #26 0x7f2e61a68781 in drawinglayer::processor2d::VclMetafileProcessor2D::processObjectInfoPrimitive2D(drawinglayer::primitive2d::ObjectInfoPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:965:5
>     #27 0x7f2e61a38916 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:910:13
>     #28 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #29 0x7f2df2676731 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) /svx/source/sdr/contact/objectcontactofpageview.cxx:277:31
>     #30 0x7f2df26741be in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) /svx/source/sdr/contact/objectcontactofpageview.cxx:117:21
>     #31 0x7f2df291809d in SdrPageWindow::RedrawAll(sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/sdrpagewindow.cxx:357:28
>     #32 0x7f2df363584c in SdrPageView::CompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpagv.cxx:239:18
>     #33 0x7f2df36a80b0 in SdrPaintView::DoCompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpntv.cxx:609:21
>     #34 0x7f2df36a7b61 in SdrPaintView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpntv.cxx:522:5
>     #35 0x7f2df3ec0413 in (anonymous namespace)::GraphicExporter::GetGraphic((anonymous namespace)::ExportSettings const&, Graphic&, bool) /svx/source/unodraw/UnoGraphicExporter.cxx:740:24
>     #36 0x7f2df3ec857b in (anonymous namespace)::GraphicExporter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /svx/source/unodraw/UnoGraphicExporter.cxx:1037:19
>     #37 0x7f2db53f082a in chart::ChartView::getMetaFile(com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> const&, bool) /chart2/source/view/main/ChartView.cxx:263:20
>     #38 0x7f2db53f1d43 in chart::ChartView::getTransferData(com::sun::star::datatransfer::DataFlavor const&) /chart2/source/view/main/ChartView.cxx:285:11
>     #39 0x7f2db53f28ae in non-virtual thunk to chart::ChartView::getTransferData(com::sun::star::datatransfer::DataFlavor const&) /chart2/source/view/main/ChartView.cxx
>     #40 0x7f2db586547f in chart::ChartModel::getPreferredVisualRepresentation(long) /chart2/source/model/main/ChartModel.cxx:1054:44
>     #41 0x7f2db586779e in non-virtual thunk to chart::ChartModel::getPreferredVisualRepresentation(long) /chart2/source/model/main/ChartModel.cxx
>     #42 0x7f2db8401589 in OCommonEmbeddedObject::getPreferredVisualRepresentation(long) /embeddedobj/source/commonembedding/visobj.cxx:186:48
>     #43 0x7f2e95742555 in comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(long, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&, rtl::OUString*) /comphelper/source/container/embeddedobjectcontainer.cxx:1428:54
>     #44 0x7f2e9573f6b4 in comphelper::EmbeddedObjectContainer::StoreAsChildren(bool, bool, bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) /comphelper/source/container/embeddedobjectcontainer.cxx:1198:31
>     #45 0x7f2e044c7a1f in SfxObjectShell::SaveAsChildren(SfxMedium&) /sfx2/source/doc/objstor.cxx:3316:38
>     #46 0x7f2e044c6d0c in SfxObjectShell::SaveAs(SfxMedium&) /sfx2/source/doc/objstor.cxx:160:12
>     #47 0x7f2e0c509471 in sd::DrawDocShell::SaveAs(SfxMedium&) /sd/source/ui/docshell/docshel4.cxx:602:33
>     #48 0x7f2e0453a4ec in SfxObjectShell::SaveAsOwnFormat(SfxMedium&) /sfx2/source/doc/objstor.cxx:3256:16
>     #49 0x7f2e0c513d7d in sd::DrawDocShell::SaveAsOwnFormat(SfxMedium&) /sd/source/ui/docshell/docshel4.cxx:924:28
>     #50 0x7f2e044f8b0c in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) /sfx2/source/doc/objstor.cxx:1457:23
>     #51 0x7f2e04534ef5 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objstor.cxx:2993:39
>     #52 0x7f2e0452c40c in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objstor.cxx:2783:9
>     #53 0x7f2e04486556 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t> >, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objserv.cxx:319:19
>     #54 0x7f2e046d7afe in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) /sfx2/source/doc/sfxbasemodel.cxx:3151:42
>     #55 0x7f2e046de8db in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1785:13
>     #56 0x7f2dff75b078 in UnoApiTest::save(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:174:16
>     #57 0x7f2e63063d61 in Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import() /chart2/qa/extras/chart2geometry.cxx:322:5

(<>https://ci.libreoffice.org//job/lo_ubsan/2766/)

Change-Id: I72650fba2ee7ba339ec78d24dd690487c31e2600
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151495
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request May 8, 2023
Similar to <https://gerrit.libreoffice.org/c/core/+/151495> "Avoid division by
zero", CppunitTest_sw_ooxmlexport7 CPPUNIT_TEST_NAME=testFdo78957::TestBody
started to fail with

> drawinglayer/source/texture/texture.cxx:470:71: runtime error: division by zero
>  #0 in drawinglayer::texture::GeoTexSvxGradientRadial::appendTransformationsAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) at drawinglayer/source/texture/texture.cxx:470:71
>  #1 in drawinglayer::primitive2d::FillGradientPrimitive2D::generateMatricesAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) const at drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:99:31
>  #2 in drawinglayer::processor2d::VclPixelProcessor2D::processFillGradientPrimitive2D(drawinglayer::primitive2d::FillGradientPrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:1017:24
>  #3 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:363:13
>  #4 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #5 in drawinglayer::processor2d::VclProcessor2D::RenderMaskPrimitive2DPixel(drawinglayer::primitive2d::MaskPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:866:9
>  #6 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:257:13
>  #7 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #8 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #9 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>  #10 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #11 in drawinglayer::processor2d::VclPixelProcessor2D::processPolyPolygonGradientPrimitive2D(drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:490:9
>  #12 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:232:13
>  #13 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #14 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #15 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>  #16 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #17 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #18 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #19 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #20 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>  #21 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #22 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #23 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #24 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #25 in drawinglayer::primitive2d::GroupPrimitive2D::getChildren(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&) const at include/drawinglayer/primitive2d/groupprimitive2d.hxx:76:90
>  #26 in drawinglayer::primitive2d::GroupPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/groupprimitive2d.cxx:53:13
>  #27 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #28 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #29 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #30 in drawinglayer::processor2d::VclProcessor2D::RenderTransformPrimitive2D(drawinglayer::primitive2d::TransformPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:1004:5
>  #31 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:284:13
>  #32 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #33 in drawinglayer::processor2d::VclProcessor2D::RenderTransformPrimitive2D(drawinglayer::primitive2d::TransformPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:1004:5
>  #34 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:284:13
>  #35 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #36 in drawinglayer::processor2d::VclProcessor2D::RenderTransformPrimitive2D(drawinglayer::primitive2d::TransformPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:1004:5
>  #37 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:284:13
>  #38 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #39 in drawinglayer::convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&&, drawinglayer::geometry::ViewInformation2D const&, unsigned int, unsigned int, unsigned int) at drawinglayer/source/tools/converters.cxx:217:24
>  #40 in drawinglayer::convertPrimitive2DContainerToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&&, basegfx::B2DRange const&, unsigned int, o3tl::Length, std::optional<Size> const&) at drawinglayer/source/tools/converters.cxx:332:28
>  #41 in SvxShape::GetBitmap(bool) const at svx/source/unodraw/unoshape.cxx:717:21
>  #42 in SvxShape::getPropertyValueImpl(rtl::OUString const&, SfxItemPropertyMapEntry const*, com::sun::star::uno::Any&) at svx/source/unodraw/unoshape.cxx:2597:18
>  #43 in SvxCustomShape::getPropertyValueImpl(rtl::OUString const&, SfxItemPropertyMapEntry const*, com::sun::star::uno::Any&) at svx/source/unodraw/unoshap2.cxx:1780:26
>  #44 in SvxShape::_getPropertyValue(rtl::OUString const&) at svx/source/unodraw/unoshape.cxx:1638:14
>  #45 in SvxShape::getPropertyValue(rtl::OUString const&) at svx/source/unodraw/unoshape.cxx:1622:16
>  #46 in non-virtual thunk to SvxShape::getPropertyValue(rtl::OUString const&) at svx/source/unodraw/unoshape.cxx
>  #47 in SwXShape::_getPropAtAggrObj(rtl::OUString const&) at sw/source/core/unocore/unodraw.cxx:1823:23
>  #48 in SwXShape::getPropertyValue(rtl::OUString const&) at sw/source/core/unocore/unodraw.cxx:1753:20
>  #49 in non-virtual thunk to SwXShape::getPropertyValue(rtl::OUString const&) at sw/source/core/unocore/unodraw.cxx
>  #50 in writerfilter::TagLogger::unoPropertySet(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&) at writerfilter/source/dmapper/TagLogger.cxx:123:47
>  #51 in writerfilter::dmapper::DomainMapper_Impl::PushShapeContext(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at writerfilter/source/dmapper/DomainMapper_Impl.cxx:4204:38
>  #52 in writerfilter::dmapper::DomainMapper::lcl_startShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at writerfilter/source/dmapper/DomainMapper.cxx:3680:18
>  #53 in writerfilter::LoggedStream::startShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at writerfilter/source/dmapper/LoggedResources.cxx:139:5
>  #54 in writerfilter::ooxml::OOXMLFastContextHandlerShape::sendShape(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1810:19
>  #55 in writerfilter::ooxml::OOXMLFastContextHandlerShape::lcl_endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1829:9
>  #56 in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:223:9
>  #57 in (anonymous namespace)::Entity::endElement() at sax/source/fastparser/fastparser.cxx:515:27
>  #58 in sax_fastparser::FastSaxParserImpl::callbackEndElement() at sax/source/fastparser/fastparser.cxx:1330:17
>  #59 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) at sax/source/fastparser/fastparser.cxx:339:18
>  #60 in xmlParseEndTag2 at workdir/UnpackedTarball/libxml2/parser.c:9742:2
>  #61 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11642:14
>  #62 in xmlParseChunk at workdir/UnpackedTarball/libxml2/parser.c:12351:13
>  #63 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1111:25
>  #64 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:891:9
>  #65 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1469:13
>  #66 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:515:18
>  #67 in writerfilter::dmapper::DomainMapper_Impl::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&) at writerfilter/source/dmapper/DomainMapper_Impl.cxx:9143:14
>  #68 in writerfilter::dmapper::DomainMapper::lcl_substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>>) at writerfilter/source/dmapper/DomainMapper.cxx:4390:14
>  #69 in writerfilter::LoggedStream::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>>) at writerfilter/source/dmapper/LoggedResources.cxx:272:5
>  #70 in writerfilter::ooxml::OOXMLDocumentImpl::resolveFastSubStreamWithId(writerfilter::Stream&, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&, unsigned int) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:126:13
>  #71 in writerfilter::ooxml::OOXMLDocumentImpl::resolveHeader(writerfilter::Stream&, int, rtl::OUString const&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:385:10
>  #72 in writerfilter::ooxml::OOXMLFastContextHandler::resolveHeader(int, rtl::OUString const&) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:888:35
>  #73 in writerfilter::ooxml::OOXMLHeaderHandler::finalize() at writerfilter/source/ooxml/Handler.cxx:214:20
>  #74 in writerfilter::ooxml::OOXMLFastContextHandlerProperties::handleHdrFtr() at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1113:28
>  #75 in writerfilter::ooxml::OOXMLFactory_wml::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at workdir/CustomTarget/writerfilter/source/ooxml/OOXMLFactory_wml.cxx:7482:26
>  #76 in writerfilter::ooxml::OOXMLFactory::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at writerfilter/source/ooxml/OOXMLFactory.cxx:157:19
>  #77 in writerfilter::ooxml::OOXMLFastContextHandler::endAction() at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:316:5
>  #78 in writerfilter::ooxml::OOXMLFastContextHandlerProperties::lcl_endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1034:9
>  #79 in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:223:9
>  #80 in (anonymous namespace)::Entity::endElement() at sax/source/fastparser/fastparser.cxx:515:27
>  #81 in sax_fastparser::FastSaxParserImpl::callbackEndElement() at sax/source/fastparser/fastparser.cxx:1330:17
>  #82 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) at sax/source/fastparser/fastparser.cxx:339:18
>  #83 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11493:8
>  #84 in xmlParseChunk at workdir/UnpackedTarball/libxml2/parser.c:12351:13
>  #85 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1086:21
>  #86 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:891:9
>  #87 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1469:13
>  #88 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:515:18
>  #89 in (anonymous namespace)::WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:208:24
>  #90 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sfx2/source/doc/objstor.cxx:2272:34
>  #91 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:739:23
>  #92 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1940:36
>  #93 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:720:28
>  #94 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1176:37
>  #95 in framework::LoadEnv::start() at framework/source/loadenv/loadenv.cxx:412:20
>  #96 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:308:5
>  #97 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:168:14
>  #98 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:593:16
>  #99 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
>  #100 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:71:62
>  #101 in UnoApiTest::load(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:115:11
>  #102 in SwModelTestBase::loadURL(rtl::OUString const&, char const*, char const*) at sw/qa/unit/swmodeltestbase.cxx:470:20
>  #103 in SwModelTestBase::load(char const*, char const*) at sw/qa/inc/swmodeltestbase.hxx:353:16
>  #104 in SwModelTestBase::loadAndSave(char const*) at sw/qa/unit/swmodeltestbase.cxx:523:5
>  #105 in testFdo78957::TestBody() at sw/qa/extras/ooxmlexport/ooxmlexport7.cxx:783:5

Change-Id: Ifbc7da0b6c971df61e9908cc02b10a9f50769fcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151496
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
jrheinlaender pushed a commit to jrheinlaender/lo-core that referenced this pull request May 12, 2023
sporadically reproducible with tsan and
./instdir/program/soffice.bin --headless --convert-to pdf ~/forum-mso-en4-802501.xlsx

move getTables().applyAutoFilters(), which wants to query tab 1 while
tab 1 is still getting imported, until after the threaded import has
completed.

This call was moved before in:

commit edd51b8
Date:   Thu Aug 15 16:23:46 2013 +0100

    fix for bnc#834705 missing drop downs for autofilter

==================
WARNING: ThreadSanitizer: data race (pid=3791886)
  Read of size 8 at 0x7b5000040f20 by thread T7 (mutexes: write M0, write M1):
    #0 __gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>::__normal_iterator(unsigned long const* const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20 (libsclo.so+0x3d31c4) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #1 std::vector<unsigned long, std::allocator<unsigned long>>::cend() const /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:960:16 (libsclo.so+0x3d31c4)
    LibreOffice#2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::cbegin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3771:34 (libsclo.so+0x3d31c4)
    LibreOffice#3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::begin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3753:12 (libsclo.so+0x3d31c4)
    LibreOffice#4 ScColumn::InitBlockPosition(sc::ColumnBlockConstPosition&) const core/sc/source/core/data/column3.cxx:1135:35 (libsclo.so+0x3d31c4)
    LibreOffice#5 ScTable::GetDataArea(short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/table1.cxx:908:19 (libsclo.so+0x637b39) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#6 ScDocument::GetDataArea(short, short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/document.cxx:1104:23 (libsclo.so+0x49b696) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#7 ScDBData::ExtendDataArea(ScDocument const&) core/sc/source/core/tool/dbdata.cxx:654:10 (libsclo.so+0x741e77) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#8 ScDocument::GetFilterEntries(short, int, short, ScFilterEntries&) core/sc/source/core/data/documen3.cxx:1577:14 (libsclo.so+0x46e7a6) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#9 (anonymous namespace)::fillQueryParam(ScQueryParam&, ScDocument*, com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1164:27 (libsclo.so+0xf7dd72) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#10 ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1380:5 (libsclo.so+0xf7dd72)
    LibreOffice#11 non-virtual thunk to ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx (libsclo.so+0xf7e2c2) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#12 oox::xls::AutoFilter::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:803:22 (libscfiltlo.so+0x3cca2c) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#13 oox::xls::AutoFilterBuffer::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:950:22 (libscfiltlo.so+0x3cdc0b) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#14 oox::xls::Table::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:143:23 (libscfiltlo.so+0x4b9268) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#15 void std::__invoke_impl<void, void (oox::xls::Table::*&)(), oox::xls::Table&>(std::__invoke_memfun_ref, void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:67:14 (libscfiltlo.so+0x4b9d96) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#16 std::__invoke_result<void (oox::xls::Table::*&)(), oox::xls::Table&>::type std::__invoke<void (oox::xls::Table::*&)(), oox::xls::Table&>(void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14 (libscfiltlo.so+0x4b9d96)
    LibreOffice#17 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::__call<void, oox::xls::Table&, 0ul>(std::tuple<oox::xls::Table&>&&, std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11 (libscfiltlo.so+0x4b9d96)
    LibreOffice#18 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::operator()<oox::xls::Table&, void>(oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17 (libscfiltlo.so+0x4b9d96)
    LibreOffice#19 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>::operator()(std::pair<int const, std::shared_ptr<oox::xls::Table>> const&) core/include/oox/helper/refmap.hxx:122:89 (libscfiltlo.so+0x4b9d96)
    LibreOffice#20 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>> std::for_each<std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>>(std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:3787:2 (libscfiltlo.so+0x4b9d96)
    LibreOffice#21 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEach<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>(std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()> const&) const core/include/oox/helper/refmap.hxx:71:29 (libscfiltlo.so+0x4b9d96)
    LibreOffice#22 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEachMem<void (oox::xls::Table::*)()>(void (oox::xls::Table::*)()) const core/include/oox/helper/refmap.hxx:79:29 (libscfiltlo.so+0x4b9d96)
    LibreOffice#23 oox::xls::TableBuffer::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:179:16 (libscfiltlo.so+0x4b9d96)
    LibreOffice#24 oox::xls::WorksheetGlobals::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:943:17 (libscfiltlo.so+0x4ee58e) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#25 oox::xls::WorksheetHelper::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:1625:17 (libscfiltlo.so+0x4f2cff) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#26 oox::xls::WorksheetFragment::finalizeImport() core/sc/source/filter/oox/worksheetfragment.cxx:632:5 (libscfiltlo.so+0x4e91cc) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#27 oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx:53:5 (libooxlo.so+0x1c20d9) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#28 non-virtual thunk to oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx (libooxlo.so+0x1c20d9)
    LibreOffice#29 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:910:36 (libexpwraplo.so+0x2a06a) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#30 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#31 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#32 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#33 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#34 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#35 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#36 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335)
    LibreOffice#37 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1)
    LibreOffice#38 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    LibreOffice#39 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267)
    LibreOffice#40 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    LibreOffice#41 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac)

  Previous write of size 8 at 0x7b5000040f20 by thread T6 (mutexes: write M2):
    #0 std::vector<unsigned long, std::allocator<unsigned long>>::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:556:29 (libsclo.so+0x2f6766) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    #1 std::vector<unsigned long, std::allocator<unsigned long>>::insert(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:1435:2 (libsclo.so+0x2ffd3a) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::blocks_type::insert(unsigned long, unsigned long) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:99:15 (libsclo.so+0x2ffd3a)
    LibreOffice#3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_new_block_to_middle(unsigned long, unsigned long, unsigned long, bool) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:4326:19 (libsclo.so+0x2ffd3a)
    LibreOffice#4 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_middle_of_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3999:19 (libsclo.so+0x3259fe) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#5 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_empty_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3313:12 (libsclo.so+0x3259fe)
    LibreOffice#6 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_impl<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1260:16 (libsclo.so+0x32492f) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#7 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set<double>(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> const&, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:754:20 (libsclo.so+0x4cc138) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def)
    LibreOffice#8 ScDocumentImport::setNumericCell(ScAddress const&, double) core/sc/source/core/data/documentimport.cxx:259:35 (libsclo.so+0x4cc138)
    LibreOffice#9 oox::xls::SheetDataBuffer::setValueCell(oox::xls::CellModel const&, double) core/sc/source/filter/oox/sheetdatabuffer.cxx:107:20 (libscfiltlo.so+0x4833c0) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#10 oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx:185:25 (libscfiltlo.so+0x48fed2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#11 non-virtual thunk to oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx (libscfiltlo.so+0x48fff9) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#12 oox::core::ContextHandler2Helper::implEndElement(int) core/oox/source/core/contexthandler2.cxx:125:9 (libooxlo.so+0x1ac82b) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#13 oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx:220:5 (libooxlo.so+0x1ac82b)
    LibreOffice#14 non-virtual thunk to oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx (libooxlo.so+0x1ac82b)
    LibreOffice#15 (anonymous namespace)::Entity::endElement() core/sax/source/fastparser/fastparser.cxx:515:27 (libexpwraplo.so+0x3042f) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#16 sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) core/sax/source/fastparser/fastparser.cxx:1029:25 (libexpwraplo.so+0x29d37) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#17 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:869:22 (libexpwraplo.so+0x29d37)
    LibreOffice#18 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4)
    LibreOffice#19 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#20 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#21 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b)
    LibreOffice#22 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#23 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba)
    LibreOffice#24 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335)
    LibreOffice#25 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1)
    LibreOffice#26 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    LibreOffice#27 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267)
    LibreOffice#28 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6)
    LibreOffice#29 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac)

Change-Id: I7542432749fded8ab5e35f79cb221ad712f7802d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146430
Tested-by: Jenkins
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
(cherry picked from commit 6652768)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146531
Reviewed-by: Xisco Fauli <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Aug 6, 2023
commit 7f85415 caused

> 0x7f206906bd30: note: object is of type 'sw::VirtPageNumHint'
>  80 60 00 00  f0 33 8b 16 20 7f 00 00  6d 00 00 00 00 00 00 00  00 00
00 00 00 00 00 00  80 94 5c 00
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'sw::VirtPageNumHint'
>     #0 0x7f2007e0e38b in SwTabFrame::SwClientNotify(SwModify const&,
SfxHint const&) /sw/source/core/layout/tabfrm.cxx:3525:20
>     #1 0x7f2004957b22 in SwModify::CallSwClientNotify(SfxHint const&)
const /sw/source/core/attr/calbck.cxx:322:18
>     #2 0x7f2004957e25 in
sw::BroadcastingModify::CallSwClientNotify(SfxHint const&) const
/sw/source/core/attr/calbck.cxx:327:15
>     #3 0x7f2007ea97eb in SwFrame::GetVirtPageNum() const
/sw/source/core/layout/trvlfrm.cxx:1844:19
>     #4 0x7f20089f092b in
SwTextFormatter::NewFieldPortion(SwTextFormatInfo&, SwTextAttr const*)
const /sw/source/core/text/txtfld.cxx:160:47
>     #5 0x7f20089f9be6 in
SwTextFormatter::NewExtraPortion(SwTextFormatInfo&)
/sw/source/core/text/txtfld.cxx:382:20
>     #6 0x7f200863dbe8 in
SwTextFormatter::NewPortion(SwTextFormatInfo&,
std::optional<o3tl::strong_int<int, Tag_TextFrameIndex> >)
/sw/source/core/text/itrform2.cxx:1737:28
>     #7 0x7f200862661f in
SwTextFormatter::BuildPortions(SwTextFormatInfo&)
/sw/source/core/text/itrform2.cxx:440:27
>     #8 0x7f200865f573 in
SwTextFormatter::FormatLine(o3tl::strong_int<int, Tag_TextFrameIndex>)
/sw/source/core/text/itrform2.cxx:1952:9
>     #9 0x7f200844aef2 in SwTextFrame::FormatLine(SwTextFormatter&,
bool) /sw/source/core/text/frmform.cxx:1303:44
>     #10 0x7f2008459474 in SwTextFrame::Format_(SwTextFormatter&,
SwTextFormatInfo&, bool) /sw/source/core/text/frmform.cxx:1663:23
>     #11 0x7f200845edcb in SwTextFrame::FormatImpl(OutputDevice*,
SwParaPortion*, std::__debug::vector<SwAnchoredObject*,
std::allocator<SwAnchoredObject*> >&)
/sw/source/core/text/frmform.cxx:1854:5
>     #12 0x7f2008465458 in SwTextFrame::Format(OutputDevice*,
SwBorderAttrs const*) /sw/source/core/text/frmform.cxx:2058:17
>     #13 0x7f200758ac43 in SwContentFrame::MakeAll(OutputDevice*)
/sw/source/core/layout/calcmove.cxx:1515:17
>     #14 0x7f200755b0a1 in SwFrame::OptPrepareMake()
/sw/source/core/layout/calcmove.cxx:399:9
>     #15 0x7f2007953230 in SwFrame::OptCalc() const
/sw/source/core/inc/frame.hxx:1090:37
>     #16 0x7f20079208f7 in SwLayAction::FormatLayout(OutputDevice*,
SwLayoutFrame*, bool) /sw/source/core/layout/layact.cxx:1430:19
>     #17 0x7f200792060a in SwLayAction::FormatLayout(OutputDevice*,
SwLayoutFrame*, bool) /sw/source/core/layout/layact.cxx:1423:29
>     #18 0x7f20079344a2 in SwLayAction::FormatLayoutTab(SwTabFrame*,
bool) /sw/source/core/layout/layact.cxx:1642:25
>     #19 0x7f2007920133 in SwLayAction::FormatLayout(OutputDevice*,
SwLayoutFrame*, bool) /sw/source/core/layout/layact.cxx:1417:32
>     #20 0x7f200792060a in SwLayAction::FormatLayout(OutputDevice*,
SwLayoutFrame*, bool) /sw/source/core/layout/layact.cxx:1423:29
>     #21 0x7f2007908ac6 in SwLayAction::InternalAction(OutputDevice*)
/sw/source/core/layout/layact.cxx:591:25
>     #22 0x7f2007903d4e in SwLayAction::Action(OutputDevice*)
/sw/source/core/layout/layact.cxx:388:5
>     #23 0x7f200a3ff241 in SwViewShell::ImplEndAction(bool)
/sw/source/core/view/viewsh.cxx:309:17
>     #24 0x7f2004ccef61 in SwViewShell::EndAction(bool)
/sw/inc/viewsh.hxx:628:9
>     #25 0x7f2004c2e8a0 in SwCursorShell::EndAction(bool)
/sw/source/core/crsr/crsrsh.cxx:263:18
>     #26 0x7f200c9ff99c in SwView::OuterResizePixel(Point const&, Size
const&) /sw/source/uibase/uiview/viewport.cxx:1107:22
>     #27 0x7f2026f7a582 in
SfxViewFrame::DoAdjustPosSizePixel(SfxViewShell*, Point const&, Size
const&, bool) /sfx2/source/view/viewfrm.cxx:2058:18
>     #28 0x7f2026fa205f in SfxViewFrame::Resize(bool)
/sfx2/source/view/viewfrm.cxx:2852:13
>     #29 0x7f2026ff3179 in SfxFrameViewWindow_Impl::Resize()
/sfx2/source/view/viewfrm2.cxx:72:17
>     #30 0x7f204ea688e0 in vcl::Window::ImplCallResize()
/vcl/source/window/event.cxx:525:5
>     #31 0x7f204f23f74b in vcl::Window::Show(bool, ShowFlags)
/vcl/source/window/window.cxx:2293:13
>     #32 0x7f2026e731b8 in
SfxBaseController::ConnectSfxFrame_Impl(SfxBaseController::ConnectSfxFrame)
/sfx2/source/view/sfxbasecontroller.cxx:1182:24
>     #33 0x7f2026e6f0aa in
SfxBaseController::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&) /sfx2/source/view/sfxbasecontroller.cxx:530:9
>     #34 0x7f2026dd0b8e in
utl::ConnectFrameControllerModel(com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&,
com::sun::star::uno::Reference<com::sun::star::frame::XController2>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XModel>
const&) /include/unotools/fcm.hxx:48:18
>     #35 0x7f2026dc47e3 in (anonymous
namespace)::SfxFrameLoader_Impl::impl_createDocumentView(com::sun::star::uno::Reference<com::sun::star::frame::XModel2>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&, comphelper::NamedValueCollection const&, rtl::OUString const&)
/sfx2/source/view/frmload.cxx:584:5
>     #36 0x7f2026dbbfde 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&) /sfx2/source/view/frmload.cxx:759:13
>     #37 0x7f1fd762b75b in framework::LoadEnv::impl_loadContent()
/framework/source/loadenv/loadenv.cxx:1176:37
>     #38 0x7f1fd7621b5b in framework::LoadEnv::start()
/framework/source/loadenv/loadenv.cxx:412:20
>     #39 0x7f1fd7619a1c 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)
/framework/source/loadenv/loadenv.cxx:308:5
>     #40 0x7f1fd7614d57 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&) /framework/source/loadenv/loadenv.cxx:168:14
>     #41 0x7f1fd76ed70d in
framework::Desktop::loadComponentFromURL(rtl::OUString const&,
rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) /framework/source/services/desktop.cxx:593:16
>     #42 0x7f1fd76ed936 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&) /framework/source/services/desktop.cxx
>     #43 0x7f1ff52cbb7a in
unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString
const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) /unotest/source/cpp/macros_test.cxx:71:62
>     #44 0x7f20214a91ac in UnoApiTest::load(rtl::OUString const&, char
const*) /test/source/unoapi_test.cxx:115:11
>     #45 0x7f1ff578a483 in SwModelTestBase::loadURL(rtl::OUString
const&, char const*) /sw/qa/unit/swmodeltestbase.cxx:468:20
>     #46 0x7f1ff578df71 in SwModelTestBase::loadAndSave(char const*,
char const*) /sw/qa/unit/swmodeltestbase.cxx:486:5
>     #47 0x7f202d75f0b9 in testCrashWhileSave::TestBody()
/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx:1016:5

during CppunitTest_sw_ooxmlexport3
(<https://ci.libreoffice.org/job/lo_ubsan/2871/>).

Change-Id: I41838d3493bd4b1a68cb29cf1e90494eb8db0077
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155383
Tested-by: Jenkins
Reviewed-by: Noel Grandin <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Aug 18, 2023
Don't just invalidate, but also dispose the a11y children
in `FrameSelectorImpl::~FrameSelectorImpl`.

This fixes a crash on exit that's reproducible with
the gtk3 VCL plugin e.g. like this (maybe some
steps aren't even needed):

1) start LO Writer with the gtk3 VCL plugin
2) right-click, select "Character" > "Character"
   in context menu
3) switch to "Font Effects" tab
4) press space key with focus in the font color combobox
   to open the popup
5) use Tab key to get to the view of colors
6) move around with arrow keys a bit
7) close the dialog and Writer

Reverse-continuing to `atk_object_wrapper_dispose`
(frame #10 in the below backtrace) in rr
showed the involved a11y object:

    uno::Reference to (svx::a11y::AccFrameSelectorChild *) 0x5557832b9150

Backtrace (somewhat similar to the one in tdf#156683):

    #0  0x00007ffff6b15cd6 in comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>::disposeAndClear(std::unique_lock<std::mutex>&, com::sun::star::lang::EventObject const&)
        (this=0x7fffffffca88, rGuard=..., rEvt=...) at .../include/comphelper/interfacecontainer4.hxx:397
    #1  0x00007ffff6b13c6f in comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing(unsigned int, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&)
        (_nClient=1058, _rxEventSource=uno::Reference to (svx::a11y::AccFrameSelectorChild *) 0x55555cecfdf0) at .../comphelper/source/misc/accessibleeventnotifier.cxx:204
    #2  0x00007ffff6b1028a in comphelper::OCommonAccessibleComponent::disposing() (this=0x55555cecfdf0) at .../comphelper/source/misc/accessiblecomponenthelper.cxx:61
    #3  0x00007ffff6674aeb in cppu::WeakComponentImplHelperBase::dispose() (this=0x55555cecfdf0) at .../cppuhelper/source/implbase.cxx:104
    #4  0x00007ffff2ddf0e0 in cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext2, com::sun::star::accessibility::XAccessibleEventBroadcaster>::dispose() (this=0x55555cecfdf0)
        at .../include/cppuhelper/compbase.hxx:90
    #5  0x00007ffff6674834 in cppu::WeakComponentImplHelperBase::release() (this=0x55555cecfdf0) at .../cppuhelper/source/implbase.cxx:79
    #6  0x00007ffff2ddf642 in cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext2, com::sun::star::accessibility::XAccessibleEventBroadcaster>::release() (this=0x55555cecfdf0)
        at .../include/cppuhelper/compbase.hxx:86
    #7  0x00007ffff2ddf378 in cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>::release() (this=0x55555cecfdf0)
        at .../include/cppuhelper/implbase.hxx:171
    #8  0x00007ffff2ddf0a0 in cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper, com::sun::star::accessibility::XAccessible>::release() (this=0x55555cecfdf0)
        at .../include/cppuhelper/implbase.hxx:171
    #9  0x00007fffe3f29535 in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext>::clear() (this=0x55555d40a010) at .../include/com/sun/star/uno/Reference.hxx:231
    #10 0x00007fffe3f288de in atk_object_wrapper_dispose(AtkObjectWrapper*) (wrapper=0x55555d409fa0) at .../vcl/unx/gtk3/a11y/atkwrapper.cxx:1078
    #11 0x00007fffe3f27527 in atk_object_wrapper_finalize(GObject*) (obj=0x55555d409fa0) at .../vcl/unx/gtk3/a11y/atkwrapper.cxx:674
    #12 0x00007ffff138c48c in g_object_unref () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #13 0x00007fffe3f003f7 in AtkListener::~AtkListener() (this=0x55555ce6ecb0, __in_chrg=<optimized out>) at .../vcl/unx/gtk3/a11y/atklistener.cxx:57
    #14 0x00007fffe3f0042e in AtkListener::~AtkListener() (this=0x55555ce6ecb0, __in_chrg=<optimized out>) at .../vcl/unx/gtk3/a11y/atklistener.cxx:58
    #15 0x00007ffff6756838 in cppu::OWeakObject::release() (this=0x55555ce6ecb0) at .../cppuhelper/source/weak.cxx:230
    #16 0x00007fffe3f0a7de in cppu::WeakImplHelper<com::sun::star::accessibility::XAccessibleEventListener>::release() (this=0x55555ce6ecb0) at .../include/cppuhelper/implbase.hxx:115
    #17 0x00007ffff6b21b99 in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>::~Reference() (this=0x55555d40a0c0, __in_chrg=<optimized out>)
        at .../include/com/sun/star/uno/Reference.hxx:114
    #18 0x00007ffff6b217a9 in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*)
        (__pointer=0x55555d40a0c0) at /usr/include/c++/13/bits/stl_construct.h:151
    #19 0x00007ffff6b20bcf in std::_Destroy_aux<false>::__destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*>(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*) (__first=0x55555d40a0c0, __last=0x55555d40a0c8) at /usr/include/c++/13/bits/stl_construct.h:163
    #20 0x00007ffff6b1f105 in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*>(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*) (__first=0x55555d40a0c0, __last=0x55555d40a0c8) at /usr/include/c++/13/bits/stl_construct.h:196
    #21 0x00007ffff6b197aa in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >&) (__last=0x55555d40a0c8, __first=0x55555d40a0c0) at /usr/include/c++/13/bits/alloc_traits.h:947
    #22 std::__cxx1998::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >::~vector()
        (this=0x55555cf22af8, __in_chrg=<optimized out>) at /usr/include/c++/13/bits/stl_vector.h:732
    #23 0x00007ffff6b17402 in std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >::~vector() (this=0x55555cf22ae0, __in_chrg=<optimized out>) at /usr/include/c++/13/debug/vector:230
    #24 0x00007ffff6b1742a in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::impl_t::~impl_t() (this=0x55555cf22ae0, __in_chrg=<optimized out>) at .../include/o3tl/cow_wrapper.hxx:176
    #25 0x00007ffff6b17485 in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::release() (this=0x55555d40a0b0) at .../include/o3tl/cow_wrapper.hxx:207
    #26 0x00007ffff6b15700 in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::~cow_wrapper() (this=0x55555d40a0b0, __in_chrg=<optimized out>) at .../include/o3tl/cow_wrapper.hxx:271
    #27 0x00007ffff6b145b4 in comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>::~OInterfaceContainerHelper4() (this=0x55555d40a0b0, __in_chrg=<optimized out>)
        at .../include/comphelper/interfacecontainer4.hxx:126
    #28 0x00007ffff6b206c6 in std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >::~pair() (this=0x55555d40a0a8, __in_chrg=<optimized out>)
        at /usr/include/c++/13/bits/stl_pair.h:187
    #29 0x00007ffff6b1aac4 in std::__new_allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> >::destroy<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >(std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >*) (__p=0x55555d40a0a8, this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>) at /usr/include/c++/13/bits/new_allocator.h:194
    #30 std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::destroy<std::pair<unsigned i--Type <RET> for more, q to quit, c to continue without paging--
    nt const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >(std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> >&, std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >*) (__p=0x55555d40a0a8, __a=...)
        at /usr/include/c++/13/bits/alloc_traits.h:557
    #31 std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false>*)
        (this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>, __n=0x55555d40a0a0) at /usr/include/c++/13/bits/hashtable_policy.h:2020
    #32 0x00007ffff6b188b7 in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::_M_deallocate_nodes(std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false>*)
        (this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>, __n=0x55555d409ef0) at /usr/include/c++/13/bits/hashtable_policy.h:2042
    #33 0x00007ffff6b164e6 in std::_Hashtable<unsigned int, std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::clear() (this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>) at /usr/include/c++/13/bits/hashtable.h:2509
    #34 0x00007ffff6b187cc in std::__cxx1998::unordered_map<unsigned int, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > > >::clear() (this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>)
        at /usr/include/c++/13/bits/unordered_map.h:798
    #35 0x00007ffff6b164a0 in std::__debug::unordered_map<unsigned int, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > > >::clear() (this=0x7ffff6f64960 <(anonymous namespace)::gaClients>)
        at /usr/include/c++/13/debug/unordered_map:234
    #36 0x00007ffff6b14151 in comphelper::AccessibleEventNotifier::shutdown() () at .../comphelper/source/misc/accessibleeventnotifier.cxx:268
    #37 0x00007fffee53fa20 in DeInitVCL() () at .../vcl/source/app/svmain.cxx:594
    #38 0x00007fffee53e227 in ImplSVMain() () at .../vcl/source/app/svmain.cxx:229
    #39 0x00007fffee53e283 in SVMain() () at .../vcl/source/app/svmain.cxx:236
    #40 0x00007ffff7a9f51d in soffice_main() () at .../desktop/source/app/sofficemain.cxx:94
    #41 0x00005555555549d4 in sal_main () at .../desktop/source/app/main.c:51
    #42 0x00005555555549ba in main (argc=2, argv=0x7fffffffd8e8) at .../desktop/source/app/main.c:49

Change-Id: I22c665f3c41624f4916b956ea266ff1d39fbe507
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155848
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Aug 22, 2023
Don't just invalidate, but also dispose the a11y children
in `FrameSelectorImpl::~FrameSelectorImpl`.

This fixes a crash on exit that's reproducible with
the gtk3 VCL plugin e.g. like this (maybe some
steps aren't even needed):

1) start LO Writer with the gtk3 VCL plugin
2) right-click, select "Character" > "Character"
   in context menu
3) switch to "Font Effects" tab
4) press space key with focus in the font color combobox
   to open the popup
5) use Tab key to get to the view of colors
6) move around with arrow keys a bit
7) close the dialog and Writer

Reverse-continuing to `atk_object_wrapper_dispose`
(frame #10 in the below backtrace) in rr
showed the involved a11y object:

    uno::Reference to (svx::a11y::AccFrameSelectorChild *) 0x5557832b9150

Backtrace (somewhat similar to the one in tdf#156683):

    #0  0x00007ffff6b15cd6 in comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>::disposeAndClear(std::unique_lock<std::mutex>&, com::sun::star::lang::EventObject const&)
        (this=0x7fffffffca88, rGuard=..., rEvt=...) at .../include/comphelper/interfacecontainer4.hxx:397
    #1  0x00007ffff6b13c6f in comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing(unsigned int, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&)
        (_nClient=1058, _rxEventSource=uno::Reference to (svx::a11y::AccFrameSelectorChild *) 0x55555cecfdf0) at .../comphelper/source/misc/accessibleeventnotifier.cxx:204
    #2  0x00007ffff6b1028a in comphelper::OCommonAccessibleComponent::disposing() (this=0x55555cecfdf0) at .../comphelper/source/misc/accessiblecomponenthelper.cxx:61
    #3  0x00007ffff6674aeb in cppu::WeakComponentImplHelperBase::dispose() (this=0x55555cecfdf0) at .../cppuhelper/source/implbase.cxx:104
    #4  0x00007ffff2ddf0e0 in cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext2, com::sun::star::accessibility::XAccessibleEventBroadcaster>::dispose() (this=0x55555cecfdf0)
        at .../include/cppuhelper/compbase.hxx:90
    #5  0x00007ffff6674834 in cppu::WeakComponentImplHelperBase::release() (this=0x55555cecfdf0) at .../cppuhelper/source/implbase.cxx:79
    #6  0x00007ffff2ddf642 in cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext2, com::sun::star::accessibility::XAccessibleEventBroadcaster>::release() (this=0x55555cecfdf0)
        at .../include/cppuhelper/compbase.hxx:86
    #7  0x00007ffff2ddf378 in cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>::release() (this=0x55555cecfdf0)
        at .../include/cppuhelper/implbase.hxx:171
    #8  0x00007ffff2ddf0a0 in cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper, com::sun::star::accessibility::XAccessible>::release() (this=0x55555cecfdf0)
        at .../include/cppuhelper/implbase.hxx:171
    #9  0x00007fffe3f29535 in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext>::clear() (this=0x55555d40a010) at .../include/com/sun/star/uno/Reference.hxx:231
    #10 0x00007fffe3f288de in atk_object_wrapper_dispose(AtkObjectWrapper*) (wrapper=0x55555d409fa0) at .../vcl/unx/gtk3/a11y/atkwrapper.cxx:1078
    #11 0x00007fffe3f27527 in atk_object_wrapper_finalize(GObject*) (obj=0x55555d409fa0) at .../vcl/unx/gtk3/a11y/atkwrapper.cxx:674
    #12 0x00007ffff138c48c in g_object_unref () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #13 0x00007fffe3f003f7 in AtkListener::~AtkListener() (this=0x55555ce6ecb0, __in_chrg=<optimized out>) at .../vcl/unx/gtk3/a11y/atklistener.cxx:57
    #14 0x00007fffe3f0042e in AtkListener::~AtkListener() (this=0x55555ce6ecb0, __in_chrg=<optimized out>) at .../vcl/unx/gtk3/a11y/atklistener.cxx:58
    #15 0x00007ffff6756838 in cppu::OWeakObject::release() (this=0x55555ce6ecb0) at .../cppuhelper/source/weak.cxx:230
    #16 0x00007fffe3f0a7de in cppu::WeakImplHelper<com::sun::star::accessibility::XAccessibleEventListener>::release() (this=0x55555ce6ecb0) at .../include/cppuhelper/implbase.hxx:115
    #17 0x00007ffff6b21b99 in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>::~Reference() (this=0x55555d40a0c0, __in_chrg=<optimized out>)
        at .../include/com/sun/star/uno/Reference.hxx:114
    #18 0x00007ffff6b217a9 in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*)
        (__pointer=0x55555d40a0c0) at /usr/include/c++/13/bits/stl_construct.h:151
    #19 0x00007ffff6b20bcf in std::_Destroy_aux<false>::__destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*>(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*) (__first=0x55555d40a0c0, __last=0x55555d40a0c8) at /usr/include/c++/13/bits/stl_construct.h:163
    #20 0x00007ffff6b1f105 in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*>(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*) (__first=0x55555d40a0c0, __last=0x55555d40a0c8) at /usr/include/c++/13/bits/stl_construct.h:196
    #21 0x00007ffff6b197aa in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >&) (__last=0x55555d40a0c8, __first=0x55555d40a0c0) at /usr/include/c++/13/bits/alloc_traits.h:947
    #22 std::__cxx1998::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >::~vector()
        (this=0x55555cf22af8, __in_chrg=<optimized out>) at /usr/include/c++/13/bits/stl_vector.h:732
    #23 0x00007ffff6b17402 in std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >::~vector() (this=0x55555cf22ae0, __in_chrg=<optimized out>) at /usr/include/c++/13/debug/vector:230
    #24 0x00007ffff6b1742a in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::impl_t::~impl_t() (this=0x55555cf22ae0, __in_chrg=<optimized out>) at .../include/o3tl/cow_wrapper.hxx:176
    #25 0x00007ffff6b17485 in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::release() (this=0x55555d40a0b0) at .../include/o3tl/cow_wrapper.hxx:207
    #26 0x00007ffff6b15700 in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::~cow_wrapper() (this=0x55555d40a0b0, __in_chrg=<optimized out>) at .../include/o3tl/cow_wrapper.hxx:271
    #27 0x00007ffff6b145b4 in comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>::~OInterfaceContainerHelper4() (this=0x55555d40a0b0, __in_chrg=<optimized out>)
        at .../include/comphelper/interfacecontainer4.hxx:126
    #28 0x00007ffff6b206c6 in std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >::~pair() (this=0x55555d40a0a8, __in_chrg=<optimized out>)
        at /usr/include/c++/13/bits/stl_pair.h:187
    #29 0x00007ffff6b1aac4 in std::__new_allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> >::destroy<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >(std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >*) (__p=0x55555d40a0a8, this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>) at /usr/include/c++/13/bits/new_allocator.h:194
    #30 std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::destroy<std::pair<unsigned i--Type <RET> for more, q to quit, c to continue without paging--
    nt const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >(std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> >&, std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >*) (__p=0x55555d40a0a8, __a=...)
        at /usr/include/c++/13/bits/alloc_traits.h:557
    #31 std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false>*)
        (this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>, __n=0x55555d40a0a0) at /usr/include/c++/13/bits/hashtable_policy.h:2020
    #32 0x00007ffff6b188b7 in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::_M_deallocate_nodes(std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false>*)
        (this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>, __n=0x55555d409ef0) at /usr/include/c++/13/bits/hashtable_policy.h:2042
    #33 0x00007ffff6b164e6 in std::_Hashtable<unsigned int, std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::clear() (this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>) at /usr/include/c++/13/bits/hashtable.h:2509
    #34 0x00007ffff6b187cc in std::__cxx1998::unordered_map<unsigned int, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > > >::clear() (this=0x7ffff6f64988 <(anonymous namespace)::gaClients+40>)
        at /usr/include/c++/13/bits/unordered_map.h:798
    #35 0x00007ffff6b164a0 in std::__debug::unordered_map<unsigned int, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > > >::clear() (this=0x7ffff6f64960 <(anonymous namespace)::gaClients>)
        at /usr/include/c++/13/debug/unordered_map:234
    #36 0x00007ffff6b14151 in comphelper::AccessibleEventNotifier::shutdown() () at .../comphelper/source/misc/accessibleeventnotifier.cxx:268
    #37 0x00007fffee53fa20 in DeInitVCL() () at .../vcl/source/app/svmain.cxx:594
    #38 0x00007fffee53e227 in ImplSVMain() () at .../vcl/source/app/svmain.cxx:229
    #39 0x00007fffee53e283 in SVMain() () at .../vcl/source/app/svmain.cxx:236
    #40 0x00007ffff7a9f51d in soffice_main() () at .../desktop/source/app/sofficemain.cxx:94
    #41 0x00005555555549d4 in sal_main () at .../desktop/source/app/main.c:51
    #42 0x00005555555549ba in main (argc=2, argv=0x7fffffffd8e8) at .../desktop/source/app/main.c:49

Change-Id: I22c665f3c41624f4916b956ea266ff1d39fbe507
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155848
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
(cherry picked from commit 79cc574)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155781
Reviewed-by: Michael Stahl <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Sep 18, 2023
The start index of the selection can be larger than the
end index.
Take that into account when using these indices to
calculate the index and character count to copy
the relevant substring using `OUString::copy`.

Without this, running the tdf#157304 macro would trigger
an assert due to invalid indices being used.

Backtrace:

    soffice.bin: .../libreoffice/sal/rtl/strtmpl.hxx:890: void rtl::str::newfromsubstring(rtl_tstring**, const rtl_tstring*, sal_int32, sal_int32) [with rtl_tstring = _rtl_ustring; sal_int32 = int]: assertion `false' failed.

    Thread 1 "soffice.bin" 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
    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  0x00007ffff78a814f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
    #2  0x00007ffff785a462 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007ffff78444b2 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007ffff78443d5 in __assert_fail_base
        (fmt=0x7ffff79b8dc8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff7f6f2ec "false", file=file@entry=0x7ffff7f6be70 ".../libreoffice/sal/rtl/strtmpl.hxx", line=line@entry=890, function=function@entry=0x7ffff7f6f260 "void rtl::str::newFromSubString(rtl_tString**, const rtl_tString*, sal_Int32, sal_Int32) [with rtl_tString = _rtl_uString; sal_Int32 = int]") at ./assert/assert.c:92
    #5  0x00007ffff78533a2 in __assert_fail
        (assertion=0x7ffff7f6f2ec "false", file=0x7ffff7f6be70 ".../libreoffice/sal/rtl/strtmpl.hxx", line=890, function=0x7ffff7f6f260 "void rtl::str::newFromSubString(rtl_tString**, const rtl_tString*, sal_Int32, sal_Int32) [with rtl_tString = _rtl_uString; sal_Int32 = int]") at ./assert/assert.c:101
    #6  0x00007ffff7eee8b7 in rtl::str::newFromSubString<_rtl_uString>(_rtl_uString**, _rtl_uString const*, int, int) (ppThis=0x7fffffffae40, pFrom=0x55555e7af450, beginIndex=6, count=-6)
        at .../libreoffice/sal/rtl/strtmpl.hxx:890
    #7  0x00007ffff7ee91ca in rtl_uString_newFromSubString(rtl_uString**, rtl_uString const*, sal_Int32, sal_Int32) (ppThis=0x7fffffffae40, pFrom=0x55555e7af450, beginIndex=6, count=-6)
        at .../libreoffice/sal/rtl/ustring.cxx:1219
    #8  0x00007ffff1697b52 in rtl::OUString::copy(int, int) const (this=0x7fffffffae88, beginIndex=6, count=-6) at .../libreoffice/include/rtl/ustring.hxx:2229
    #9  0x00007ffff1814180 in svt::EntryImplementation::GetSelected(LineEnd) const (this=0x55555ed5e660) at .../libreoffice/include/svtools/editbrowsebox.hxx:371
    #10 0x00007ffff180d61b in FmXEditCell::getSelectedText() (this=0x55555ed5d500) at .../libreoffice/svx/source/fmcomp/gridcell.cxx:3739
    #11 0x00007fffdc1496f5 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*)
        (pThis=0x55555ed5d600, nVtableIndex=8, pRegisterReturn=0x7fffffffb2f0, pReturnTypeRef=0x555555743db0, bSimpleReturn=false, pStack=0x7fffffffb020, nStack=0, pGPR=0x7fffffffb180, pFPR=0x7fffffffb1b0)
        at .../libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:75
    #12 0x00007fffdc1481a0 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, typelib_TypeDescriptionReference*, sal_Int32, typelib_MethodParameter*, void*, void**, uno_Any**)
        (pThis=0x55555e7b0490, aVtableSlot=..., pReturnTypeRef=0x555555743db0, nParams=0, pParams=0x0, pUnoReturn=0x7fffffffb2f0, pUnoArgs=0x7fffffffb2e0, ppUnoExc=0x7fffffffb3d0)
        at .../libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233
    #13 0x00007fffdc148cdd in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(uno_Interface*, typelib_TypeDescription const*, void*, void**, uno_Any**)
        (pUnoI=0x55555e7b0490, pMemberDescr=0x55555cccccc0, pReturn=0x7fffffffb2f0, pArgs=0x7fffffffb2e0, ppException=0x7fffffffb3d0) at .../libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413
    #14 0x00007fff5beb45f2 in stoc_corefl::(anonymous namespace)::IdlInterfaceMethodImpl::invoke(com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&)
        (this=0x55555ed792f0, rObj=uno::Any("com.sun.star.uno.XInterface": ...), rArgs=empty uno::Sequence) at .../libreoffice/stoc/source/corereflection/criface.cxx:590
    #15 0x00007fff68020606 in (anonymous namespace)::IntrospectionAccessStatic_Impl::getPropertyValueByIndex(com::sun::star::uno::Any const&, sal_Int32) const
        (this=0x55555cc55910, obj=uno::Any("com.sun.star.uno.XInterface": ...), nSequenceIndex=13) at .../libreoffice/stoc/source/inspect/introspection.cxx:588
    #16 0x00007fff68020161 in (anonymous namespace)::IntrospectionAccessStatic_Impl::getPropertyValue(com::sun::star::uno::Any const&, rtl::OUString const&) const
        (this=0x55555cc55910, obj=uno::Any("com.sun.star.uno.XInterface": ...), aPropertyName="SelectedText") at .../libreoffice/stoc/source/inspect/introspection.cxx:498
    #17 0x00007fff68022522 in (anonymous namespace)::ImplIntrospectionAccess::getPropertyValue(rtl::OUString const&) (this=0x55555f4211a0, aPropertyName="SelectedText")
        at .../libreoffice/stoc/source/inspect/introspection.cxx:1014
    #18 0x00007ffff4edb132 in SbUnoObject::Notify(SfxBroadcaster&, SfxHint const&) (this=0x55555e7b0530, rBC=..., rHint=...) at .../libreoffice/basic/source/classes/sbunoobj.cxx:2059
    #19 0x00007ffff39c55f6 in SfxBroadcaster::Broadcast(SfxHint const&) (this=0x55555e7b07d0, rHint=...) at .../libreoffice/svl/source/notify/SfxBroadcaster.cxx:40
    #20 0x00007ffff505a52b in SbxVariable::Broadcast(SfxHintId) (this=0x55555e7b09d0, nHintId=SfxHintId::BasicDataWanted) at .../libreoffice/basic/source/sbx/sbxvar.cxx:155
    #21 0x00007ffff5054564 in SbxValue::Get(SbxValues&) const (this=0x55555e7b09d0, rRes=...) at .../libreoffice/basic/source/sbx/sbxvalue.cxx:289
    #22 0x00007ffff50568fe in SbxValue::Compute(SbxOperator, SbxValue const&) (this=0x55555f441ac0, eOp=SbxCAT, rOp=...) at .../libreoffice/basic/source/sbx/sbxvalue.cxx:809
    #23 0x00007ffff4fd4fb9 in SbiRuntime::StepArith(SbxOperator) (this=0x55555f43f5d0, eOp=SbxCAT) at .../libreoffice/basic/source/runtime/runtime.cxx:1305
    #24 0x00007ffff4fd580d in SbiRuntime::StepCAT() (this=0x55555f43f5d0) at .../libreoffice/basic/source/runtime/runtime.cxx:1418
    #25 0x00007ffff4fd2fb8 in SbiRuntime::Step() (this=0x55555f43f5d0) at .../libreoffice/basic/source/runtime/runtime.cxx:795
    #26 0x00007ffff4f1c85f in (anonymous namespace)::RunInitGuard::run() (this=0x7fffffffbb40) at .../libreoffice/basic/source/classes/sbxmod.cxx:1017
    #27 0x00007ffff4f1d2f5 in SbModule::Run(SbMethod*) (this=0x55555cc779e0, pMeth=0x55555f435130) at .../libreoffice/basic/source/classes/sbxmod.cxx:1177
    #28 0x00007ffff4f1b907 in SbModule::Notify(SfxBroadcaster&, SfxHint const&) (this=0x55555cc779e0, rBC=..., rHint=...) at .../libreoffice/basic/source/classes/sbxmod.cxx:775
    #29 0x00007ffff39c55f6 in SfxBroadcaster::Broadcast(SfxHint const&) (this=0x55555f4305d0, rHint=...) at .../libreoffice/svl/source/notify/SfxBroadcaster.cxx:40
    #30 0x00007ffff4f221e4 in SbMethod::Broadcast(SfxHintId) (this=0x55555f430500, nHintId=SfxHintId::BasicDataWanted) at .../libreoffice/basic/source/classes/sbxmod.cxx:2121
    #31 0x00007ffff5054564 in SbxValue::Get(SbxValues&) const (this=0x55555f430500, rRes=...) at .../libreoffice/basic/source/sbx/sbxvalue.cxx:289
    #32 0x00007ffff4f21e88 in SbMethod::Call(SbxValue*, SbxVariable*) (this=0x55555f430500, pRet=0x55555f42fff0, pCaller=0x55555f441b60) at .../libreoffice/basic/source/classes/sbxmod.cxx:2077
    #33 0x00007fff60031152 in 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>&)
        (this=0x55555eddeae0, aParams=uno::Sequence of length 1 = {...}, aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence) at .../libreoffice/scripting/source/basprov/basscript.cxx:252
    #34 0x00007ffff440c3e8 in SfxObjectShell::CallXScript(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, bool, com::sun::star::uno::Any const*)
        (_rxScriptContext=uno::Reference to (SwXTextDocument *) 0x55555c8acf20, _rScriptURL="vnd.sun.star.script:Standard.Module1.TestFocus?language=Basic&location=document", aParams=uno::Sequence of length 1 = {...}, aRet=uno::Any(void), aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence, bRaiseError=true, pCaller=0x7fffffffc670) at .../libreoffice/sfx2/source/doc/objmisc.cxx:1439
    #35 0x00007ffff440c8ea in SfxObjectShell::CallXScript(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, bool, com::sun::star::uno::Any const*)
        (this=0x55555794e5c0, rScriptURL="vnd.sun.star.script:Standard.Module1.TestFocus?language=Basic&location=document", aParams=uno::Sequence of length 1 = {...}, aRet=uno::Any(void), aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence, bRaiseError=true, pCaller=0x7fffffffc670) at .../libreoffice/sfx2/source/doc/objmisc.cxx:1468
    #36 0x00007ffff1904e37 in svxform::(anonymous namespace)::NewStyleUNOScript::invoke(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&)
        (this=0x55555e778920, _rArguments=uno::Sequence of length 1 = {...}, _rSynchronousResult=uno::Any(void)) at .../libreoffice/svx/source/form/fmscriptingenv.cxx:831
    #37 0x00007ffff1905461 in svxform::FormScriptingEnvironment::doFireScriptEvent(com::sun::star::script::ScriptEvent const&, com::sun::star::uno::Any*) (this=0x55555c8e5f10, _rEvent=..., _pSynchronousResult=0x0)
        at .../libreoffice/svx/source/form/fmscriptingenv.cxx:905
    #38 0x00007ffff1904264 in svxform::FormScriptListener::impl_doFireScriptEvent_nothrow(std::unique_lock<std::mutex>&, com::sun::star::script::ScriptEvent const&, com::sun::star::uno::Any*)
        (this=0x55555c8e80e0, _rGuard=..., _rEvent=..., _pSynchronousResult=0x0) at .../libreoffice/svx/source/form/fmscriptingenv.cxx:684
    #39 0x00007ffff190469f in svxform::FormScriptListener::OnAsyncScriptEvent(void*) (this=0x55555c8e80e0, p=0x55555e778870) at .../libreoffice/svx/source/form/fmscriptingenv.cxx:744
    #40 0x00007ffff19045eb in svxform::FormScriptListener::LinkStubOnAsyncScriptEvent(void*, void*) (instance=0x55555c8e80e0, data=0x55555e778870) at .../libreoffice/svx/source/form/fmscriptingenv.cxx:733
    #41 0x00007fffeddb80ed in Link<void*, void>::Call(void*) const (this=0x55555e7788c8, data=0x55555e778870) at .../libreoffice/include/tools/link.hxx:111
    #42 0x00007fffeddb51aa in ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x55555e7788c0) at .../libreoffice/vcl/source/window/winproc.cxx:2287
    #43 0x00007fffeddb70d7 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x555556c6da40, nEvent=SalEvent::UserEvent, pEvent=0x55555e7788c0)
        at .../libreoffice/vcl/source/window/winproc.cxx:2851
    #44 0x00007fffe2e98caa in SalFrame::CallCallback(SalEvent, void const*) const (this=0x555556c6f760, nEvent=SalEvent::UserEvent, pEvent=0x55555e7788c0) at .../libreoffice/vcl/inc/salframe.hxx:310
    #45 0x00007fffe2eb8973 in QtInstance::ProcessEvent(SalUserEventList::SalUserEvent) (this=0x55555573db20, aEvent=...) at .../libreoffice/vcl/qt5/QtInstance.cxx:484
    #46 0x00007fffee46593b in operator()() const (__closure=0x7fffffffcc20) at .../libreoffice/vcl/source/app/salusereventlist.cxx:119
    #47 0x00007fffee465c0f in SalUserEventList::DispatchUserEvents(bool) (this=0x55555573db58, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120
    #48 0x00007fffe2eb8458 in QtInstance::ImplYield(bool, bool) (this=0x55555573db20, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt5/QtInstance.cxx:410
    #49 0x00007fffe2eb8603 in QtInstance::DoYield(bool, bool) (this=0x55555573db20, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt5/QtInstance.cxx:432
    #50 0x00007fffee5221a8 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:377
    #51 0x00007fffee522f46 in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:461
    #52 0x00007fffee521e9b in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:355
    #53 0x00007ffff7a36296 in desktop::Desktop::Main() (this=0x7fffffffd720) at .../libreoffice/desktop/source/app/app.cxx:1601
    #54 0x00007fffee541f42 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:204
    #55 0x00007fffee542077 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:236
    #56 0x00007ffff7aa1b81 in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:94
    #57 0x00005555555549d4 in sal_main () at .../libreoffice/desktop/source/app/main.c:51
    #58 0x00005555555549ba in main (argc=2, argv=0x7fffffffd948) at .../libreoffice/desktop/source/app/main.c:49

Change-Id: Ib6989cc302419bf44a59bd2fff159257f647726d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157017
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Sep 19, 2023
The start index of the selection can be larger than the
end index.
Take that into account when using these indices to
calculate the index and character count to copy
the relevant substring using `OUString::copy`.

Without this, running the tdf#157304 macro would trigger
an assert due to invalid indices being used.

Backtrace:

    soffice.bin: .../libreoffice/sal/rtl/strtmpl.hxx:890: void rtl::str::newfromsubstring(rtl_tstring**, const rtl_tstring*, sal_int32, sal_int32) [with rtl_tstring = _rtl_ustring; sal_int32 = int]: assertion `false' failed.

    Thread 1 "soffice.bin" 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
    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  0x00007ffff78a814f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
    #2  0x00007ffff785a462 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007ffff78444b2 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007ffff78443d5 in __assert_fail_base
        (fmt=0x7ffff79b8dc8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff7f6f2ec "false", file=file@entry=0x7ffff7f6be70 ".../libreoffice/sal/rtl/strtmpl.hxx", line=line@entry=890, function=function@entry=0x7ffff7f6f260 "void rtl::str::newFromSubString(rtl_tString**, const rtl_tString*, sal_Int32, sal_Int32) [with rtl_tString = _rtl_uString; sal_Int32 = int]") at ./assert/assert.c:92
    #5  0x00007ffff78533a2 in __assert_fail
        (assertion=0x7ffff7f6f2ec "false", file=0x7ffff7f6be70 ".../libreoffice/sal/rtl/strtmpl.hxx", line=890, function=0x7ffff7f6f260 "void rtl::str::newFromSubString(rtl_tString**, const rtl_tString*, sal_Int32, sal_Int32) [with rtl_tString = _rtl_uString; sal_Int32 = int]") at ./assert/assert.c:101
    #6  0x00007ffff7eee8b7 in rtl::str::newFromSubString<_rtl_uString>(_rtl_uString**, _rtl_uString const*, int, int) (ppThis=0x7fffffffae40, pFrom=0x55555e7af450, beginIndex=6, count=-6)
        at .../libreoffice/sal/rtl/strtmpl.hxx:890
    #7  0x00007ffff7ee91ca in rtl_uString_newFromSubString(rtl_uString**, rtl_uString const*, sal_Int32, sal_Int32) (ppThis=0x7fffffffae40, pFrom=0x55555e7af450, beginIndex=6, count=-6)
        at .../libreoffice/sal/rtl/ustring.cxx:1219
    #8  0x00007ffff1697b52 in rtl::OUString::copy(int, int) const (this=0x7fffffffae88, beginIndex=6, count=-6) at .../libreoffice/include/rtl/ustring.hxx:2229
    #9  0x00007ffff1814180 in svt::EntryImplementation::GetSelected(LineEnd) const (this=0x55555ed5e660) at .../libreoffice/include/svtools/editbrowsebox.hxx:371
    #10 0x00007ffff180d61b in FmXEditCell::getSelectedText() (this=0x55555ed5d500) at .../libreoffice/svx/source/fmcomp/gridcell.cxx:3739
    #11 0x00007fffdc1496f5 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*)
        (pThis=0x55555ed5d600, nVtableIndex=8, pRegisterReturn=0x7fffffffb2f0, pReturnTypeRef=0x555555743db0, bSimpleReturn=false, pStack=0x7fffffffb020, nStack=0, pGPR=0x7fffffffb180, pFPR=0x7fffffffb1b0)
        at .../libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:75
    #12 0x00007fffdc1481a0 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, typelib_TypeDescriptionReference*, sal_Int32, typelib_MethodParameter*, void*, void**, uno_Any**)
        (pThis=0x55555e7b0490, aVtableSlot=..., pReturnTypeRef=0x555555743db0, nParams=0, pParams=0x0, pUnoReturn=0x7fffffffb2f0, pUnoArgs=0x7fffffffb2e0, ppUnoExc=0x7fffffffb3d0)
        at .../libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233
    #13 0x00007fffdc148cdd in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(uno_Interface*, typelib_TypeDescription const*, void*, void**, uno_Any**)
        (pUnoI=0x55555e7b0490, pMemberDescr=0x55555cccccc0, pReturn=0x7fffffffb2f0, pArgs=0x7fffffffb2e0, ppException=0x7fffffffb3d0) at .../libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413
    #14 0x00007fff5beb45f2 in stoc_corefl::(anonymous namespace)::IdlInterfaceMethodImpl::invoke(com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&)
        (this=0x55555ed792f0, rObj=uno::Any("com.sun.star.uno.XInterface": ...), rArgs=empty uno::Sequence) at .../libreoffice/stoc/source/corereflection/criface.cxx:590
    #15 0x00007fff68020606 in (anonymous namespace)::IntrospectionAccessStatic_Impl::getPropertyValueByIndex(com::sun::star::uno::Any const&, sal_Int32) const
        (this=0x55555cc55910, obj=uno::Any("com.sun.star.uno.XInterface": ...), nSequenceIndex=13) at .../libreoffice/stoc/source/inspect/introspection.cxx:588
    #16 0x00007fff68020161 in (anonymous namespace)::IntrospectionAccessStatic_Impl::getPropertyValue(com::sun::star::uno::Any const&, rtl::OUString const&) const
        (this=0x55555cc55910, obj=uno::Any("com.sun.star.uno.XInterface": ...), aPropertyName="SelectedText") at .../libreoffice/stoc/source/inspect/introspection.cxx:498
    #17 0x00007fff68022522 in (anonymous namespace)::ImplIntrospectionAccess::getPropertyValue(rtl::OUString const&) (this=0x55555f4211a0, aPropertyName="SelectedText")
        at .../libreoffice/stoc/source/inspect/introspection.cxx:1014
    #18 0x00007ffff4edb132 in SbUnoObject::Notify(SfxBroadcaster&, SfxHint const&) (this=0x55555e7b0530, rBC=..., rHint=...) at .../libreoffice/basic/source/classes/sbunoobj.cxx:2059
    #19 0x00007ffff39c55f6 in SfxBroadcaster::Broadcast(SfxHint const&) (this=0x55555e7b07d0, rHint=...) at .../libreoffice/svl/source/notify/SfxBroadcaster.cxx:40
    #20 0x00007ffff505a52b in SbxVariable::Broadcast(SfxHintId) (this=0x55555e7b09d0, nHintId=SfxHintId::BasicDataWanted) at .../libreoffice/basic/source/sbx/sbxvar.cxx:155
    #21 0x00007ffff5054564 in SbxValue::Get(SbxValues&) const (this=0x55555e7b09d0, rRes=...) at .../libreoffice/basic/source/sbx/sbxvalue.cxx:289
    #22 0x00007ffff50568fe in SbxValue::Compute(SbxOperator, SbxValue const&) (this=0x55555f441ac0, eOp=SbxCAT, rOp=...) at .../libreoffice/basic/source/sbx/sbxvalue.cxx:809
    #23 0x00007ffff4fd4fb9 in SbiRuntime::StepArith(SbxOperator) (this=0x55555f43f5d0, eOp=SbxCAT) at .../libreoffice/basic/source/runtime/runtime.cxx:1305
    #24 0x00007ffff4fd580d in SbiRuntime::StepCAT() (this=0x55555f43f5d0) at .../libreoffice/basic/source/runtime/runtime.cxx:1418
    #25 0x00007ffff4fd2fb8 in SbiRuntime::Step() (this=0x55555f43f5d0) at .../libreoffice/basic/source/runtime/runtime.cxx:795
    #26 0x00007ffff4f1c85f in (anonymous namespace)::RunInitGuard::run() (this=0x7fffffffbb40) at .../libreoffice/basic/source/classes/sbxmod.cxx:1017
    #27 0x00007ffff4f1d2f5 in SbModule::Run(SbMethod*) (this=0x55555cc779e0, pMeth=0x55555f435130) at .../libreoffice/basic/source/classes/sbxmod.cxx:1177
    #28 0x00007ffff4f1b907 in SbModule::Notify(SfxBroadcaster&, SfxHint const&) (this=0x55555cc779e0, rBC=..., rHint=...) at .../libreoffice/basic/source/classes/sbxmod.cxx:775
    #29 0x00007ffff39c55f6 in SfxBroadcaster::Broadcast(SfxHint const&) (this=0x55555f4305d0, rHint=...) at .../libreoffice/svl/source/notify/SfxBroadcaster.cxx:40
    #30 0x00007ffff4f221e4 in SbMethod::Broadcast(SfxHintId) (this=0x55555f430500, nHintId=SfxHintId::BasicDataWanted) at .../libreoffice/basic/source/classes/sbxmod.cxx:2121
    #31 0x00007ffff5054564 in SbxValue::Get(SbxValues&) const (this=0x55555f430500, rRes=...) at .../libreoffice/basic/source/sbx/sbxvalue.cxx:289
    #32 0x00007ffff4f21e88 in SbMethod::Call(SbxValue*, SbxVariable*) (this=0x55555f430500, pRet=0x55555f42fff0, pCaller=0x55555f441b60) at .../libreoffice/basic/source/classes/sbxmod.cxx:2077
    #33 0x00007fff60031152 in 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>&)
        (this=0x55555eddeae0, aParams=uno::Sequence of length 1 = {...}, aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence) at .../libreoffice/scripting/source/basprov/basscript.cxx:252
    #34 0x00007ffff440c3e8 in SfxObjectShell::CallXScript(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, bool, com::sun::star::uno::Any const*)
        (_rxScriptContext=uno::Reference to (SwXTextDocument *) 0x55555c8acf20, _rScriptURL="vnd.sun.star.script:Standard.Module1.TestFocus?language=Basic&location=document", aParams=uno::Sequence of length 1 = {...}, aRet=uno::Any(void), aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence, bRaiseError=true, pCaller=0x7fffffffc670) at .../libreoffice/sfx2/source/doc/objmisc.cxx:1439
    #35 0x00007ffff440c8ea in SfxObjectShell::CallXScript(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, bool, com::sun::star::uno::Any const*)
        (this=0x55555794e5c0, rScriptURL="vnd.sun.star.script:Standard.Module1.TestFocus?language=Basic&location=document", aParams=uno::Sequence of length 1 = {...}, aRet=uno::Any(void), aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence, bRaiseError=true, pCaller=0x7fffffffc670) at .../libreoffice/sfx2/source/doc/objmisc.cxx:1468
    #36 0x00007ffff1904e37 in svxform::(anonymous namespace)::NewStyleUNOScript::invoke(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&)
        (this=0x55555e778920, _rArguments=uno::Sequence of length 1 = {...}, _rSynchronousResult=uno::Any(void)) at .../libreoffice/svx/source/form/fmscriptingenv.cxx:831
    #37 0x00007ffff1905461 in svxform::FormScriptingEnvironment::doFireScriptEvent(com::sun::star::script::ScriptEvent const&, com::sun::star::uno::Any*) (this=0x55555c8e5f10, _rEvent=..., _pSynchronousResult=0x0)
        at .../libreoffice/svx/source/form/fmscriptingenv.cxx:905
    #38 0x00007ffff1904264 in svxform::FormScriptListener::impl_doFireScriptEvent_nothrow(std::unique_lock<std::mutex>&, com::sun::star::script::ScriptEvent const&, com::sun::star::uno::Any*)
        (this=0x55555c8e80e0, _rGuard=..., _rEvent=..., _pSynchronousResult=0x0) at .../libreoffice/svx/source/form/fmscriptingenv.cxx:684
    #39 0x00007ffff190469f in svxform::FormScriptListener::OnAsyncScriptEvent(void*) (this=0x55555c8e80e0, p=0x55555e778870) at .../libreoffice/svx/source/form/fmscriptingenv.cxx:744
    #40 0x00007ffff19045eb in svxform::FormScriptListener::LinkStubOnAsyncScriptEvent(void*, void*) (instance=0x55555c8e80e0, data=0x55555e778870) at .../libreoffice/svx/source/form/fmscriptingenv.cxx:733
    #41 0x00007fffeddb80ed in Link<void*, void>::Call(void*) const (this=0x55555e7788c8, data=0x55555e778870) at .../libreoffice/include/tools/link.hxx:111
    #42 0x00007fffeddb51aa in ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x55555e7788c0) at .../libreoffice/vcl/source/window/winproc.cxx:2287
    #43 0x00007fffeddb70d7 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x555556c6da40, nEvent=SalEvent::UserEvent, pEvent=0x55555e7788c0)
        at .../libreoffice/vcl/source/window/winproc.cxx:2851
    #44 0x00007fffe2e98caa in SalFrame::CallCallback(SalEvent, void const*) const (this=0x555556c6f760, nEvent=SalEvent::UserEvent, pEvent=0x55555e7788c0) at .../libreoffice/vcl/inc/salframe.hxx:310
    #45 0x00007fffe2eb8973 in QtInstance::ProcessEvent(SalUserEventList::SalUserEvent) (this=0x55555573db20, aEvent=...) at .../libreoffice/vcl/qt5/QtInstance.cxx:484
    #46 0x00007fffee46593b in operator()() const (__closure=0x7fffffffcc20) at .../libreoffice/vcl/source/app/salusereventlist.cxx:119
    #47 0x00007fffee465c0f in SalUserEventList::DispatchUserEvents(bool) (this=0x55555573db58, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120
    #48 0x00007fffe2eb8458 in QtInstance::ImplYield(bool, bool) (this=0x55555573db20, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt5/QtInstance.cxx:410
    #49 0x00007fffe2eb8603 in QtInstance::DoYield(bool, bool) (this=0x55555573db20, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt5/QtInstance.cxx:432
    #50 0x00007fffee5221a8 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:377
    #51 0x00007fffee522f46 in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:461
    #52 0x00007fffee521e9b in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:355
    #53 0x00007ffff7a36296 in desktop::Desktop::Main() (this=0x7fffffffd720) at .../libreoffice/desktop/source/app/app.cxx:1601
    #54 0x00007fffee541f42 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:204
    #55 0x00007fffee542077 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:236
    #56 0x00007ffff7aa1b81 in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:94
    #57 0x00005555555549d4 in sal_main () at .../libreoffice/desktop/source/app/main.c:51
    #58 0x00005555555549ba in main (argc=2, argv=0x7fffffffd948) at .../libreoffice/desktop/source/app/main.c:49

Change-Id: Ib6989cc302419bf44a59bd2fff159257f647726d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157017
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
(cherry picked from commit 2632ce875f9a9c3b0a7861112dbfc48fe17bc2a5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156961
Reviewed-by: Xisco Fauli <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Oct 16, 2023
...as seen during CppunitTest_sd_import_tests2,

> pixman-sse2.c:522:16: runtime error: load of misaligned address 0x5170000a4f83 for type 'const uint32_t *' (aka 'const unsigned int *'), which requires 4 byte alignment
> 0x5170000a4f83: note: pointer points here
>  00  b8 ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff c0 00  b8 ff ff ff ff ff ff
>               ^
>  #0 in combine1 at workdir/UnpackedTarball/pixman/pixman/pixman-sse2.c:522:5
>  #1 in sse2_combine_add_u at workdir/UnpackedTarball/pixman/pixman/pixman-sse2.c:1366:6
>  #2 in sse2_composite_add_8_8 at workdir/UnpackedTarball/pixman/pixman/pixman-sse2.c:4490:2
>  #3 in add_glyphs at workdir/UnpackedTarball/pixman/pixman/pixman-glyph.c:615:6
>  #4 in pixman_composite_glyphs at workdir/UnpackedTarball/pixman/pixman/pixman-glyph.c:673:5
>  #5 in composite_glyphs at workdir/UnpackedTarball/cairo/src/cairo-image-compositor.c:941:2
>  #6 in composite_glyphs at workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:2295:12
>  #7 in clip_and_composite at workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:1049:15
>  #8 in _cairo_traps_compositor_glyphs at workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:2331:11
>  #9 in _cairo_compositor_glyphs at workdir/UnpackedTarball/cairo/src/cairo-compositor.c:292:11
>  #10 in _cairo_image_surface_glyphs at workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:1030:12
>  #11 in _cairo_surface_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-surface.c:2920:15
>  #12 in _cairo_gstate_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-gstate.c:2077:15
>  #13 in _cairo_default_context_glyphs at workdir/UnpackedTarball/cairo/src/cairo-default-context.c:1334:12
>  #14 in cairo_show_glyphs at workdir/UnpackedTarball/cairo/src/cairo.c:3670:14
>  #15 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:476:9
>  #16 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:72:23
>  #17 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:171:18
>  #18 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:331:16
>  #19 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:482:9
>  #20 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, KernArraySpan, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:951:9
>  #21 in drawinglayer::processor2d::VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(drawinglayer::primitive2d::TextSimplePortionPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:422:33
>  #22 in drawinglayer::processor2d::VclPixelProcessor2D::processTextSimplePortionPrimitive2D(drawinglayer::primitive2d::TextSimplePortionPrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:404:9
>  #23 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:200:13
>  #24 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #25 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #26 in drawinglayer::primitive2d::GroupPrimitive2D::getChildren(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&) const at include/drawinglayer/primitive2d/groupprimitive2d.hxx:76:90
>  #27 in drawinglayer::primitive2d::GroupPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/groupprimitive2d.cxx:53:13
>  #28 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #29 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #30 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #31 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #32 in drawinglayer::primitive2d::GroupPrimitive2D::getChildren(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&) const at include/drawinglayer/primitive2d/groupprimitive2d.hxx:76:90
>  #33 in drawinglayer::primitive2d::GroupPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/groupprimitive2d.cxx:53:13
>  #34 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #35 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #36 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #37 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #38 in drawinglayer::primitive2d::GroupPrimitive2D::getChildren(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&) const at include/drawinglayer/primitive2d/groupprimitive2d.hxx:76:90
>  #39 in drawinglayer::primitive2d::GroupPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/groupprimitive2d.cxx:53:13
>  #40 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #41 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #42 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #43 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #44 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>  #45 in drawinglayer::primitive2d::SdrTextPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx:235:47
>  #46 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #47 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #48 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #49 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #50 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>  #51 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #52 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #53 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #54 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:279:31
>  #55 in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:117:21
>  #56 in SdrPageWindow::RedrawAll(sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/sdrpagewindow.cxx:354:28
>  #57 in SdrPageView::CompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpagv.cxx:239:18
>  #58 in SdrPaintView::DoCompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpntv.cxx:610:21
>  #59 in SdrPaintView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpntv.cxx:523:5
>  #60 in sd::View::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at sd/source/ui/view/sdview.cxx:498:17
>  #61 in sd::DrawView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at sd/source/ui/view/drawview.cxx:517:17
>  #62 in sd::DrawDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sd/source/ui/docshell/docshel2.cxx:112:12
>  #63 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #64 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #65 in SfxObjectShell::CreatePreview_Impl(bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:197:40
>  #66 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:109:9
>  #67 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:3738:31
>  #68 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:3696:33
>  #69 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1469:19
>  #70 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:2992:39
>  #71 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:2782:9
>  #72 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:319:19
>  #73 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:3191:42
>  #74 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1801:13
>  #75 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:213:16
>  #76 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #77 in UnoApiTest::saveAndReload(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:218:5
>  #78 in testOverflowBehaviorClip::TestBody() at sd/qa/unit/import-tests2.cxx:1899:5

Change-Id: Iea3e107608137c4dec9103ee0b04e801284b5fa9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158018
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Nov 28, 2023
After commit 86c6822 (tdf#96401:
allow to detect a broken ZIP package, 2023-11-26) impl_openStream
is called from TypeDetection::impl_detectTypeFlatAndDeep for URIs
like ".component:Bibliography/View1". For some reasons, sometimes
GIO UCP tries to handle these URIs; failing that, it shows an
error message.

This started to fail UITest_writer_tests4 (specifically, test for
tdf92611), like this:

  Thread 1 (Thread 0x7f51cd99b1c0 (LWP 1424555) "soffice.bin"):
  #10 std::condition_variable::wait_for<long int, std::ratio<1, 1000>, SvpSalInstance::ImplYield(bool, bool)::<lambda()> > (__rtime=<optimized out>, __p=..., __lock=..., this=0x13d78e0) at ~/gcc/inst/include/c++/14.0.0/condition_variable:177
  #11 SvpSalInstance::ImplYield(bool, bool) (this=this@entry=0x13d7690, bWait=bWait@entry=true, bHandleAllCurrentEvents=bHandleAllCurrentEvents@entry=false) at vcl/headless/svpinst.cxx:451
  #12 0x00007f51d9d85695 in SvpSalInstance::DoYield(bool, bool) (this=0x13d7690, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at vcl/headless/svpinst.cxx:471
  #13 0x00007f51d9add654 in ImplYield(bool, bool) (i_bWait=i_bWait@entry=true, i_bAllEvents=i_bAllEvents@entry=false) at vcl/source/app/svapp.cxx:390
  #14 0x00007f51d9addc73 in Application::Yield() () at vcl/source/app/svapp.cxx:474
  #15 0x00007f51d946de4f in Dialog::Execute() (this=0x14554e40) at vcl/source/window/dialog.cxx:1078
  #16 0x00007f51d9a5ccec in virtual thunk to SalInstanceDialog::run() () at vcl/inc/salvtables.hxx:543
  #17 0x00007f51d92b45b2 in (anonymous namespace)::executeErrorDialog (nButtonMask=(anonymous namespace)::MessageBoxStyle::Ok, rMessage=Python Exception <class 'gdb.error'>: value has been optimized out
  , rContext=Python Exception <class 'gdb.error'>: value has been optimized out
  , eClassification=com::sun::star::task::InteractionClassification::InteractionClassification_ERROR, pParent=<optimized out>) at uui/source/iahndl-errorhandler.cxx:123
  #18 UUIInteractionHelper::handleErrorHandlerRequest(com::sun::star::task::InteractionClassification, ErrCode, std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> > const&, com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::task::XInteractionContinuation> > const&, bool, bool&, rtl::OUString&) (this=this@entry=0x1408c9a8, eClassification=com::sun::star::task::InteractionClassification::InteractionClassification_ERROR, nErrorCode=..., nErrorCode@entry=..., rArguments=std::__debug::vector of length 0, capacity 0, rContinuations=uno::Sequence of length 1 = {...}, bObtainErrorStringOnly=bObtainErrorStringOnly@entry=false, bHasErrorString=@0x7ffd36859b90: false, rErrorString="") at uui/source/iahndl-errorhandler.cxx:250
  #19 0x00007f51d92bbcd5 in UUIInteractionHelper::handleInteractiveIOException(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&, bool, bool&, rtl::OUString&) (this=this@entry=0x1408c9a8, rRequest=uno::Reference to (ucbhelper::InteractionRequest *) 0x136bdcc8, bObtainErrorStringOnly=bObtainErrorStringOnly@entry=false, bHasErrorString=@0x7ffd36859b90: false, rErrorString="") at uui/source/iahndl-ioexceptions.cxx:265
  #20 0x00007f51d92a9e33 in UUIInteractionHelper::handleRequest_impl(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&, bool, bool&, rtl::OUString&) (this=this@entry=0x1408c9a8, rRequest=uno::Reference to (ucbhelper::InteractionRequest *) 0x136bdcc8, bObtainErrorStringOnly=bObtainErrorStringOnly@entry=false, bHasErrorString=@0x7ffd36859b90: false, rErrorString="") at uui/source/iahndl.cxx:474
  #21 0x00007f51d92aca90 in UUIInteractionHelper::handleRequest(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&) (this=this@entry=0x1408c9a8, rRequest=uno::Reference to (ucbhelper::InteractionRequest *) 0x136bdcc8) at uui/source/iahndl.cxx:177
  #22 0x00007f51d92c2d36 in (anonymous namespace)::UUIInteractionHandler::handle(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&) (this=0x1408c960, rRequest=<optimized out>) at uui/source/interactionhandler.cxx:194
  #23 0x00007f51d8ff8607 in ucbhelper::cancelCommandExecution(com::sun::star::uno::Any const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) (rException=uno::Any("com.sun.star.ucb.InteractiveAugmentedIOException": ...), xEnv=uno::Reference to (ucbhelper::CommandEnvironment *) 0x1494c7e8) at ucbhelper/source/provider/cancelcommandexecution.cxx:52
  #24 0x00007f5197fd8ddd in gio::Content::getFileInfo(com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, _GFileInfo**, bool) (this=0x13658da0, env=uno::Reference to (ucbhelper::CommandEnvironment *) 0x1494c7e8, info=<optimized out>, fail=<optimized out>) at ucb/source/ucp/gio/gio_content.cxx:652
  #25 0x00007f5197fdf515 in gio::Content::getPropertyValues(com::sun::star::uno::Sequence<com::sun::star::beans::Property> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) (this=this@entry=0x13658da0, rProperties=uno::Sequence of length 1 = {...}, xEnv=uno::Reference to (ucbhelper::CommandEnvironment *) 0x1494c7e8) at ucb/source/ucp/gio/gio_content.cxx:448
  #26 0x00007f5197fe031e in gio::Content::execute(com::sun::star::ucb::Command const&, int, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) (this=0x13658da0, aCommand=<optimized out>, xEnv=uno::Reference to (ucbhelper::CommandEnvironment *) 0x1494c7e8) at ucb/source/ucp/gio/gio_content.cxx:951
  #27 0x00007f51d8fe73ad in ucbhelper::Content_Impl::executeCommand(com::sun::star::ucb::Command const&) (this=0x142235a0, rCommand=...) at ucbhelper/source/client/content.cxx:1264
  #28 0x00007f51d8fe8607 in ucbhelper::Content::getPropertyValuesInterface(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=this@entry=0x7ffd3685a6d0, rPropertyNames=uno::Sequence of length 1 = {...}) at ucbhelper/source/client/content.cxx:500
  #29 0x00007f51d8fe88ba in ucbhelper::Content::getPropertyValues(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=this@entry=0x7ffd3685a6d0, rPropertyNames=uno::Sequence of length 1 = {...}) at ucbhelper/source/client/content.cxx:458
  #30 0x00007f51d8fe8b37 in ucbhelper::Content::getPropertyValue(rtl::OUString const&) (this=this@entry=0x7ffd3685a6d0, rPropertyName="IsDocument") at ucbhelper/source/client/content.cxx:437
  #31 0x00007f51d8fe9282 in ucbhelper::Content::isDocument() (this=this@entry=0x7ffd3685a6d0) at ucbhelper/source/client/content.cxx:1028
  #32 0x00007f51d8feac5d in ucbhelper::Content::openStream() (this=this@entry=0x7ffd3685a6d0) at ucbhelper/source/client/content.cxx:693
  #33 0x00007f51d9274d77 in utl::MediaDescriptor::impl_openStreamWithURL(rtl::OUString const&, bool) (this=this@entry=0x7ffd3685b400, sURL=".component:Bibliography/View1", bLockFile=bLockFile@entry=true) at unotools/source/misc/mediadescriptor.cxx:468
  #34 0x00007f51d9275951 in utl::MediaDescriptor::impl_addInputStream(bool) (this=0x7ffd3685b400, bLockFile=bLockFile@entry=true) at unotools/source/misc/mediadescriptor.cxx:259
  #35 0x00007f51d927685a in utl::MediaDescriptor::addInputStream() (this=<optimized out>) at unotools/source/misc/mediadescriptor.cxx:220
  #36 0x00007f51d69a7745 in filter::config::TypeDetection::impl_openStream(utl::MediaDescriptor&) (this=this@entry=0x143f7da0, rDescriptor=...) at filter/source/config/cache/typedetection.cxx:1202
  #37 0x00007f51d69a9238 in filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor&, std::__debug::vector<filter::config::FlatDetectionInfo, std::allocator<filter::config::FlatDetectionInfo> > const&, bool, rtl::OUString&) (this=this@entry=0x143f7da0, rDescriptor=..., lFlatTypes=std::__debug::vector of length 180, capacity 256 = {...}, bAllowDeep=bAllowDeep@entry=true, rLastChance="") at filter/source/config/cache/typedetection.cxx:902
  #38 0x00007f51d69b971f in filter::config::TypeDetection::queryTypeByDescriptor(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, unsigned char) (this=0x143f7da0, lDescriptor=uno::Sequence of length 6 = {...}, bAllowDeep=1 '\001') at filter/source/config/cache/typedetection.cxx:434
  #39 0x00007f51d6ec41ee in framework::LoadEnv::impl_detectTypeAndFilter() (this=this@entry=0x14501c08) at framework/source/loadenv/loadenv.cxx:774
  #40 0x00007f51d6ec5446 in framework::LoadEnv::start() (this=this@entry=0x14501c08) at framework/source/loadenv/loadenv.cxx:395
  #41 0x00007f51d6ec5b67 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) (this=this@entry=0x14501c08, sURL=".component:Bibliography/View1", lMediaDescriptor=uno::Sequence of length 5 = {...}, xBaseFrame=uno::Reference to (framework::Desktop *) 0x16a8908, sTarget="_blank", nSearchFlags=0, eFeature=(LoadEnvFeatures::WorkWithUI | LoadEnvFeatures::AllowContentHandler)) at framework/source/loadenv/loadenv.cxx:308
  #42 0x00007f51d6d88634 in framework::LoadDispatcher::impl_dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) (this=0x14501bb0, rURL=..., lArguments=uno::Sequence of length 5 = {...}, xListener=empty uno::Reference) at framework/source/dispatch/loaddispatcher.cxx:107
  #43 0x00007f51d6d8987b in non-virtual thunk to framework::LoadDispatcher::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) () at framework/source/inc/dispatch/loaddispatcher.hxx:99
  #44 0x00007f51d761f4d3 in SfxApplication::OpenDocExec_Impl(SfxRequest&) (this=<optimized out>, rReq=<optimized out>) at sfx2/source/appl/appopen.cxx:1097
  #45 0x00007f51d77065c2 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=this@entry=0x2cf43b0, rShell=..., rSlot=..., rReq=..., bRecord=false) at sfx2/source/control/dispatch.cxx:254
  #46 0x00007f51d7711618 in SfxDispatcher::PostMsgHandler(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >) (this=0x2cf43b0, pReq=std::unique_ptr<SfxRequest> = {...}) at ~/gcc/inst/include/c++/14.0.0/bits/unique_ptr.h:193
  #47 0x00007f51d7713d74 in std::__invoke_impl<void, void (SfxDispatcher::*&)(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >), SfxDispatcher*&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> > >(std::__invoke_memfun_deref, void (SfxDispatcher::*&)(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >), SfxDispatcher*&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >&&) (__f=<optimized out>, __t=<optimized out>) at ~/gcc/inst/include/c++/14.0.0/bits/unique_ptr.h:191
  #48 std::__invoke<void (SfxDispatcher::*&)(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >), SfxDispatcher*&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> > >(void (SfxDispatcher::*&)(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >), SfxDispatcher*&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >&&) (__fn=<optimized out>) at ~/gcc/inst/include/c++/14.0.0/bits/invoke.h:96
  #49 std::_Bind<void (SfxDispatcher::*(SfxDispatcher*, std::_Placeholder<1>))(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >)>::__call<void, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >&&, 0ul, 1ul>(std::tuple<std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >&&>&&, std::_Index_tuple<0ul, 1ul>) (__args=<optimized out>, this=<optimized out>) at ~/gcc/inst/include/c++/14.0.0/functional:511
  #50 std::_Bind<void (SfxDispatcher::*(SfxDispatcher*, std::_Placeholder<1>))(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >)>::operator()<std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >, void>(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >&&) (this=<optimized out>) at ~/gcc/inst/include/c++/14.0.0/functional:596
  #51 std::__invoke_impl<void, std::_Bind<void (SfxDispatcher::*(SfxDispatcher*, std::_Placeholder<1>))(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >)>&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> > >(std::__invoke_other, std::_Bind<void (SfxDispatcher::*(SfxDispatcher*, std::_Placeholder<1>))(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >)>&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >&&) (__f=<optimized out>) at ~/gcc/inst/include/c++/14.0.0/bits/invoke.h:61
  #52 std::__invoke_r<void, std::_Bind<void (SfxDispatcher::*(SfxDispatcher*, std::_Placeholder<1>))(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >)>&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> > >(std::_Bind<void (SfxDispatcher::*(SfxDispatcher*, std::_Placeholder<1>))(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >)>&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >&&) (__fn=<optimized out>) at ~/gcc/inst/include/c++/14.0.0/bits/invoke.h:111
  #53 std::_Function_handler<void (std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >), std::_Bind<void (SfxDispatcher::*(SfxDispatcher*, std::_Placeholder<1>))(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >)> >::_M_invoke(std::_Any_data const&, std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >&&) (__functor=<optimized out>, __args#0=<optimized out>) at ~/gcc/inst/include/c++/14.0.0/bits/std_function.h:290
  #54 0x00007f51d7a6aa83 in std::function<void (std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >)>::operator()(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >) const (__args#0=std::unique_ptr<SfxRequest> = {...}, this=0x134550c0) at ~/gcc/inst/include/c++/14.0.0/bits/std_function.h:591
  #55 SfxHintPoster::DoEvent_Impl(void*) (this=0x134550b0, pPostedHint=0x7f5174a248b0) at sfx2/source/notify/hintpost.cxx:43
  #56 0x00007f51d9590f30 in Link<void*, void>::Call(void*) const (data=<optimized out>, this=0x7f51748c59b8) at include/tools/link.hxx:111
  #57 ImplHandleUserEvent (pSVEvent=0x7f51748c59b0) at vcl/source/window/winproc.cxx:2287
  #58 ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x284cc10, nEvent=SalEvent::UserEvent, pEvent=0x7f51748c59b0) at vcl/source/window/winproc.cxx:2851
  #59 0x00007f51d9d8488f in SalFrame::CallCallback(SalEvent, void const*) const (pEvent=0x7f51748c59b0, nEvent=SalEvent::UserEvent, this=0x284f1c0) at include/rtl/ref.hxx:206
  #60 SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) (this=0x13d7690, aEvent=...) at vcl/headless/svpinst.cxx:266
  #61 0x00007f51d9a4b216 in operator() (__closure=<synthetic pointer>) at vcl/source/app/salusereventlist.cxx:119
  #62 SalUserEventList::DispatchUserEvents(bool) (this=this@entry=0x13d76b8, bHandleAllCurrentEvents=bHandleAllCurrentEvents@entry=false) at vcl/source/app/salusereventlist.cxx:120
  #63 0x00007f51d9d84fc3 in SvpSalInstance::ImplYield(bool, bool) (this=this@entry=0x13d7690, bWait=bWait@entry=true, bHandleAllCurrentEvents=bHandleAllCurrentEvents@entry=false) at vcl/headless/svpinst.cxx:395
  #64 0x00007f51d9d85695 in SvpSalInstance::DoYield(bool, bool) (this=0x13d7690, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at vcl/headless/svpinst.cxx:471
  #65 0x00007f51d9add654 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:390
  #66 0x00007f51d9addd8d in Application::Execute() () at vcl/source/app/svapp.cxx:368
  #67 0x00007f51d7bce212 in desktop::Desktop::Main() (this=0x7ffd3685d0c0) at desktop/source/app/app.cxx:1601
  #68 0x00007f51d9af112b in ImplSVMain() () at vcl/source/app/svmain.cxx:229
  #69 0x00007f51d9af13b5 in SVMain() () at vcl/source/app/svmain.cxx:261
  #70 0x00007f51d7c03c37 in soffice_main() () at desktop/source/app/sofficemain.cxx:94
  #71 0x000000000040078b in sal_main () at desktop/source/app/main.c:51
  #72 main (argc=argc@entry=7, argv=argv@entry=0x7ffd3685d2c8) at desktop/source/app/main.c:49

Strangely, this is inconsistent on Linux systems (shows on some
systems, but not on others).

Prevent this exiting from MediaDescriptor::impl_openStreamWithURL
early for these URIs.

Thank Stephan Bergmann for the help understanding it and deciding
how to fix it.

Change-Id: I84c551916e6643eeb219f23ff778d4418eea9124
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160057
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Jan 19, 2024
...in code newly introduced in 135ce25
"tdf#146487 Don't show generic diagram title when there is an empty title
given", which caused CppunitTest_chart2_export2 to fail with

> /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62: runtime error: load of value 222, which is not a valid value for type 'bool'
>     #0 0x7f95cd9ed87c in oox::drawingml::chart::PlotAreaConverter::isSingleSeriesTitle() const /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62
>     #1 0x7f95cd9e506f in oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&) /oox/source/drawingml/chart/chartspaceconverter.cxx:189:53
>     #2 0x7f95cd9b6c34 in oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&, oox::drawingml::chart::ChartSpaceModel&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) /oox/source/drawingml/chart/chartconverter.cxx:93:20
>     #3 0x7f95ce548f59 in oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /oox/source/drawingml/shape.cxx:2245:50
>     #4 0x7f95438150b2 in oox::xls::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /sc/source/filter/oox/drawingfragment.cxx:113:30
>     #5 0x7f95ce5267bb in oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase&, rtl::OUString const&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool, bool, basegfx::B2DHomMatrix&, oox::drawingml::FillProperties const&, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:1964:9
>     #6 0x7f95ce4edb54 in oox::drawingml::Shape::addShape(oox::core::XmlFilterBase&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, basegfx::B2DHomMatrix const&, oox::drawingml::FillProperties const&, std::__debug::map<rtl::OUString, std::shared_ptr<oox::drawingml::Shape>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, std::shared_ptr<oox::drawingml::Shape> > > >*, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:366:41
>     #7 0x7f954381ef79 in oox::xls::DrawingFragment::onEndElement() /sc/source/filter/oox/drawingfragment.cxx:335:30
>     #8 0x7f95cdcaee54 in oox::core::ContextHandler2Helper::implEndElement(int) /oox/source/core/contexthandler2.cxx:125:9
>     #9 0x7f95cdd5c116 in oox::core::FragmentHandler2::endFastElement(int) /oox/source/core/fragmenthandler2.cxx:91:5
>     #10 0x7f95caf68fca in (anonymous namespace)::Entity::endElement() /sax/source/fastparser/fastparser.cxx:514:27
>     #11 0x7f95caf68998 in sax_fastparser::FastSaxParserImpl::callbackEndElement() /sax/source/fastparser/fastparser.cxx:1331:17
>     #12 0x7f95caf58444 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:338:18
>     #13 0x7f960adebeda in xmlParseEndTag2 /workdir/UnpackedTarball/libxml2/parser.c:10090:2
>     #14 0x7f960ad929b5 in xmlParseTryOrFinish /workdir/UnpackedTarball/libxml2/parser.c:11868:14
>     #15 0x7f960ad86334 in xmlParseChunk /workdir/UnpackedTarball/libxml2/parser.c:12151:5
>     #16 0x7f95caf53231 in sax_fastparser::FastSaxParserImpl::parse() /sax/source/fastparser/fastparser.cxx:1085:21
>     #17 0x7f95caf4cd18 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:890:9
>     #18 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13
>     #19 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15
>     #20 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5
>     #21 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21
>     #22 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12
>     #23 0x7f95441ceaa8 in oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&) /sc/source/filter/oox/workbookhelper.cxx:1046:27
>     #24 0x7f95442797f1 in oox::xls::WorksheetGlobals::finalizeDrawings() /sc/source/filter/oox/worksheethelper.cxx:1373:9
>     #25 0x7f95442789e0 in oox::xls::WorksheetGlobals::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:996:5
>     #26 0x7f954428744d in oox::xls::WorksheetHelper::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:1637:17
>     #27 0x7f95441771de in oox::xls::WorkbookFragment::finalizeImport() /sc/source/filter/oox/workbookfragment.cxx:511:18
>     #28 0x7f95cdd5b3ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5
>     #29 0x7f95caf4cfc2 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:896:36
>     #30 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13
>     #31 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15
>     #32 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5
>     #33 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21
>     #34 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12
>     #35 0x7f95435c4daa in oox::xls::ExcelFilter::importDocument() /sc/source/filter/oox/excelfilter.cxx:113:25
>     #36 0x7f95cdcf953b in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49
>     #37 0x7f95435c7733 in oox::xls::ExcelFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sc/source/filter/oox/excelfilter.cxx:176:25
>     #38 0x7f95857c5b40 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2393:34
>     #39 0x7f9585781c6a in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:761:23
>     #40 0x7f95859a9652 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1980:36
>     #41 0x7f95862145e9 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&) /sfx2/source/view/frmload.cxx:720:28
>     #42 0x7f95536a9900 in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37
>     #43 0x7f95536a091b in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20
>     #44 0x7f9553698f59 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) /framework/source/loadenv/loadenv.cxx:308:5
>     #45 0x7f95536946e7 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&) /framework/source/loadenv/loadenv.cxx:168:14
>     #46 0x7f955376867d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:591:16
>     #47 0x7f95537688a6 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&) /framework/source/services/desktop.cxx
>     #48 0x7f9569f7cafa in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:71:62
>     #49 0x7f9580718c56 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /test/source/unoapi_test.cxx:126:19
>     #50 0x7f9580717ef8 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:108:5
>     #51 0x7f9580719254 in UnoApiTest::loadFromFile(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:132:5
>     #52 0x7f95d8bf1018 in testTdf123647::TestBody() /chart2/qa/extras/chart2export2.cxx:1242:5

(<https://ci.libreoffice.org//job/lo_ubsan/3048/>)

Change-Id: I870d811e78b8c55b84627ae609f98f623465dd9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162294
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Jan 31, 2024
…n assert

so disable the SolarMutex checks during dumpState and restore afterwards

	#8  0x00007fa179e287f3 in abort () at /lib/x86_64-linux-gnu/libc.so.6
	#9  0x00007fa179e2871b in  () at /lib/x86_64-linux-gnu/libc.so.6
	#10 0x00007fa179e39e96 in  () at /lib/x86_64-linux-gnu/libc.so.6
	#11 0x00007fa1706904de in ImplDbgTestSolarMutex() () at libreoffice/vcl/source/app/dbggui.cxx:35
		__PRETTY_FUNCTION__ = "void ImplDbgTestSolarMutex()"
	#12 0x00007fa1782cb713 in DbgTestSolarMutex() () at libreoffice/tools/source/debug/debug.cxx:54
	#13 0x00007fa170559ebb in VirtualDevice::AcquireGraphics() const (this=0x5589006636b0) at libreoffice/vcl/source/gdi/virdev.cxx:49
		pSVData = 0x7fff8a2386d0
	#14 0x00007fa17020d849 in OutputDevice::DrawRect(tools::Rectangle const&) (this=0x5589006636b0, rRect=...) at libreoffice/vcl/source/outdev/rect.cxx:67
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawRect(const tools::Rectangle&)"
		aRect = {static RECT_EMPTY = -32767, mnLeft = 0, mnTop = 0, mnRight = 10244, mnBottom = 269}
	#15 0x00007fa17021d997 in OutputDevice::DrawColorWallpaper(long, long, long, long, Wallpaper const&) (this=0x5589006636b0, nX=0, nY=0, nWidth=10245, nHeight=270, rWallpaper=...) at libreoffice/vcl/source/outdev/wallpaper.cxx:90
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawColorWallpaper(tools::Long, tools::Long, tools::Long, tools::Long, const Wallpaper&)"
		aOldLineColor = {{mValue = 0, {B = 0 '\000', G = 0 '\000', R = 0 '\000', T = 0 '\000'}}}
		aOldFillColor = {{mValue = 16777215, {B = 255 '\377', G = 255 '\377', R = 255 '\377', T = 0 '\000'}}}
		bMap = false
	#16 0x00007fa17021d851 in OutputDevice::DrawWallpaper(long, long, long, long, Wallpaper const&) (this=0x5589006636b0, nX=0, nY=0, nWidth=10245, nHeight=270, rWallpaper=...) at libreoffice/vcl/source/outdev/wallpaper.cxx:73
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawWallpaper(tools::Long, tools::Long, tools::Long, tools::Long, const Wallpaper&)"
	#17 0x00007fa17021daa8 in OutputDevice::Erase() (this=0x5589006636b0) at libreoffice/vcl/source/outdev/wallpaper.cxx:106
		eRasterOp = RasterOp::OverPaint
	#18 0x00007fa17055c716 in VirtualDevice::InnerImplSetOutputSizePixel(Size const&, bool, unsigned char*) (this=0x5589006636b0, rNewSize=..., bErase=true, pBuffer=0x0) at libreoffice/vcl/source/gdi/virdev.cxx:292
		bRet = true
		nNewWidth = 10245
		nNewHeight = 270
		__PRETTY_FUNCTION__ = "bool VirtualDevice::InnerImplSetOutputSizePixel(const Size&, bool, sal_uInt8*)"
	#19 0x00007fa17055cbf5 in VirtualDevice::ImplSetOutputSizePixel(Size const&, bool, unsigned char*) (this=0x5589006636b0, rNewSize=..., bErase=true, pBuffer=0x0) at libreoffice/vcl/source/gdi/virdev.cxx:360
	#20 0x00007fa17055ceba in VirtualDevice::SetOutputSizePixel(Size const&, bool) (this=0x5589006636b0, rNewSize=..., bErase=true) at libreoffice/vcl/source/gdi/virdev.cxx:408
	#21 0x00007fa16fea3ca4 in VirtualDevice::SetOutputSize(Size const&) (this=0x5589006636b0, rNewSize=...) at libreoffice/include/vcl/virdev.hxx:163
	#22 0x00007fa16fe96388 in VclDrawingArea::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fe9ba320, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:3092
		pDevice = {<ScopedVclPtr<VirtualDevice>> = {<VclPtr<VirtualDevice>> = {m_rInnerRef = {m_pBody = 0x5589006636b0}}, <No data fields>}, <No data fields>}
		pRefDevice = 0x5588ff474fd0
		aRenderSize = {<Pair> = {mnA = 10245, mnB = 270}, <No data fields>}
		aOutputSize = {<Pair> = {mnA = 683, mnB = 18}, <No data fields>}
		aRect = {static RECT_EMPTY = -32767, mnLeft = 140735510973440, mnTop = 140331342376707, mnRight = 140735510973456, mnBottom = 94046886702440}
		aImage = {maBitmap = {_vptr.Bitmap = 0x7fff8a238c20, mxSalBmp = std::shared_ptr<class SalBitmap> (empty) = {get() = 0x7fa16fd029cc <std::__uniq_ptr_impl<WindowImpl, std::default_delete<WindowImpl> >::_M_ptr() const+28>}, maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x7fff8a238d60}}, maPrefSize = {<Pair> = {mnA = 94046793857224, mnB = 140331516265348}, <No data fields>}}, maAlphaMask = {_vptr.Bitmap = 0x0, mxSalBmp = std::shared_ptr<class SalBitmap> (use count 1875914999, weak count 32672) = {get() = 0x5588ff46fa98}, maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x7fa16fd030f7 <std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> >::_M_head(std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> > const&)+28>}}, maPrefSize = {<Pair> = {mnA = 94046793857224, mnB = 94046886754968}, <No data fields>}}, maBitmapSize = {<Pair> = {mnA = 140735510973568, mnB = 140331342377207}, <No data fields>}}
		aOStm = {<SvStream> = {_vptr.SvStream = 0x2ab, m_xLockBytes = {pObj = 0x12}, m_nActPos = 140735510973600, m_pRWBuf = std::unique_ptr<unsigned char []> = {get() = 0x7fa16fd03026 <std::__get_helper<0ul, WindowImpl*, std::default_delete<WindowImpl> >(std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> > const&)+28> "\311\303\363\017\036\372UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307", <incomplete sequence \350\265>}, m_pBufPos = 0x7fff8a238cb0 "\340\214#\212\024", m_nBufSize = 64152, m_nBufActualLen = 65350, m_nBufActualPos = 21896, m_nBufFree = 0, m_isIoRead = 192, m_isIoWrite = 140, m_isDirty = 35, m_isSwap = 138, m_isEof = 255, m_nError = {m_value = 1875914499}, m_nCompressMode = (SvStreamCompressFlags::ZBITMAP | unknown: 0x7fa0), m_eLineDelimiter = (unknown: 0x8a238ce0), m_eStreamCharSet = 20, m_aCryptMaskKey = {pData = 0x5588ff46fa98}, m_nCryptMask = 224 '\340', m_nVersion = 16, m_nBufFilePos = 140735510975776, m_eStreamMode = 2317587744, m_isWritable = 255}, nSize = 140735510973776, nResize = 28087389472, nPos = 140735510975776, nEndOfData = 140735510975776, pBuf = 0x7fff8a238d58 " \225#\212\377\177", bOwnsData = 32}
	#23 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fa90, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -12124904
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fe9ba320
		pAccLabelFor = 0x7fff8a238de0
		pAccLabelledBy = 0x68a238db0
	#24 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fa90, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#25 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fd10, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -12221224
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff46fa90
		pAccLabelFor = 0x7fff8a238e58
		pAccLabelledBy = 0x7fff8a238e20
	#26 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff462d60, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = -1
		nTop = -1
		nWidth = 1
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff46fd10
		pAccLabelFor = 0x5588ff458838
		pAccLabelledBy = 0x7fff8a238e90
	#27 0x00007fa16fe8fecd in VclScrolledWindow::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff462d60, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:2184
	#28 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff458830, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -12220472
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff462d60
		pAccLabelFor = 0x7fff8a238fb0
		pAccLabelledBy = 0x68a238f80
	#29 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff458830, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#30 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff4587c0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -18974136
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff458830
		pAccLabelFor = 0x7fff8a239040
		pAccLabelledBy = 0x68a239010
	#31 0x00007fa16fe8becd in VclGrid::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff4587c0, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:1406
	#32 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fede7a40, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -22893640
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff4587c0
		pAccLabelFor = 0x7fff8a2390d0
		pAccLabelledBy = 0x68a2390a0
	#33 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fede7a40, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#34 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fea2abb0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977380544
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fede7a40
		pAccLabelFor = 0x7fff8a239148
		pAccLabelledBy = 0x7fff8a239110
	#35 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588feddd8a0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 0
		nTop = 2049803913
		nWidth = 32673
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fea2abb0
		pAccLabelFor = 0x7fa16fcdc774 <__gnu_debug::_Safe_sequence_base::~_Safe_sequence_base()+28>
		pAccLabelledBy = 0x0
	#36 0x00007fa16ff6e15e in ToolBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588feddd8a0, rJsonWriter=...) at libreoffice/vcl/source/window/toolbox2.cxx:1713
		childrenNode = {mrWriter = @0x7fa16fd6409c}
	#37 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fee04430, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = -1
		nTop = -1
		nWidth = 1
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588feddd8a0
		pAccLabelFor = 0x7fff8a2393c8
		pAccLabelledBy = 0x7fff8a239390
	#38 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff2738a0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977379792
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fee04430
		pAccLabelFor = 0x7fff8a239438
		pAccLabelledBy = 0x7fff8a239400
	#39 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fedbafd0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977379680
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff2738a0
		pAccLabelFor = 0x7fff8a2394a8
		pAccLabelledBy = 0x7fff8a239470
	#40 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fedc2d50, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 21896
		nTop = 2045399353
		nWidth = 32673
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fedbafd0
		pAccLabelFor = 0x7fff8a239520
		pAccLabelledBy = 0x7fff8a2394e0
	#41 0x00007fa170764efa in vcl::lok::dumpState(rtl::OStringBuffer&) (rState=...) at libreoffice/vcl/source/app/svapp.cxx:1868
		props = {mpBuffer = 0x5588ff911780 "{ \"id\": \"\", \"type\": \"borderwindow\", \"text\": \"hello-world.ods - Collabora OfficeDev Calc 23.05 [ebacfb1]\", \"enabled\": true, \"children\": [ { \"id\": \"\", \"type\": \"workwindo"..., mPos = 0x5588ff912c3c "", mSpaceAllocated = 8244, mStartNodeCount = 24, mbFirstFieldInNode = false, static JSON_WRITER_DEBUG_MARKER = 222 '\336'}
		pSVData = 0x7fa171f3aea0 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance>
		pWin = 0x5588fedc2d50
	#42 0x00007fa179b08219 in desktop::LibLibreOffice_Impl::dumpState(rtl::OStringBuffer&) (this=0x5588fa5a7710, rState=...) at libreoffice/desktop/source/lib/init.cxx:5105
	#43 0x00007fa179b08002 in lo_dumpState(LibreOfficeKit*, char const*, char**) (pThis=0x5588fa5a7710, pState=0x7fff8a239630) at libreoffice/desktop/source/lib/init.cxx:5086
		aState = {pData = 0x5588ffa27670, nCapacity = 1048576}
		pLib = 0x5588fa5a7710
		aStr = {pData = 0x5588ff9bfd30}
	#44 0x00005588f9b2e947 in lok::Office::dumpState(char const*, char**) (pState=0x7fff8a239630, pOption=0x5588f9bd5e4d "", this=<optimized out>) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:1149
		pState = 0x0

Change-Id: Icc5910238656566479ea0796c25779866ff8ec7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162794
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Michael Meeks <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Jan 31, 2024
…n assert

so disable the SolarMutex checks during dumpState and restore afterwards

	#8  0x00007fa179e287f3 in abort () at /lib/x86_64-linux-gnu/libc.so.6
	#9  0x00007fa179e2871b in  () at /lib/x86_64-linux-gnu/libc.so.6
	#10 0x00007fa179e39e96 in  () at /lib/x86_64-linux-gnu/libc.so.6
	#11 0x00007fa1706904de in ImplDbgTestSolarMutex() () at libreoffice/vcl/source/app/dbggui.cxx:35
		__PRETTY_FUNCTION__ = "void ImplDbgTestSolarMutex()"
	#12 0x00007fa1782cb713 in DbgTestSolarMutex() () at libreoffice/tools/source/debug/debug.cxx:54
	#13 0x00007fa170559ebb in VirtualDevice::AcquireGraphics() const (this=0x5589006636b0) at libreoffice/vcl/source/gdi/virdev.cxx:49
		pSVData = 0x7fff8a2386d0
	#14 0x00007fa17020d849 in OutputDevice::DrawRect(tools::Rectangle const&) (this=0x5589006636b0, rRect=...) at libreoffice/vcl/source/outdev/rect.cxx:67
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawRect(const tools::Rectangle&)"
		aRect = {static RECT_EMPTY = -32767, mnLeft = 0, mnTop = 0, mnRight = 10244, mnBottom = 269}
	#15 0x00007fa17021d997 in OutputDevice::DrawColorWallpaper(long, long, long, long, Wallpaper const&) (this=0x5589006636b0, nX=0, nY=0, nWidth=10245, nHeight=270, rWallpaper=...) at libreoffice/vcl/source/outdev/wallpaper.cxx:90
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawColorWallpaper(tools::Long, tools::Long, tools::Long, tools::Long, const Wallpaper&)"
		aOldLineColor = {{mValue = 0, {B = 0 '\000', G = 0 '\000', R = 0 '\000', T = 0 '\000'}}}
		aOldFillColor = {{mValue = 16777215, {B = 255 '\377', G = 255 '\377', R = 255 '\377', T = 0 '\000'}}}
		bMap = false
	#16 0x00007fa17021d851 in OutputDevice::DrawWallpaper(long, long, long, long, Wallpaper const&) (this=0x5589006636b0, nX=0, nY=0, nWidth=10245, nHeight=270, rWallpaper=...) at libreoffice/vcl/source/outdev/wallpaper.cxx:73
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawWallpaper(tools::Long, tools::Long, tools::Long, tools::Long, const Wallpaper&)"
	#17 0x00007fa17021daa8 in OutputDevice::Erase() (this=0x5589006636b0) at libreoffice/vcl/source/outdev/wallpaper.cxx:106
		eRasterOp = RasterOp::OverPaint
	#18 0x00007fa17055c716 in VirtualDevice::InnerImplSetOutputSizePixel(Size const&, bool, unsigned char*) (this=0x5589006636b0, rNewSize=..., bErase=true, pBuffer=0x0) at libreoffice/vcl/source/gdi/virdev.cxx:292
		bRet = true
		nNewWidth = 10245
		nNewHeight = 270
		__PRETTY_FUNCTION__ = "bool VirtualDevice::InnerImplSetOutputSizePixel(const Size&, bool, sal_uInt8*)"
	#19 0x00007fa17055cbf5 in VirtualDevice::ImplSetOutputSizePixel(Size const&, bool, unsigned char*) (this=0x5589006636b0, rNewSize=..., bErase=true, pBuffer=0x0) at libreoffice/vcl/source/gdi/virdev.cxx:360
	#20 0x00007fa17055ceba in VirtualDevice::SetOutputSizePixel(Size const&, bool) (this=0x5589006636b0, rNewSize=..., bErase=true) at libreoffice/vcl/source/gdi/virdev.cxx:408
	#21 0x00007fa16fea3ca4 in VirtualDevice::SetOutputSize(Size const&) (this=0x5589006636b0, rNewSize=...) at libreoffice/include/vcl/virdev.hxx:163
	#22 0x00007fa16fe96388 in VclDrawingArea::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fe9ba320, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:3092
		pDevice = {<ScopedVclPtr<VirtualDevice>> = {<VclPtr<VirtualDevice>> = {m_rInnerRef = {m_pBody = 0x5589006636b0}}, <No data fields>}, <No data fields>}
		pRefDevice = 0x5588ff474fd0
		aRenderSize = {<Pair> = {mnA = 10245, mnB = 270}, <No data fields>}
		aOutputSize = {<Pair> = {mnA = 683, mnB = 18}, <No data fields>}
		aRect = {static RECT_EMPTY = -32767, mnLeft = 140735510973440, mnTop = 140331342376707, mnRight = 140735510973456, mnBottom = 94046886702440}
		aImage = {maBitmap = {_vptr.Bitmap = 0x7fff8a238c20, mxSalBmp = std::shared_ptr<class SalBitmap> (empty) = {get() = 0x7fa16fd029cc <std::__uniq_ptr_impl<WindowImpl, std::default_delete<WindowImpl> >::_M_ptr() const+28>}, maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x7fff8a238d60}}, maPrefSize = {<Pair> = {mnA = 94046793857224, mnB = 140331516265348}, <No data fields>}}, maAlphaMask = {_vptr.Bitmap = 0x0, mxSalBmp = std::shared_ptr<class SalBitmap> (use count 1875914999, weak count 32672) = {get() = 0x5588ff46fa98}, maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x7fa16fd030f7 <std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> >::_M_head(std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> > const&)+28>}}, maPrefSize = {<Pair> = {mnA = 94046793857224, mnB = 94046886754968}, <No data fields>}}, maBitmapSize = {<Pair> = {mnA = 140735510973568, mnB = 140331342377207}, <No data fields>}}
		aOStm = {<SvStream> = {_vptr.SvStream = 0x2ab, m_xLockBytes = {pObj = 0x12}, m_nActPos = 140735510973600, m_pRWBuf = std::unique_ptr<unsigned char []> = {get() = 0x7fa16fd03026 <std::__get_helper<0ul, WindowImpl*, std::default_delete<WindowImpl> >(std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> > const&)+28> "\311\303\363\017\036\372UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307", <incomplete sequence \350\265>}, m_pBufPos = 0x7fff8a238cb0 "\340\214#\212\024", m_nBufSize = 64152, m_nBufActualLen = 65350, m_nBufActualPos = 21896, m_nBufFree = 0, m_isIoRead = 192, m_isIoWrite = 140, m_isDirty = 35, m_isSwap = 138, m_isEof = 255, m_nError = {m_value = 1875914499}, m_nCompressMode = (SvStreamCompressFlags::ZBITMAP | unknown: 0x7fa0), m_eLineDelimiter = (unknown: 0x8a238ce0), m_eStreamCharSet = 20, m_aCryptMaskKey = {pData = 0x5588ff46fa98}, m_nCryptMask = 224 '\340', m_nVersion = 16, m_nBufFilePos = 140735510975776, m_eStreamMode = 2317587744, m_isWritable = 255}, nSize = 140735510973776, nResize = 28087389472, nPos = 140735510975776, nEndOfData = 140735510975776, pBuf = 0x7fff8a238d58 " \225#\212\377\177", bOwnsData = 32}
	#23 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fa90, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -12124904
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fe9ba320
		pAccLabelFor = 0x7fff8a238de0
		pAccLabelledBy = 0x68a238db0
	#24 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fa90, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#25 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fd10, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -12221224
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff46fa90
		pAccLabelFor = 0x7fff8a238e58
		pAccLabelledBy = 0x7fff8a238e20
	#26 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff462d60, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = -1
		nTop = -1
		nWidth = 1
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff46fd10
		pAccLabelFor = 0x5588ff458838
		pAccLabelledBy = 0x7fff8a238e90
	#27 0x00007fa16fe8fecd in VclScrolledWindow::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff462d60, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:2184
	#28 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff458830, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -12220472
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff462d60
		pAccLabelFor = 0x7fff8a238fb0
		pAccLabelledBy = 0x68a238f80
	#29 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff458830, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#30 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff4587c0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -18974136
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff458830
		pAccLabelFor = 0x7fff8a239040
		pAccLabelledBy = 0x68a239010
	#31 0x00007fa16fe8becd in VclGrid::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff4587c0, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:1406
	#32 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fede7a40, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -22893640
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff4587c0
		pAccLabelFor = 0x7fff8a2390d0
		pAccLabelledBy = 0x68a2390a0
	#33 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fede7a40, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#34 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fea2abb0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977380544
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fede7a40
		pAccLabelFor = 0x7fff8a239148
		pAccLabelledBy = 0x7fff8a239110
	#35 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588feddd8a0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 0
		nTop = 2049803913
		nWidth = 32673
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fea2abb0
		pAccLabelFor = 0x7fa16fcdc774 <__gnu_debug::_Safe_sequence_base::~_Safe_sequence_base()+28>
		pAccLabelledBy = 0x0
	#36 0x00007fa16ff6e15e in ToolBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588feddd8a0, rJsonWriter=...) at libreoffice/vcl/source/window/toolbox2.cxx:1713
		childrenNode = {mrWriter = @0x7fa16fd6409c}
	#37 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fee04430, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = -1
		nTop = -1
		nWidth = 1
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588feddd8a0
		pAccLabelFor = 0x7fff8a2393c8
		pAccLabelledBy = 0x7fff8a239390
	#38 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff2738a0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977379792
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fee04430
		pAccLabelFor = 0x7fff8a239438
		pAccLabelledBy = 0x7fff8a239400
	#39 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fedbafd0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977379680
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff2738a0
		pAccLabelFor = 0x7fff8a2394a8
		pAccLabelledBy = 0x7fff8a239470
	#40 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fedc2d50, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 21896
		nTop = 2045399353
		nWidth = 32673
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fedbafd0
		pAccLabelFor = 0x7fff8a239520
		pAccLabelledBy = 0x7fff8a2394e0
	#41 0x00007fa170764efa in vcl::lok::dumpState(rtl::OStringBuffer&) (rState=...) at libreoffice/vcl/source/app/svapp.cxx:1868
		props = {mpBuffer = 0x5588ff911780 "{ \"id\": \"\", \"type\": \"borderwindow\", \"text\": \"hello-world.ods - Collabora OfficeDev Calc 23.05 [ebacfb1]\", \"enabled\": true, \"children\": [ { \"id\": \"\", \"type\": \"workwindo"..., mPos = 0x5588ff912c3c "", mSpaceAllocated = 8244, mStartNodeCount = 24, mbFirstFieldInNode = false, static JSON_WRITER_DEBUG_MARKER = 222 '\336'}
		pSVData = 0x7fa171f3aea0 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance>
		pWin = 0x5588fedc2d50
	#42 0x00007fa179b08219 in desktop::LibLibreOffice_Impl::dumpState(rtl::OStringBuffer&) (this=0x5588fa5a7710, rState=...) at libreoffice/desktop/source/lib/init.cxx:5105
	#43 0x00007fa179b08002 in lo_dumpState(LibreOfficeKit*, char const*, char**) (pThis=0x5588fa5a7710, pState=0x7fff8a239630) at libreoffice/desktop/source/lib/init.cxx:5086
		aState = {pData = 0x5588ffa27670, nCapacity = 1048576}
		pLib = 0x5588fa5a7710
		aStr = {pData = 0x5588ff9bfd30}
	#44 0x00005588f9b2e947 in lok::Office::dumpState(char const*, char**) (pState=0x7fff8a239630, pOption=0x5588f9bd5e4d "", this=<optimized out>) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:1149
		pState = 0x0

Change-Id: Icc5910238656566479ea0796c25779866ff8ec7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162794
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Michael Meeks <[email protected]>
(cherry picked from commit f4fa41c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162815
Reviewed-by: Caolán McNamara <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Jan 31, 2024
…n assert

so disable the SolarMutex checks during dumpState and restore afterwards

	#8  0x00007fa179e287f3 in abort () at /lib/x86_64-linux-gnu/libc.so.6
	#9  0x00007fa179e2871b in  () at /lib/x86_64-linux-gnu/libc.so.6
	#10 0x00007fa179e39e96 in  () at /lib/x86_64-linux-gnu/libc.so.6
	#11 0x00007fa1706904de in ImplDbgTestSolarMutex() () at libreoffice/vcl/source/app/dbggui.cxx:35
		__PRETTY_FUNCTION__ = "void ImplDbgTestSolarMutex()"
	#12 0x00007fa1782cb713 in DbgTestSolarMutex() () at libreoffice/tools/source/debug/debug.cxx:54
	#13 0x00007fa170559ebb in VirtualDevice::AcquireGraphics() const (this=0x5589006636b0) at libreoffice/vcl/source/gdi/virdev.cxx:49
		pSVData = 0x7fff8a2386d0
	#14 0x00007fa17020d849 in OutputDevice::DrawRect(tools::Rectangle const&) (this=0x5589006636b0, rRect=...) at libreoffice/vcl/source/outdev/rect.cxx:67
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawRect(const tools::Rectangle&)"
		aRect = {static RECT_EMPTY = -32767, mnLeft = 0, mnTop = 0, mnRight = 10244, mnBottom = 269}
	#15 0x00007fa17021d997 in OutputDevice::DrawColorWallpaper(long, long, long, long, Wallpaper const&) (this=0x5589006636b0, nX=0, nY=0, nWidth=10245, nHeight=270, rWallpaper=...) at libreoffice/vcl/source/outdev/wallpaper.cxx:90
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawColorWallpaper(tools::Long, tools::Long, tools::Long, tools::Long, const Wallpaper&)"
		aOldLineColor = {{mValue = 0, {B = 0 '\000', G = 0 '\000', R = 0 '\000', T = 0 '\000'}}}
		aOldFillColor = {{mValue = 16777215, {B = 255 '\377', G = 255 '\377', R = 255 '\377', T = 0 '\000'}}}
		bMap = false
	#16 0x00007fa17021d851 in OutputDevice::DrawWallpaper(long, long, long, long, Wallpaper const&) (this=0x5589006636b0, nX=0, nY=0, nWidth=10245, nHeight=270, rWallpaper=...) at libreoffice/vcl/source/outdev/wallpaper.cxx:73
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawWallpaper(tools::Long, tools::Long, tools::Long, tools::Long, const Wallpaper&)"
	#17 0x00007fa17021daa8 in OutputDevice::Erase() (this=0x5589006636b0) at libreoffice/vcl/source/outdev/wallpaper.cxx:106
		eRasterOp = RasterOp::OverPaint
	#18 0x00007fa17055c716 in VirtualDevice::InnerImplSetOutputSizePixel(Size const&, bool, unsigned char*) (this=0x5589006636b0, rNewSize=..., bErase=true, pBuffer=0x0) at libreoffice/vcl/source/gdi/virdev.cxx:292
		bRet = true
		nNewWidth = 10245
		nNewHeight = 270
		__PRETTY_FUNCTION__ = "bool VirtualDevice::InnerImplSetOutputSizePixel(const Size&, bool, sal_uInt8*)"
	#19 0x00007fa17055cbf5 in VirtualDevice::ImplSetOutputSizePixel(Size const&, bool, unsigned char*) (this=0x5589006636b0, rNewSize=..., bErase=true, pBuffer=0x0) at libreoffice/vcl/source/gdi/virdev.cxx:360
	#20 0x00007fa17055ceba in VirtualDevice::SetOutputSizePixel(Size const&, bool) (this=0x5589006636b0, rNewSize=..., bErase=true) at libreoffice/vcl/source/gdi/virdev.cxx:408
	#21 0x00007fa16fea3ca4 in VirtualDevice::SetOutputSize(Size const&) (this=0x5589006636b0, rNewSize=...) at libreoffice/include/vcl/virdev.hxx:163
	#22 0x00007fa16fe96388 in VclDrawingArea::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fe9ba320, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:3092
		pDevice = {<ScopedVclPtr<VirtualDevice>> = {<VclPtr<VirtualDevice>> = {m_rInnerRef = {m_pBody = 0x5589006636b0}}, <No data fields>}, <No data fields>}
		pRefDevice = 0x5588ff474fd0
		aRenderSize = {<Pair> = {mnA = 10245, mnB = 270}, <No data fields>}
		aOutputSize = {<Pair> = {mnA = 683, mnB = 18}, <No data fields>}
		aRect = {static RECT_EMPTY = -32767, mnLeft = 140735510973440, mnTop = 140331342376707, mnRight = 140735510973456, mnBottom = 94046886702440}
		aImage = {maBitmap = {_vptr.Bitmap = 0x7fff8a238c20, mxSalBmp = std::shared_ptr<class SalBitmap> (empty) = {get() = 0x7fa16fd029cc <std::__uniq_ptr_impl<WindowImpl, std::default_delete<WindowImpl> >::_M_ptr() const+28>}, maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x7fff8a238d60}}, maPrefSize = {<Pair> = {mnA = 94046793857224, mnB = 140331516265348}, <No data fields>}}, maAlphaMask = {_vptr.Bitmap = 0x0, mxSalBmp = std::shared_ptr<class SalBitmap> (use count 1875914999, weak count 32672) = {get() = 0x5588ff46fa98}, maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x7fa16fd030f7 <std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> >::_M_head(std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> > const&)+28>}}, maPrefSize = {<Pair> = {mnA = 94046793857224, mnB = 94046886754968}, <No data fields>}}, maBitmapSize = {<Pair> = {mnA = 140735510973568, mnB = 140331342377207}, <No data fields>}}
		aOStm = {<SvStream> = {_vptr.SvStream = 0x2ab, m_xLockBytes = {pObj = 0x12}, m_nActPos = 140735510973600, m_pRWBuf = std::unique_ptr<unsigned char []> = {get() = 0x7fa16fd03026 <std::__get_helper<0ul, WindowImpl*, std::default_delete<WindowImpl> >(std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> > const&)+28> "\311\303\363\017\036\372UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307", <incomplete sequence \350\265>}, m_pBufPos = 0x7fff8a238cb0 "\340\214#\212\024", m_nBufSize = 64152, m_nBufActualLen = 65350, m_nBufActualPos = 21896, m_nBufFree = 0, m_isIoRead = 192, m_isIoWrite = 140, m_isDirty = 35, m_isSwap = 138, m_isEof = 255, m_nError = {m_value = 1875914499}, m_nCompressMode = (SvStreamCompressFlags::ZBITMAP | unknown: 0x7fa0), m_eLineDelimiter = (unknown: 0x8a238ce0), m_eStreamCharSet = 20, m_aCryptMaskKey = {pData = 0x5588ff46fa98}, m_nCryptMask = 224 '\340', m_nVersion = 16, m_nBufFilePos = 140735510975776, m_eStreamMode = 2317587744, m_isWritable = 255}, nSize = 140735510973776, nResize = 28087389472, nPos = 140735510975776, nEndOfData = 140735510975776, pBuf = 0x7fff8a238d58 " \225#\212\377\177", bOwnsData = 32}
	#23 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fa90, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -12124904
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fe9ba320
		pAccLabelFor = 0x7fff8a238de0
		pAccLabelledBy = 0x68a238db0
	#24 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fa90, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#25 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fd10, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -12221224
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff46fa90
		pAccLabelFor = 0x7fff8a238e58
		pAccLabelledBy = 0x7fff8a238e20
	#26 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff462d60, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = -1
		nTop = -1
		nWidth = 1
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff46fd10
		pAccLabelFor = 0x5588ff458838
		pAccLabelledBy = 0x7fff8a238e90
	#27 0x00007fa16fe8fecd in VclScrolledWindow::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff462d60, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:2184
	#28 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff458830, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -12220472
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff462d60
		pAccLabelFor = 0x7fff8a238fb0
		pAccLabelledBy = 0x68a238f80
	#29 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff458830, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#30 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff4587c0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -18974136
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff458830
		pAccLabelFor = 0x7fff8a239040
		pAccLabelledBy = 0x68a239010
	#31 0x00007fa16fe8becd in VclGrid::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff4587c0, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:1406
	#32 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fede7a40, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -22893640
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff4587c0
		pAccLabelFor = 0x7fff8a2390d0
		pAccLabelledBy = 0x68a2390a0
	#33 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fede7a40, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#34 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fea2abb0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977380544
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fede7a40
		pAccLabelFor = 0x7fff8a239148
		pAccLabelledBy = 0x7fff8a239110
	#35 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588feddd8a0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 0
		nTop = 2049803913
		nWidth = 32673
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fea2abb0
		pAccLabelFor = 0x7fa16fcdc774 <__gnu_debug::_Safe_sequence_base::~_Safe_sequence_base()+28>
		pAccLabelledBy = 0x0
	#36 0x00007fa16ff6e15e in ToolBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588feddd8a0, rJsonWriter=...) at libreoffice/vcl/source/window/toolbox2.cxx:1713
		childrenNode = {mrWriter = @0x7fa16fd6409c}
	#37 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fee04430, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = -1
		nTop = -1
		nWidth = 1
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588feddd8a0
		pAccLabelFor = 0x7fff8a2393c8
		pAccLabelledBy = 0x7fff8a239390
	#38 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff2738a0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977379792
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fee04430
		pAccLabelFor = 0x7fff8a239438
		pAccLabelledBy = 0x7fff8a239400
	#39 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fedbafd0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977379680
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff2738a0
		pAccLabelFor = 0x7fff8a2394a8
		pAccLabelledBy = 0x7fff8a239470
	#40 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fedc2d50, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 21896
		nTop = 2045399353
		nWidth = 32673
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fedbafd0
		pAccLabelFor = 0x7fff8a239520
		pAccLabelledBy = 0x7fff8a2394e0
	#41 0x00007fa170764efa in vcl::lok::dumpState(rtl::OStringBuffer&) (rState=...) at libreoffice/vcl/source/app/svapp.cxx:1868
		props = {mpBuffer = 0x5588ff911780 "{ \"id\": \"\", \"type\": \"borderwindow\", \"text\": \"hello-world.ods - Collabora OfficeDev Calc 23.05 [ebacfb1]\", \"enabled\": true, \"children\": [ { \"id\": \"\", \"type\": \"workwindo"..., mPos = 0x5588ff912c3c "", mSpaceAllocated = 8244, mStartNodeCount = 24, mbFirstFieldInNode = false, static JSON_WRITER_DEBUG_MARKER = 222 '\336'}
		pSVData = 0x7fa171f3aea0 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance>
		pWin = 0x5588fedc2d50
	#42 0x00007fa179b08219 in desktop::LibLibreOffice_Impl::dumpState(rtl::OStringBuffer&) (this=0x5588fa5a7710, rState=...) at libreoffice/desktop/source/lib/init.cxx:5105
	#43 0x00007fa179b08002 in lo_dumpState(LibreOfficeKit*, char const*, char**) (pThis=0x5588fa5a7710, pState=0x7fff8a239630) at libreoffice/desktop/source/lib/init.cxx:5086
		aState = {pData = 0x5588ffa27670, nCapacity = 1048576}
		pLib = 0x5588fa5a7710
		aStr = {pData = 0x5588ff9bfd30}
	#44 0x00005588f9b2e947 in lok::Office::dumpState(char const*, char**) (pState=0x7fff8a239630, pOption=0x5588f9bd5e4d "", this=<optimized out>) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:1149
		pState = 0x0

Change-Id: Icc5910238656566479ea0796c25779866ff8ec7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162794
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Michael Meeks <[email protected]>
(cherry picked from commit f4fa41c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162816
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Feb 10, 2024
In `SwTransferable::RemoveDDELinkFormat`, only update the
clipboard content with this `SwTransferable` after removing
the `SotClipboardFormatId::LINK` from the supported formats
if the `SwTransferable` was the clipboard content before
already.

Doing so always would unrelatedly overwrite what was previously
copied from another application to the clipboard for the
tdf#158947 scenario of pasting clipboard content of another
application over a selection when using the Qt-based VCL plugins
on Wayland (s. backtrace below that shows how the clipboard content
was overwritten, frame #17 is the method changed in this
commit).

My assumption why the clipboard content is explicitly overwritten
at all is to make sure that the system clipboard on some platforms
gets notified about the change in supported formats/mime
types after removing one. But that isn't necessary when the
transfer data modified here aren't the current clipboard content
in the first place.

Backtrace for how clipboard content was previously overwritten
for the tdf#158947 scenario with the qt6 VCL plugin on Wayland:

    ~"#0  QtClipboard::handleChanged(QClipboard::Mode) (this=0x557f90457770, aMode=QClipboard::Clipboard) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:156\n"
    ~"#1  0x00007f26f08844ff in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}::operator()() const (__closure=0x7ffe889a2c20) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:153\n"
    ~"#2  0x00007f26f0884ffb in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}&&) (args=0x7ffe889a2ed0, fn=...) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:72\n"
    ~"#3  0x00007f26f088456f in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e <QtClipboard::handleChanged(QClipboard::Mode)>, o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:152\n"
    ~"#4  0x00007f26f08833de in QtPrivate::FunctionPointer<void (QtClipboard::*)(QClipboard::Mode)>::call<QtPrivate::List<QClipboard::Mode>, void>(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e <QtClipboard::handleChanged(QClipboard::Mode)>, o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:200\n"
    ~"#5  0x00007f26f0881f71 in QtPrivate::QCallableObject<void (QtClipboard::*)(QClipboard::Mode), QtPrivate::List<QClipboard::Mode>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0, ret=0x0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:571\n"
    ~"#6  0x00007f26efdb863f in QtPrivate::QSlotObjectBase::call(QObject*, void**) (this=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:487\n"
    ~"#7  0x00007f26efe5772e in doActivate<false>(QObject*, int, void**) (sender=0x557f8d510fd0, signal_index=3, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4116\n"
    ~"#8  0x00007f26efe4cdef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0x557f8d510fd0, m=0x7f26efa47cc0 <QClipboard::staticMetaObject>, local_signal_index=0, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4176\n"
    ~"#9  0x00007f26eede9fcc in QClipboard::changed(QClipboard::Mode) (this=0x557f8d510fd0, _t1=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/Gui_autogen/include/moc_qclipboard.cpp:182\n"
    ~"#10 0x00007f26eede9bc1 in QClipboard::emitChanged(QClipboard::Mode) (this=0x557f8d510fd0, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:558\n"
    ~"#11 0x00007f26eee4ed69 in QPlatformClipboard::emitChanged(QClipboard::Mode) (this=0x557f88019c20, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qplatformclipboard.cpp:89\n"
    ~"#12 0x00007f26ed78809e in QtWaylandClient::QWaylandClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f88019c20, data=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtwayland/src/client/qwaylandclipboard.cpp:89\n"
    ~"#13 0x00007f26eede99de in QClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f8d510fd0, src=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:447\n"
    ~"#14 0x00007f26f087a5b5 in QtClipboard::setContents(com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> const&, com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboardOwner> const&) (this=0x557f8d50cbb0, xTrans=uno::Reference to (SwTransferable *) 0x557f90440118, xClipboardOwner=uno::Reference to (SwTransferable *) 0x557f90440120) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:137\n"
    ~"#15 0x00007f26fb05bacc in TransferableHelper::CopyToClipboard(com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard> const&) const (this=0x557f904400f0, rClipboard=uno::Reference to (QtClipboard *) 0x557f8d50cc10) at .../libreoffice/vcl/source/treelist/transfer.cxx:942\n"
    ~"#16 0x00007f26fb05bc77 in TransferableHelper::CopyToClipboard(vcl::Window*) const (this=0x557f904400f0, pWindow=0x557f8932d1f0) at .../libreoffice/vcl/source/treelist/transfer.cxx:957\n"
    ~"#17 0x00007f26b5130940 in SwTransferable::RemoveDDELinkFormat(vcl::Window&) (this=0x557f904400f0, rWin=...) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:385\n"
    ~"#18 0x00007f26b51440ab in SwTransferDdeLink::DataChanged(rtl::OUString const&, com::sun::star::uno::Any const&) (this=0x557f8fb864e0) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:4447\n"
    ~"#19 0x00007f270120fa0e in sfx2::SvLinkSource::NotifyDataChanged() (this=0x557f8fb8bbe0) at .../libreoffice/sfx2/source/appl/linksrc.cxx:291\n"
    ~"#20 0x00007f26b43210ba in SwServerObject::SendDataChanged(SwPaM const&) (this=0x557f8fb8bbe0, rRange=SwPaM = {...}) at .../libreoffice/sw/source/core/doc/swserv.cxx:177\n"
    ~"#21 0x00007f26b43217c2 in SwDataChanged::~SwDataChanged() (this=0x7ffe889a3520, __in_chrg=<optimized out>) at .../libreoffice/sw/source/core/doc/swserv.cxx:308\n"
    ~"#22 0x00007f26b4233c8b in sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4474\n"
    ~"#23 0x00007f26b4233826 in sw::DocumentContentOperationsManager::DeleteRangeImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4419\n"
    ~"#24 0x00007f26b4233681 in sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4391\n"
    ~"#25 0x00007f26b421edb7 in (anonymous namespace)::lcl_DoWithBreaks(sw::DocumentContentOperationsManager&, SwPaM&, SwDeleteFlags, bool (sw::DocumentContentOperationsManager::*)(sw::DocumentContentOperationsManager* const, SwPaM&, SwDeleteFlags)) (rDocumentContentOperations=..., rPam=SwPaM = {...}, flags=SwDeleteFlags::Default, pFunc=(bool (sw::DocumentContentOperationsManager::*)(sw::DocumentContentOperationsManager * const, SwPaM &, SwDeleteFlags)) 0x7f26b4233632 <sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags)>) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:681\n"
    ~"#26 0x00007f26b42279df in sw::DocumentContentOperationsManager::DeleteAndJoin(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:2367\n"
    ~"#27 0x00007f26b44a71f6 in SwEditShell::DeleteSel(SwPaM&, bool, bool, bool*) (this=0x557f8d51b300, rPam=SwPaM = {...}, isArtificialSelection=false, goLeft=false, pUndo=0x7ffe889a3be6) at .../libreoffice/sw/source/core/edit/eddel.cxx:122\n"
    ~"#28 0x00007f26b44a7671 in SwEditShell::Delete(bool, bool) (this=0x557f8d51b300, isArtificialSelection=false, goLeft=false) at .../libreoffice/sw/source/core/edit/eddel.cxx:164\n"
    ~"#29 0x00007f26b5604933 in SwWrtShell::DelRight(bool) (this=0x557f8d51b300, isReplaceHeuristic=false) at .../libreoffice/sw/source/uibase/wrtsh/delete.cxx:312\n"
    ~"#30 0x00007f26b512fe14 in (anonymous namespace)::SwTrnsfrActionAndUndo::SwTrnsfrActionAndUndo(SwWrtShell*, bool, SwPasteContext*) (this=0x557f9045b020, pS=0x557f8d51b300, bDelSel=true, pContext=0x7ffe889a4220) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:236\n"
    ~"#31 0x00007f26b51377c1 in SwTransferable::PasteData(TransferableDataHelper const&, SwWrtShell&, unsigned char, SotExchangeActionFlags, SotClipboardFormatId, SotExchangeDest, bool, bool, Point const*, signed char, bool, RndStdIds, bool, SwPasteContext*, PasteTableType) (rData=..., rSh=..., nAction=36 '$', nActionFlags=(SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl), nFormat=SotClipboardFormatId::HTML, nDestination=SotExchangeDest::SWDOC_FREE_AREA, bIsPasteFormat=false, bIsDefault=false, pPt=0x0, nDropAction=0 '\\000', bPasteSelection=false, nAnchorType=RndStdIds::FLY_AT_PARA, bIgnoreComments=false, pContext=0x7ffe889a4220, ePasteTable=PasteTableType::PASTE_DEFAULT) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:1768\n"
    ~"#32 0x00007f26b5137333 in SwTransferable::Paste(SwWrtShell&, TransferableDataHelper&, RndStdIds, bool, PasteTableType) (rSh=..., rData=..., nAnchorType=RndStdIds::FLY_AT_PARA, bIgnoreComments=false, ePasteTable=PasteTableType::PASTE_DEFAULT) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:1687\n"
    ~"#33 0x00007f26b52d29e9 in SwBaseShell::ExecClpbrd(SfxRequest&) (this=0x557f8db64330, rReq=...) at .../libreoffice/sw/source/uibase/shells/basesh.cxx:365\n"
    ~"#34 0x00007f26b52d1681 in SfxStubSwBaseShellExecClpbrd(SfxShell*, SfxRequest&) (pShell=0x557f8db64330, rReq=...) at .../libreoffice/workdir/SdiTarget/sw/sdi/swslots.hxx:2219\n"
    ~"#35 0x00007f27012d14dc in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x557f8d4f46b0, rShell=..., rSlot=..., rReq=..., bRecord=true) at .../libreoffice/sfx2/source/control/dispatch.cxx:254\n"
    ~"#36 0x00007f27012d4b34 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) (this=0x557f8d4f46b0, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at .../libreoffice/sfx2/source/control/dispatch.cxx:753\n"
    ~"#37 0x00007f27012c05d4 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) (this=0x557f8d503240, aReq=..., pSlot=0x7f26b6cf5360 <aSwBaseShellSlots_Impl+1440>, pShell=0x557f8db64330) at .../libreoffice/sfx2/source/control/bindings.cxx:1057\n"
    ~"#38 0x00007f270139813d in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) (this=0x557f8db682a0, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at .../libreoffice/sfx2/source/control/unoctitm.cxx:688\n"
    ~"#39 0x00007f2701395dbf in SfxOfficeDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x557f8db68200, aURL=..., aArgs=empty uno::Sequence) at .../libreoffice/sfx2/source/control/unoctitm.cxx:250\n"
    ~"#40 0x00007f26fe03d948 in svt::(anonymous namespace)::AsyncAccelExec::impl_ts_asyncCallback(LinkParamNone*) (this=0x557f8fb8e070) at .../libreoffice/svtools/source/misc/acceleratorexecute.cxx:508\n"
    ~"#41 0x00007f26fe03d869 in svt::(anonymous namespace)::AsyncAccelExec::LinkStubimpl_ts_asyncCallback(void*, LinkParamNone*) (instance=0x557f8fb8e070, data=0x0) at .../libreoffice/svtools/source/misc/acceleratorexecute.cxx:500\n"
    ~"#42 0x00007f26fab0db3b in Link<LinkParamNone*, void>::Call(LinkParamNone*) const (this=0x557f8fb8e110, data=0x0) at .../libreoffice/include/tools/link.hxx:111\n"
    ~"#43 0x00007f26fb469f3d in vcl::EventPoster::DoEvent_Impl(void*) (this=0x557f8fb8e108) at .../libreoffice/vcl/source/helper/evntpost.cxx:52\n"
    ~"#44 0x00007f26fb469f05 in vcl::EventPoster::LinkStubDoEvent_Impl(void*, void*) (instance=0x557f8fb8e108, data=0x0) at .../libreoffice/vcl/source/helper/evntpost.cxx:48\n"
    ~"#45 0x00007f26fadc2373 in Link<void*, void>::Call(void*) const (this=0x7f26e80153b8, data=0x0) at .../libreoffice/include/tools/link.hxx:111\n"
    ~"#46 0x00007f26fadbf458 in ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x7f26e80153b0) at .../libreoffice/vcl/source/window/winproc.cxx:2287\n"
    ~"#47 0x00007f26fadc1385 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x557f897d0e90, nEvent=SalEvent::UserEvent, pEvent=0x7f26e80153b0) at .../libreoffice/vcl/source/window/winproc.cxx:2851\n"
    ~"#48 0x00007f26f08b6bae in SalFrame::CallCallback(SalEvent, void const*) const (this=0x557f8800cf80, nEvent=SalEvent::UserEvent, pEvent=0x7f26e80153b0) at .../libreoffice/vcl/inc/salframe.hxx:310\n"
    ~"#49 0x00007f26f08d9dbf in QtInstance::ProcessEvent(SalUserEventList::SalUserEvent) (this=0x557f88020780, aEvent=...) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:516\n"
    ~"#50 0x00007f26fb47b97f in operator()() const (__closure=0x7ffe889a50e0) at .../libreoffice/vcl/source/app/salusereventlist.cxx:119\n"
    ~"#51 0x00007f26fb47bc53 in SalUserEventList::DispatchUserEvents(bool) (this=0x557f880207b8, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120\n"
    ~"#52 0x00007f26f08d98a4 in QtInstance::ImplYield(bool, bool) (this=0x557f88020780, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:442\n"
    ~"#53 0x00007f26f08d9a4f in QtInstance::DoYield(bool, bool) (this=0x557f88020780, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:464\n"
    ~"#54 0x00007f26fb5390d0 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:390\n"
    ~"#55 0x00007f26fb539e6e in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:474\n"
    ~"#56 0x00007f26fb538dc3 in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:368\n"
    ~"#57 0x00007f2704e371b6 in desktop::Desktop::Main() (this=0x7ffe889a5c10) at .../libreoffice/desktop/source/app/app.cxx:1614\n"
    ~"#58 0x00007f26fb558292 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:229\n"
    ~"#59 0x00007f26fb5585a7 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:261\n"
    ~"#60 0x00007f2704ea4307 in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:94\n"
    ~"#61 0x0000557f862d19d4 in sal_main () at .../libreoffice/desktop/source/app/main.c:51\n"
    ~"#62 0x0000557f862d19ba in main (argc=3, argv=0x7ffe889a5e38) at .../libreoffice/desktop/source/app/main.c:49\n"
    2906^done
    (gdb)

Change-Id: I1f517d441eeb3e77e969062b884d9a425038b22a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163202
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Feb 12, 2024
In `SwTransferable::RemoveDDELinkFormat`, only update the
clipboard content with this `SwTransferable` after removing
the `SotClipboardFormatId::LINK` from the supported formats
if the `SwTransferable` was the clipboard content before
already.

Doing so always would unrelatedly overwrite what was previously
copied from another application to the clipboard for the
tdf#158947 scenario of pasting clipboard content of another
application over a selection when using the Qt-based VCL plugins
on Wayland (s. backtrace below that shows how the clipboard content
was overwritten, frame #17 is the method changed in this
commit).

My assumption why the clipboard content is explicitly overwritten
at all is to make sure that the system clipboard on some platforms
gets notified about the change in supported formats/mime
types after removing one. But that isn't necessary when the
transfer data modified here aren't the current clipboard content
in the first place.

Backtrace for how clipboard content was previously overwritten
for the tdf#158947 scenario with the qt6 VCL plugin on Wayland:

    ~"#0  QtClipboard::handleChanged(QClipboard::Mode) (this=0x557f90457770, aMode=QClipboard::Clipboard) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:156\n"
    ~"#1  0x00007f26f08844ff in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}::operator()() const (__closure=0x7ffe889a2c20) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:153\n"
    ~"#2  0x00007f26f0884ffb in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}&&) (args=0x7ffe889a2ed0, fn=...) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:72\n"
    ~"#3  0x00007f26f088456f in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e <QtClipboard::handleChanged(QClipboard::Mode)>, o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:152\n"
    ~"#4  0x00007f26f08833de in QtPrivate::FunctionPointer<void (QtClipboard::*)(QClipboard::Mode)>::call<QtPrivate::List<QClipboard::Mode>, void>(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e <QtClipboard::handleChanged(QClipboard::Mode)>, o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:200\n"
    ~"#5  0x00007f26f0881f71 in QtPrivate::QCallableObject<void (QtClipboard::*)(QClipboard::Mode), QtPrivate::List<QClipboard::Mode>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0, ret=0x0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:571\n"
    ~"#6  0x00007f26efdb863f in QtPrivate::QSlotObjectBase::call(QObject*, void**) (this=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:487\n"
    ~"#7  0x00007f26efe5772e in doActivate<false>(QObject*, int, void**) (sender=0x557f8d510fd0, signal_index=3, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4116\n"
    ~"#8  0x00007f26efe4cdef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0x557f8d510fd0, m=0x7f26efa47cc0 <QClipboard::staticMetaObject>, local_signal_index=0, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4176\n"
    ~"#9  0x00007f26eede9fcc in QClipboard::changed(QClipboard::Mode) (this=0x557f8d510fd0, _t1=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/Gui_autogen/include/moc_qclipboard.cpp:182\n"
    ~"#10 0x00007f26eede9bc1 in QClipboard::emitChanged(QClipboard::Mode) (this=0x557f8d510fd0, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:558\n"
    ~"#11 0x00007f26eee4ed69 in QPlatformClipboard::emitChanged(QClipboard::Mode) (this=0x557f88019c20, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qplatformclipboard.cpp:89\n"
    ~"#12 0x00007f26ed78809e in QtWaylandClient::QWaylandClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f88019c20, data=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtwayland/src/client/qwaylandclipboard.cpp:89\n"
    ~"#13 0x00007f26eede99de in QClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f8d510fd0, src=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:447\n"
    ~"#14 0x00007f26f087a5b5 in QtClipboard::setContents(com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> const&, com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboardOwner> const&) (this=0x557f8d50cbb0, xTrans=uno::Reference to (SwTransferable *) 0x557f90440118, xClipboardOwner=uno::Reference to (SwTransferable *) 0x557f90440120) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:137\n"
    ~"#15 0x00007f26fb05bacc in TransferableHelper::CopyToClipboard(com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard> const&) const (this=0x557f904400f0, rClipboard=uno::Reference to (QtClipboard *) 0x557f8d50cc10) at .../libreoffice/vcl/source/treelist/transfer.cxx:942\n"
    ~"#16 0x00007f26fb05bc77 in TransferableHelper::CopyToClipboard(vcl::Window*) const (this=0x557f904400f0, pWindow=0x557f8932d1f0) at .../libreoffice/vcl/source/treelist/transfer.cxx:957\n"
    ~"#17 0x00007f26b5130940 in SwTransferable::RemoveDDELinkFormat(vcl::Window&) (this=0x557f904400f0, rWin=...) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:385\n"
    ~"#18 0x00007f26b51440ab in SwTransferDdeLink::DataChanged(rtl::OUString const&, com::sun::star::uno::Any const&) (this=0x557f8fb864e0) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:4447\n"
    ~"#19 0x00007f270120fa0e in sfx2::SvLinkSource::NotifyDataChanged() (this=0x557f8fb8bbe0) at .../libreoffice/sfx2/source/appl/linksrc.cxx:291\n"
    ~"#20 0x00007f26b43210ba in SwServerObject::SendDataChanged(SwPaM const&) (this=0x557f8fb8bbe0, rRange=SwPaM = {...}) at .../libreoffice/sw/source/core/doc/swserv.cxx:177\n"
    ~"#21 0x00007f26b43217c2 in SwDataChanged::~SwDataChanged() (this=0x7ffe889a3520, __in_chrg=<optimized out>) at .../libreoffice/sw/source/core/doc/swserv.cxx:308\n"
    ~"#22 0x00007f26b4233c8b in sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4474\n"
    ~"#23 0x00007f26b4233826 in sw::DocumentContentOperationsManager::DeleteRangeImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4419\n"
    ~"#24 0x00007f26b4233681 in sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4391\n"
    ~"#25 0x00007f26b421edb7 in (anonymous namespace)::lcl_DoWithBreaks(sw::DocumentContentOperationsManager&, SwPaM&, SwDeleteFlags, bool (sw::DocumentContentOperationsManager::*)(sw::DocumentContentOperationsManager* const, SwPaM&, SwDeleteFlags)) (rDocumentContentOperations=..., rPam=SwPaM = {...}, flags=SwDeleteFlags::Default, pFunc=(bool (sw::DocumentContentOperationsManager::*)(sw::DocumentContentOperationsManager * const, SwPaM &, SwDeleteFlags)) 0x7f26b4233632 <sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags)>) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:681\n"
    ~"#26 0x00007f26b42279df in sw::DocumentContentOperationsManager::DeleteAndJoin(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:2367\n"
    ~"#27 0x00007f26b44a71f6 in SwEditShell::DeleteSel(SwPaM&, bool, bool, bool*) (this=0x557f8d51b300, rPam=SwPaM = {...}, isArtificialSelection=false, goLeft=false, pUndo=0x7ffe889a3be6) at .../libreoffice/sw/source/core/edit/eddel.cxx:122\n"
    ~"#28 0x00007f26b44a7671 in SwEditShell::Delete(bool, bool) (this=0x557f8d51b300, isArtificialSelection=false, goLeft=false) at .../libreoffice/sw/source/core/edit/eddel.cxx:164\n"
    ~"#29 0x00007f26b5604933 in SwWrtShell::DelRight(bool) (this=0x557f8d51b300, isReplaceHeuristic=false) at .../libreoffice/sw/source/uibase/wrtsh/delete.cxx:312\n"
    ~"#30 0x00007f26b512fe14 in (anonymous namespace)::SwTrnsfrActionAndUndo::SwTrnsfrActionAndUndo(SwWrtShell*, bool, SwPasteContext*) (this=0x557f9045b020, pS=0x557f8d51b300, bDelSel=true, pContext=0x7ffe889a4220) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:236\n"
    ~"#31 0x00007f26b51377c1 in SwTransferable::PasteData(TransferableDataHelper const&, SwWrtShell&, unsigned char, SotExchangeActionFlags, SotClipboardFormatId, SotExchangeDest, bool, bool, Point const*, signed char, bool, RndStdIds, bool, SwPasteContext*, PasteTableType) (rData=..., rSh=..., nAction=36 '$', nActionFlags=(SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl), nFormat=SotClipboardFormatId::HTML, nDestination=SotExchangeDest::SWDOC_FREE_AREA, bIsPasteFormat=false, bIsDefault=false, pPt=0x0, nDropAction=0 '\\000', bPasteSelection=false, nAnchorType=RndStdIds::FLY_AT_PARA, bIgnoreComments=false, pContext=0x7ffe889a4220, ePasteTable=PasteTableType::PASTE_DEFAULT) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:1768\n"
    ~"#32 0x00007f26b5137333 in SwTransferable::Paste(SwWrtShell&, TransferableDataHelper&, RndStdIds, bool, PasteTableType) (rSh=..., rData=..., nAnchorType=RndStdIds::FLY_AT_PARA, bIgnoreComments=false, ePasteTable=PasteTableType::PASTE_DEFAULT) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:1687\n"
    ~"#33 0x00007f26b52d29e9 in SwBaseShell::ExecClpbrd(SfxRequest&) (this=0x557f8db64330, rReq=...) at .../libreoffice/sw/source/uibase/shells/basesh.cxx:365\n"
    ~"#34 0x00007f26b52d1681 in SfxStubSwBaseShellExecClpbrd(SfxShell*, SfxRequest&) (pShell=0x557f8db64330, rReq=...) at .../libreoffice/workdir/SdiTarget/sw/sdi/swslots.hxx:2219\n"
    ~"#35 0x00007f27012d14dc in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x557f8d4f46b0, rShell=..., rSlot=..., rReq=..., bRecord=true) at .../libreoffice/sfx2/source/control/dispatch.cxx:254\n"
    ~"#36 0x00007f27012d4b34 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) (this=0x557f8d4f46b0, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at .../libreoffice/sfx2/source/control/dispatch.cxx:753\n"
    ~"#37 0x00007f27012c05d4 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) (this=0x557f8d503240, aReq=..., pSlot=0x7f26b6cf5360 <aSwBaseShellSlots_Impl+1440>, pShell=0x557f8db64330) at .../libreoffice/sfx2/source/control/bindings.cxx:1057\n"
    ~"#38 0x00007f270139813d in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) (this=0x557f8db682a0, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at .../libreoffice/sfx2/source/control/unoctitm.cxx:688\n"
    ~"#39 0x00007f2701395dbf in SfxOfficeDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x557f8db68200, aURL=..., aArgs=empty uno::Sequence) at .../libreoffice/sfx2/source/control/unoctitm.cxx:250\n"
    ~"#40 0x00007f26fe03d948 in svt::(anonymous namespace)::AsyncAccelExec::impl_ts_asyncCallback(LinkParamNone*) (this=0x557f8fb8e070) at .../libreoffice/svtools/source/misc/acceleratorexecute.cxx:508\n"
    ~"#41 0x00007f26fe03d869 in svt::(anonymous namespace)::AsyncAccelExec::LinkStubimpl_ts_asyncCallback(void*, LinkParamNone*) (instance=0x557f8fb8e070, data=0x0) at .../libreoffice/svtools/source/misc/acceleratorexecute.cxx:500\n"
    ~"#42 0x00007f26fab0db3b in Link<LinkParamNone*, void>::Call(LinkParamNone*) const (this=0x557f8fb8e110, data=0x0) at .../libreoffice/include/tools/link.hxx:111\n"
    ~"#43 0x00007f26fb469f3d in vcl::EventPoster::DoEvent_Impl(void*) (this=0x557f8fb8e108) at .../libreoffice/vcl/source/helper/evntpost.cxx:52\n"
    ~"#44 0x00007f26fb469f05 in vcl::EventPoster::LinkStubDoEvent_Impl(void*, void*) (instance=0x557f8fb8e108, data=0x0) at .../libreoffice/vcl/source/helper/evntpost.cxx:48\n"
    ~"#45 0x00007f26fadc2373 in Link<void*, void>::Call(void*) const (this=0x7f26e80153b8, data=0x0) at .../libreoffice/include/tools/link.hxx:111\n"
    ~"#46 0x00007f26fadbf458 in ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x7f26e80153b0) at .../libreoffice/vcl/source/window/winproc.cxx:2287\n"
    ~"#47 0x00007f26fadc1385 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x557f897d0e90, nEvent=SalEvent::UserEvent, pEvent=0x7f26e80153b0) at .../libreoffice/vcl/source/window/winproc.cxx:2851\n"
    ~"#48 0x00007f26f08b6bae in SalFrame::CallCallback(SalEvent, void const*) const (this=0x557f8800cf80, nEvent=SalEvent::UserEvent, pEvent=0x7f26e80153b0) at .../libreoffice/vcl/inc/salframe.hxx:310\n"
    ~"#49 0x00007f26f08d9dbf in QtInstance::ProcessEvent(SalUserEventList::SalUserEvent) (this=0x557f88020780, aEvent=...) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:516\n"
    ~"#50 0x00007f26fb47b97f in operator()() const (__closure=0x7ffe889a50e0) at .../libreoffice/vcl/source/app/salusereventlist.cxx:119\n"
    ~"#51 0x00007f26fb47bc53 in SalUserEventList::DispatchUserEvents(bool) (this=0x557f880207b8, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120\n"
    ~"#52 0x00007f26f08d98a4 in QtInstance::ImplYield(bool, bool) (this=0x557f88020780, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:442\n"
    ~"#53 0x00007f26f08d9a4f in QtInstance::DoYield(bool, bool) (this=0x557f88020780, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:464\n"
    ~"#54 0x00007f26fb5390d0 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:390\n"
    ~"#55 0x00007f26fb539e6e in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:474\n"
    ~"#56 0x00007f26fb538dc3 in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:368\n"
    ~"#57 0x00007f2704e371b6 in desktop::Desktop::Main() (this=0x7ffe889a5c10) at .../libreoffice/desktop/source/app/app.cxx:1614\n"
    ~"#58 0x00007f26fb558292 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:229\n"
    ~"#59 0x00007f26fb5585a7 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:261\n"
    ~"#60 0x00007f2704ea4307 in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:94\n"
    ~"#61 0x0000557f862d19d4 in sal_main () at .../libreoffice/desktop/source/app/main.c:51\n"
    ~"#62 0x0000557f862d19ba in main (argc=3, argv=0x7ffe889a5e38) at .../libreoffice/desktop/source/app/main.c:49\n"
    2906^done
    (gdb)

Change-Id: I1f517d441eeb3e77e969062b884d9a425038b22a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163202
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
(cherry picked from commit cb9513c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163179
Reviewed-by: Michael Stahl <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Feb 16, 2024
In `SwTransferable::RemoveDDELinkFormat`, only update the
clipboard content with this `SwTransferable` after removing
the `SotClipboardFormatId::LINK` from the supported formats
if the `SwTransferable` was the clipboard content before
already.

Doing so always would unrelatedly overwrite what was previously
copied from another application to the clipboard for the
tdf#158947 scenario of pasting clipboard content of another
application over a selection when using the Qt-based VCL plugins
on Wayland (s. backtrace below that shows how the clipboard content
was overwritten, frame #17 is the method changed in this
commit).

My assumption why the clipboard content is explicitly overwritten
at all is to make sure that the system clipboard on some platforms
gets notified about the change in supported formats/mime
types after removing one. But that isn't necessary when the
transfer data modified here aren't the current clipboard content
in the first place.

Backtrace for how clipboard content was previously overwritten
for the tdf#158947 scenario with the qt6 VCL plugin on Wayland:

    ~"#0  QtClipboard::handleChanged(QClipboard::Mode) (this=0x557f90457770, aMode=QClipboard::Clipboard) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:156\n"
    ~"#1  0x00007f26f08844ff in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}::operator()() const (__closure=0x7ffe889a2c20) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:153\n"
    ~"#2  0x00007f26f0884ffb in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}&&) (args=0x7ffe889a2ed0, fn=...) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:72\n"
    ~"#3  0x00007f26f088456f in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e <QtClipboard::handleChanged(QClipboard::Mode)>, o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:152\n"
    ~"#4  0x00007f26f08833de in QtPrivate::FunctionPointer<void (QtClipboard::*)(QClipboard::Mode)>::call<QtPrivate::List<QClipboard::Mode>, void>(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e <QtClipboard::handleChanged(QClipboard::Mode)>, o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:200\n"
    ~"#5  0x00007f26f0881f71 in QtPrivate::QCallableObject<void (QtClipboard::*)(QClipboard::Mode), QtPrivate::List<QClipboard::Mode>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0, ret=0x0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:571\n"
    ~"#6  0x00007f26efdb863f in QtPrivate::QSlotObjectBase::call(QObject*, void**) (this=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:487\n"
    ~"#7  0x00007f26efe5772e in doActivate<false>(QObject*, int, void**) (sender=0x557f8d510fd0, signal_index=3, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4116\n"
    ~"#8  0x00007f26efe4cdef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0x557f8d510fd0, m=0x7f26efa47cc0 <QClipboard::staticMetaObject>, local_signal_index=0, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4176\n"
    ~"#9  0x00007f26eede9fcc in QClipboard::changed(QClipboard::Mode) (this=0x557f8d510fd0, _t1=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/Gui_autogen/include/moc_qclipboard.cpp:182\n"
    ~"#10 0x00007f26eede9bc1 in QClipboard::emitChanged(QClipboard::Mode) (this=0x557f8d510fd0, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:558\n"
    ~"#11 0x00007f26eee4ed69 in QPlatformClipboard::emitChanged(QClipboard::Mode) (this=0x557f88019c20, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qplatformclipboard.cpp:89\n"
    ~"#12 0x00007f26ed78809e in QtWaylandClient::QWaylandClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f88019c20, data=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtwayland/src/client/qwaylandclipboard.cpp:89\n"
    ~"#13 0x00007f26eede99de in QClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f8d510fd0, src=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:447\n"
    ~"#14 0x00007f26f087a5b5 in QtClipboard::setContents(com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> const&, com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboardOwner> const&) (this=0x557f8d50cbb0, xTrans=uno::Reference to (SwTransferable *) 0x557f90440118, xClipboardOwner=uno::Reference to (SwTransferable *) 0x557f90440120) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:137\n"
    ~"#15 0x00007f26fb05bacc in TransferableHelper::CopyToClipboard(com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard> const&) const (this=0x557f904400f0, rClipboard=uno::Reference to (QtClipboard *) 0x557f8d50cc10) at .../libreoffice/vcl/source/treelist/transfer.cxx:942\n"
    ~"#16 0x00007f26fb05bc77 in TransferableHelper::CopyToClipboard(vcl::Window*) const (this=0x557f904400f0, pWindow=0x557f8932d1f0) at .../libreoffice/vcl/source/treelist/transfer.cxx:957\n"
    ~"#17 0x00007f26b5130940 in SwTransferable::RemoveDDELinkFormat(vcl::Window&) (this=0x557f904400f0, rWin=...) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:385\n"
    ~"#18 0x00007f26b51440ab in SwTransferDdeLink::DataChanged(rtl::OUString const&, com::sun::star::uno::Any const&) (this=0x557f8fb864e0) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:4447\n"
    ~"#19 0x00007f270120fa0e in sfx2::SvLinkSource::NotifyDataChanged() (this=0x557f8fb8bbe0) at .../libreoffice/sfx2/source/appl/linksrc.cxx:291\n"
    ~"#20 0x00007f26b43210ba in SwServerObject::SendDataChanged(SwPaM const&) (this=0x557f8fb8bbe0, rRange=SwPaM = {...}) at .../libreoffice/sw/source/core/doc/swserv.cxx:177\n"
    ~"#21 0x00007f26b43217c2 in SwDataChanged::~SwDataChanged() (this=0x7ffe889a3520, __in_chrg=<optimized out>) at .../libreoffice/sw/source/core/doc/swserv.cxx:308\n"
    ~"#22 0x00007f26b4233c8b in sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4474\n"
    ~"#23 0x00007f26b4233826 in sw::DocumentContentOperationsManager::DeleteRangeImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4419\n"
    ~"#24 0x00007f26b4233681 in sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4391\n"
    ~"#25 0x00007f26b421edb7 in (anonymous namespace)::lcl_DoWithBreaks(sw::DocumentContentOperationsManager&, SwPaM&, SwDeleteFlags, bool (sw::DocumentContentOperationsManager::*)(sw::DocumentContentOperationsManager* const, SwPaM&, SwDeleteFlags)) (rDocumentContentOperations=..., rPam=SwPaM = {...}, flags=SwDeleteFlags::Default, pFunc=(bool (sw::DocumentContentOperationsManager::*)(sw::DocumentContentOperationsManager * const, SwPaM &, SwDeleteFlags)) 0x7f26b4233632 <sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags)>) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:681\n"
    ~"#26 0x00007f26b42279df in sw::DocumentContentOperationsManager::DeleteAndJoin(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:2367\n"
    ~"#27 0x00007f26b44a71f6 in SwEditShell::DeleteSel(SwPaM&, bool, bool, bool*) (this=0x557f8d51b300, rPam=SwPaM = {...}, isArtificialSelection=false, goLeft=false, pUndo=0x7ffe889a3be6) at .../libreoffice/sw/source/core/edit/eddel.cxx:122\n"
    ~"#28 0x00007f26b44a7671 in SwEditShell::Delete(bool, bool) (this=0x557f8d51b300, isArtificialSelection=false, goLeft=false) at .../libreoffice/sw/source/core/edit/eddel.cxx:164\n"
    ~"#29 0x00007f26b5604933 in SwWrtShell::DelRight(bool) (this=0x557f8d51b300, isReplaceHeuristic=false) at .../libreoffice/sw/source/uibase/wrtsh/delete.cxx:312\n"
    ~"#30 0x00007f26b512fe14 in (anonymous namespace)::SwTrnsfrActionAndUndo::SwTrnsfrActionAndUndo(SwWrtShell*, bool, SwPasteContext*) (this=0x557f9045b020, pS=0x557f8d51b300, bDelSel=true, pContext=0x7ffe889a4220) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:236\n"
    ~"#31 0x00007f26b51377c1 in SwTransferable::PasteData(TransferableDataHelper const&, SwWrtShell&, unsigned char, SotExchangeActionFlags, SotClipboardFormatId, SotExchangeDest, bool, bool, Point const*, signed char, bool, RndStdIds, bool, SwPasteContext*, PasteTableType) (rData=..., rSh=..., nAction=36 '$', nActionFlags=(SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl), nFormat=SotClipboardFormatId::HTML, nDestination=SotExchangeDest::SWDOC_FREE_AREA, bIsPasteFormat=false, bIsDefault=false, pPt=0x0, nDropAction=0 '\\000', bPasteSelection=false, nAnchorType=RndStdIds::FLY_AT_PARA, bIgnoreComments=false, pContext=0x7ffe889a4220, ePasteTable=PasteTableType::PASTE_DEFAULT) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:1768\n"
    ~"#32 0x00007f26b5137333 in SwTransferable::Paste(SwWrtShell&, TransferableDataHelper&, RndStdIds, bool, PasteTableType) (rSh=..., rData=..., nAnchorType=RndStdIds::FLY_AT_PARA, bIgnoreComments=false, ePasteTable=PasteTableType::PASTE_DEFAULT) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:1687\n"
    ~"#33 0x00007f26b52d29e9 in SwBaseShell::ExecClpbrd(SfxRequest&) (this=0x557f8db64330, rReq=...) at .../libreoffice/sw/source/uibase/shells/basesh.cxx:365\n"
    ~"#34 0x00007f26b52d1681 in SfxStubSwBaseShellExecClpbrd(SfxShell*, SfxRequest&) (pShell=0x557f8db64330, rReq=...) at .../libreoffice/workdir/SdiTarget/sw/sdi/swslots.hxx:2219\n"
    ~"#35 0x00007f27012d14dc in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x557f8d4f46b0, rShell=..., rSlot=..., rReq=..., bRecord=true) at .../libreoffice/sfx2/source/control/dispatch.cxx:254\n"
    ~"#36 0x00007f27012d4b34 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) (this=0x557f8d4f46b0, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at .../libreoffice/sfx2/source/control/dispatch.cxx:753\n"
    ~"#37 0x00007f27012c05d4 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) (this=0x557f8d503240, aReq=..., pSlot=0x7f26b6cf5360 <aSwBaseShellSlots_Impl+1440>, pShell=0x557f8db64330) at .../libreoffice/sfx2/source/control/bindings.cxx:1057\n"
    ~"#38 0x00007f270139813d in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) (this=0x557f8db682a0, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at .../libreoffice/sfx2/source/control/unoctitm.cxx:688\n"
    ~"#39 0x00007f2701395dbf in SfxOfficeDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x557f8db68200, aURL=..., aArgs=empty uno::Sequence) at .../libreoffice/sfx2/source/control/unoctitm.cxx:250\n"
    ~"#40 0x00007f26fe03d948 in svt::(anonymous namespace)::AsyncAccelExec::impl_ts_asyncCallback(LinkParamNone*) (this=0x557f8fb8e070) at .../libreoffice/svtools/source/misc/acceleratorexecute.cxx:508\n"
    ~"#41 0x00007f26fe03d869 in svt::(anonymous namespace)::AsyncAccelExec::LinkStubimpl_ts_asyncCallback(void*, LinkParamNone*) (instance=0x557f8fb8e070, data=0x0) at .../libreoffice/svtools/source/misc/acceleratorexecute.cxx:500\n"
    ~"#42 0x00007f26fab0db3b in Link<LinkParamNone*, void>::Call(LinkParamNone*) const (this=0x557f8fb8e110, data=0x0) at .../libreoffice/include/tools/link.hxx:111\n"
    ~"#43 0x00007f26fb469f3d in vcl::EventPoster::DoEvent_Impl(void*) (this=0x557f8fb8e108) at .../libreoffice/vcl/source/helper/evntpost.cxx:52\n"
    ~"#44 0x00007f26fb469f05 in vcl::EventPoster::LinkStubDoEvent_Impl(void*, void*) (instance=0x557f8fb8e108, data=0x0) at .../libreoffice/vcl/source/helper/evntpost.cxx:48\n"
    ~"#45 0x00007f26fadc2373 in Link<void*, void>::Call(void*) const (this=0x7f26e80153b8, data=0x0) at .../libreoffice/include/tools/link.hxx:111\n"
    ~"#46 0x00007f26fadbf458 in ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x7f26e80153b0) at .../libreoffice/vcl/source/window/winproc.cxx:2287\n"
    ~"#47 0x00007f26fadc1385 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x557f897d0e90, nEvent=SalEvent::UserEvent, pEvent=0x7f26e80153b0) at .../libreoffice/vcl/source/window/winproc.cxx:2851\n"
    ~"#48 0x00007f26f08b6bae in SalFrame::CallCallback(SalEvent, void const*) const (this=0x557f8800cf80, nEvent=SalEvent::UserEvent, pEvent=0x7f26e80153b0) at .../libreoffice/vcl/inc/salframe.hxx:310\n"
    ~"#49 0x00007f26f08d9dbf in QtInstance::ProcessEvent(SalUserEventList::SalUserEvent) (this=0x557f88020780, aEvent=...) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:516\n"
    ~"#50 0x00007f26fb47b97f in operator()() const (__closure=0x7ffe889a50e0) at .../libreoffice/vcl/source/app/salusereventlist.cxx:119\n"
    ~"#51 0x00007f26fb47bc53 in SalUserEventList::DispatchUserEvents(bool) (this=0x557f880207b8, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120\n"
    ~"#52 0x00007f26f08d98a4 in QtInstance::ImplYield(bool, bool) (this=0x557f88020780, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:442\n"
    ~"#53 0x00007f26f08d9a4f in QtInstance::DoYield(bool, bool) (this=0x557f88020780, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:464\n"
    ~"#54 0x00007f26fb5390d0 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:390\n"
    ~"#55 0x00007f26fb539e6e in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:474\n"
    ~"#56 0x00007f26fb538dc3 in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:368\n"
    ~"#57 0x00007f2704e371b6 in desktop::Desktop::Main() (this=0x7ffe889a5c10) at .../libreoffice/desktop/source/app/app.cxx:1614\n"
    ~"#58 0x00007f26fb558292 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:229\n"
    ~"#59 0x00007f26fb5585a7 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:261\n"
    ~"#60 0x00007f2704ea4307 in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:94\n"
    ~"#61 0x0000557f862d19d4 in sal_main () at .../libreoffice/desktop/source/app/main.c:51\n"
    ~"#62 0x0000557f862d19ba in main (argc=3, argv=0x7ffe889a5e38) at .../libreoffice/desktop/source/app/main.c:49\n"
    2906^done
    (gdb)

Change-Id: I1f517d441eeb3e77e969062b884d9a425038b22a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163202
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
(cherry picked from commit cb9513c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163179
Reviewed-by: Michael Stahl <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Feb 22, 2024
In `SwTransferable::RemoveDDELinkFormat`, only update the
clipboard content with this `SwTransferable` after removing
the `SotClipboardFormatId::LINK` from the supported formats
if the `SwTransferable` was the clipboard content before
already.

Doing so always would unrelatedly overwrite what was previously
copied from another application to the clipboard for the
tdf#158947 scenario of pasting clipboard content of another
application over a selection when using the Qt-based VCL plugins
on Wayland (s. backtrace below that shows how the clipboard content
was overwritten, frame #17 is the method changed in this
commit).

My assumption why the clipboard content is explicitly overwritten
at all is to make sure that the system clipboard on some platforms
gets notified about the change in supported formats/mime
types after removing one. But that isn't necessary when the
transfer data modified here aren't the current clipboard content
in the first place.

Backtrace for how clipboard content was previously overwritten
for the tdf#158947 scenario with the qt6 VCL plugin on Wayland:

    ~"#0  QtClipboard::handleChanged(QClipboard::Mode) (this=0x557f90457770, aMode=QClipboard::Clipboard) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:156\n"
    ~"#1  0x00007f26f08844ff in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}::operator()() const (__closure=0x7ffe889a2c20) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:153\n"
    ~"#2  0x00007f26f0884ffb in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}&&) (args=0x7ffe889a2ed0, fn=...) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:72\n"
    ~"#3  0x00007f26f088456f in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QClipboard::Mode>, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e <QtClipboard::handleChanged(QClipboard::Mode)>, o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:152\n"
    ~"#4  0x00007f26f08833de in QtPrivate::FunctionPointer<void (QtClipboard::*)(QClipboard::Mode)>::call<QtPrivate::List<QClipboard::Mode>, void>(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e <QtClipboard::handleChanged(QClipboard::Mode)>, o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:200\n"
    ~"#5  0x00007f26f0881f71 in QtPrivate::QCallableObject<void (QtClipboard::*)(QClipboard::Mode), QtPrivate::List<QClipboard::Mode>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0, ret=0x0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:571\n"
    ~"#6  0x00007f26efdb863f in QtPrivate::QSlotObjectBase::call(QObject*, void**) (this=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:487\n"
    ~"#7  0x00007f26efe5772e in doActivate<false>(QObject*, int, void**) (sender=0x557f8d510fd0, signal_index=3, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4116\n"
    ~"#8  0x00007f26efe4cdef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0x557f8d510fd0, m=0x7f26efa47cc0 <QClipboard::staticMetaObject>, local_signal_index=0, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4176\n"
    ~"#9  0x00007f26eede9fcc in QClipboard::changed(QClipboard::Mode) (this=0x557f8d510fd0, _t1=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/Gui_autogen/include/moc_qclipboard.cpp:182\n"
    ~"#10 0x00007f26eede9bc1 in QClipboard::emitChanged(QClipboard::Mode) (this=0x557f8d510fd0, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:558\n"
    ~"#11 0x00007f26eee4ed69 in QPlatformClipboard::emitChanged(QClipboard::Mode) (this=0x557f88019c20, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qplatformclipboard.cpp:89\n"
    ~"#12 0x00007f26ed78809e in QtWaylandClient::QWaylandClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f88019c20, data=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtwayland/src/client/qwaylandclipboard.cpp:89\n"
    ~"#13 0x00007f26eede99de in QClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f8d510fd0, src=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:447\n"
    ~"#14 0x00007f26f087a5b5 in QtClipboard::setContents(com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> const&, com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboardOwner> const&) (this=0x557f8d50cbb0, xTrans=uno::Reference to (SwTransferable *) 0x557f90440118, xClipboardOwner=uno::Reference to (SwTransferable *) 0x557f90440120) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:137\n"
    ~"#15 0x00007f26fb05bacc in TransferableHelper::CopyToClipboard(com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard> const&) const (this=0x557f904400f0, rClipboard=uno::Reference to (QtClipboard *) 0x557f8d50cc10) at .../libreoffice/vcl/source/treelist/transfer.cxx:942\n"
    ~"#16 0x00007f26fb05bc77 in TransferableHelper::CopyToClipboard(vcl::Window*) const (this=0x557f904400f0, pWindow=0x557f8932d1f0) at .../libreoffice/vcl/source/treelist/transfer.cxx:957\n"
    ~"#17 0x00007f26b5130940 in SwTransferable::RemoveDDELinkFormat(vcl::Window&) (this=0x557f904400f0, rWin=...) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:385\n"
    ~"#18 0x00007f26b51440ab in SwTransferDdeLink::DataChanged(rtl::OUString const&, com::sun::star::uno::Any const&) (this=0x557f8fb864e0) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:4447\n"
    ~"#19 0x00007f270120fa0e in sfx2::SvLinkSource::NotifyDataChanged() (this=0x557f8fb8bbe0) at .../libreoffice/sfx2/source/appl/linksrc.cxx:291\n"
    ~"#20 0x00007f26b43210ba in SwServerObject::SendDataChanged(SwPaM const&) (this=0x557f8fb8bbe0, rRange=SwPaM = {...}) at .../libreoffice/sw/source/core/doc/swserv.cxx:177\n"
    ~"#21 0x00007f26b43217c2 in SwDataChanged::~SwDataChanged() (this=0x7ffe889a3520, __in_chrg=<optimized out>) at .../libreoffice/sw/source/core/doc/swserv.cxx:308\n"
    ~"#22 0x00007f26b4233c8b in sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4474\n"
    ~"#23 0x00007f26b4233826 in sw::DocumentContentOperationsManager::DeleteRangeImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4419\n"
    ~"#24 0x00007f26b4233681 in sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:4391\n"
    ~"#25 0x00007f26b421edb7 in (anonymous namespace)::lcl_DoWithBreaks(sw::DocumentContentOperationsManager&, SwPaM&, SwDeleteFlags, bool (sw::DocumentContentOperationsManager::*)(sw::DocumentContentOperationsManager* const, SwPaM&, SwDeleteFlags)) (rDocumentContentOperations=..., rPam=SwPaM = {...}, flags=SwDeleteFlags::Default, pFunc=(bool (sw::DocumentContentOperationsManager::*)(sw::DocumentContentOperationsManager * const, SwPaM &, SwDeleteFlags)) 0x7f26b4233632 <sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags)>) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:681\n"
    ~"#26 0x00007f26b42279df in sw::DocumentContentOperationsManager::DeleteAndJoin(SwPaM&, SwDeleteFlags) (this=0x557f8d2b8000, rPam=SwPaM = {...}, flags=SwDeleteFlags::Default) at .../libreoffice/sw/source/core/doc/DocumentContentOperationsManager.cxx:2367\n"
    ~"#27 0x00007f26b44a71f6 in SwEditShell::DeleteSel(SwPaM&, bool, bool, bool*) (this=0x557f8d51b300, rPam=SwPaM = {...}, isArtificialSelection=false, goLeft=false, pUndo=0x7ffe889a3be6) at .../libreoffice/sw/source/core/edit/eddel.cxx:122\n"
    ~"#28 0x00007f26b44a7671 in SwEditShell::Delete(bool, bool) (this=0x557f8d51b300, isArtificialSelection=false, goLeft=false) at .../libreoffice/sw/source/core/edit/eddel.cxx:164\n"
    ~"#29 0x00007f26b5604933 in SwWrtShell::DelRight(bool) (this=0x557f8d51b300, isReplaceHeuristic=false) at .../libreoffice/sw/source/uibase/wrtsh/delete.cxx:312\n"
    ~"#30 0x00007f26b512fe14 in (anonymous namespace)::SwTrnsfrActionAndUndo::SwTrnsfrActionAndUndo(SwWrtShell*, bool, SwPasteContext*) (this=0x557f9045b020, pS=0x557f8d51b300, bDelSel=true, pContext=0x7ffe889a4220) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:236\n"
    ~"#31 0x00007f26b51377c1 in SwTransferable::PasteData(TransferableDataHelper const&, SwWrtShell&, unsigned char, SotExchangeActionFlags, SotClipboardFormatId, SotExchangeDest, bool, bool, Point const*, signed char, bool, RndStdIds, bool, SwPasteContext*, PasteTableType) (rData=..., rSh=..., nAction=36 '$', nActionFlags=(SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl), nFormat=SotClipboardFormatId::HTML, nDestination=SotExchangeDest::SWDOC_FREE_AREA, bIsPasteFormat=false, bIsDefault=false, pPt=0x0, nDropAction=0 '\\000', bPasteSelection=false, nAnchorType=RndStdIds::FLY_AT_PARA, bIgnoreComments=false, pContext=0x7ffe889a4220, ePasteTable=PasteTableType::PASTE_DEFAULT) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:1768\n"
    ~"#32 0x00007f26b5137333 in SwTransferable::Paste(SwWrtShell&, TransferableDataHelper&, RndStdIds, bool, PasteTableType) (rSh=..., rData=..., nAnchorType=RndStdIds::FLY_AT_PARA, bIgnoreComments=false, ePasteTable=PasteTableType::PASTE_DEFAULT) at .../libreoffice/sw/source/uibase/dochdl/swdtflvr.cxx:1687\n"
    ~"#33 0x00007f26b52d29e9 in SwBaseShell::ExecClpbrd(SfxRequest&) (this=0x557f8db64330, rReq=...) at .../libreoffice/sw/source/uibase/shells/basesh.cxx:365\n"
    ~"#34 0x00007f26b52d1681 in SfxStubSwBaseShellExecClpbrd(SfxShell*, SfxRequest&) (pShell=0x557f8db64330, rReq=...) at .../libreoffice/workdir/SdiTarget/sw/sdi/swslots.hxx:2219\n"
    ~"#35 0x00007f27012d14dc in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x557f8d4f46b0, rShell=..., rSlot=..., rReq=..., bRecord=true) at .../libreoffice/sfx2/source/control/dispatch.cxx:254\n"
    ~"#36 0x00007f27012d4b34 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) (this=0x557f8d4f46b0, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at .../libreoffice/sfx2/source/control/dispatch.cxx:753\n"
    ~"#37 0x00007f27012c05d4 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) (this=0x557f8d503240, aReq=..., pSlot=0x7f26b6cf5360 <aSwBaseShellSlots_Impl+1440>, pShell=0x557f8db64330) at .../libreoffice/sfx2/source/control/bindings.cxx:1057\n"
    ~"#38 0x00007f270139813d in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) (this=0x557f8db682a0, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at .../libreoffice/sfx2/source/control/unoctitm.cxx:688\n"
    ~"#39 0x00007f2701395dbf in SfxOfficeDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x557f8db68200, aURL=..., aArgs=empty uno::Sequence) at .../libreoffice/sfx2/source/control/unoctitm.cxx:250\n"
    ~"#40 0x00007f26fe03d948 in svt::(anonymous namespace)::AsyncAccelExec::impl_ts_asyncCallback(LinkParamNone*) (this=0x557f8fb8e070) at .../libreoffice/svtools/source/misc/acceleratorexecute.cxx:508\n"
    ~"#41 0x00007f26fe03d869 in svt::(anonymous namespace)::AsyncAccelExec::LinkStubimpl_ts_asyncCallback(void*, LinkParamNone*) (instance=0x557f8fb8e070, data=0x0) at .../libreoffice/svtools/source/misc/acceleratorexecute.cxx:500\n"
    ~"#42 0x00007f26fab0db3b in Link<LinkParamNone*, void>::Call(LinkParamNone*) const (this=0x557f8fb8e110, data=0x0) at .../libreoffice/include/tools/link.hxx:111\n"
    ~"#43 0x00007f26fb469f3d in vcl::EventPoster::DoEvent_Impl(void*) (this=0x557f8fb8e108) at .../libreoffice/vcl/source/helper/evntpost.cxx:52\n"
    ~"#44 0x00007f26fb469f05 in vcl::EventPoster::LinkStubDoEvent_Impl(void*, void*) (instance=0x557f8fb8e108, data=0x0) at .../libreoffice/vcl/source/helper/evntpost.cxx:48\n"
    ~"#45 0x00007f26fadc2373 in Link<void*, void>::Call(void*) const (this=0x7f26e80153b8, data=0x0) at .../libreoffice/include/tools/link.hxx:111\n"
    ~"#46 0x00007f26fadbf458 in ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x7f26e80153b0) at .../libreoffice/vcl/source/window/winproc.cxx:2287\n"
    ~"#47 0x00007f26fadc1385 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x557f897d0e90, nEvent=SalEvent::UserEvent, pEvent=0x7f26e80153b0) at .../libreoffice/vcl/source/window/winproc.cxx:2851\n"
    ~"#48 0x00007f26f08b6bae in SalFrame::CallCallback(SalEvent, void const*) const (this=0x557f8800cf80, nEvent=SalEvent::UserEvent, pEvent=0x7f26e80153b0) at .../libreoffice/vcl/inc/salframe.hxx:310\n"
    ~"#49 0x00007f26f08d9dbf in QtInstance::ProcessEvent(SalUserEventList::SalUserEvent) (this=0x557f88020780, aEvent=...) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:516\n"
    ~"#50 0x00007f26fb47b97f in operator()() const (__closure=0x7ffe889a50e0) at .../libreoffice/vcl/source/app/salusereventlist.cxx:119\n"
    ~"#51 0x00007f26fb47bc53 in SalUserEventList::DispatchUserEvents(bool) (this=0x557f880207b8, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120\n"
    ~"#52 0x00007f26f08d98a4 in QtInstance::ImplYield(bool, bool) (this=0x557f88020780, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:442\n"
    ~"#53 0x00007f26f08d9a4f in QtInstance::DoYield(bool, bool) (this=0x557f88020780, bWait=true, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/qt6/../qt5/QtInstance.cxx:464\n"
    ~"#54 0x00007f26fb5390d0 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:390\n"
    ~"#55 0x00007f26fb539e6e in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:474\n"
    ~"#56 0x00007f26fb538dc3 in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:368\n"
    ~"#57 0x00007f2704e371b6 in desktop::Desktop::Main() (this=0x7ffe889a5c10) at .../libreoffice/desktop/source/app/app.cxx:1614\n"
    ~"#58 0x00007f26fb558292 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:229\n"
    ~"#59 0x00007f26fb5585a7 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:261\n"
    ~"#60 0x00007f2704ea4307 in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:94\n"
    ~"#61 0x0000557f862d19d4 in sal_main () at .../libreoffice/desktop/source/app/main.c:51\n"
    ~"#62 0x0000557f862d19ba in main (argc=3, argv=0x7ffe889a5e38) at .../libreoffice/desktop/source/app/main.c:49\n"
    2906^done
    (gdb)

Change-Id: I1f517d441eeb3e77e969062b884d9a425038b22a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163202
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
(cherry picked from commit cb9513c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163179
Reviewed-by: Michael Stahl <[email protected]>
(cherry picked from commit 0750cac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163184
Reviewed-by: Xisco Fauli <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Feb 26, 2024
...as seen during CppunitTest_xmloff_style,

> workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31: runtime error: applying zero offset to null pointer
>  #0 in tt_var_get_item_delta at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31
>  #1 in tt_hvadvance_adjust at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1242:13
>  #2 in tt_vadvance_adjust at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1278:12
>  #3 in tt_face_get_metrics at workdir/UnpackedTarball/freetype/src/sfnt/ttmtx.c:319:11
>  #4 in cff_slot_load at workdir/UnpackedTarball/freetype/src/cff/cffgload.c:660:11
>  #5 in cff_glyph_load at workdir/UnpackedTarball/freetype/src/cff/cffdrivr.c:192:13
>  #6 in FT_Load_Glyph at workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1066:15
>  #7 in _cairo_ft_scaled_glyph_load_glyph at workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2455:13
>  #8 in _cairo_ft_scaled_glyph_init at workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2640:11
>  #9 in _cairo_scaled_glyph_lookup at workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:3035:6
>  #10 in _cairo_scaled_font_glyph_device_extents at workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:2250:15
>  #11 in _cairo_composite_rectangles_init_for_glyphs at workdir/UnpackedTarball/cairo/src/cairo-composite-rectangles.c:476:14
>  #12 in _cairo_compositor_glyphs at workdir/UnpackedTarball/cairo/src/cairo-compositor.c:280:14
>  #13 in _cairo_image_surface_glyphs at workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:1030:12
>  #14 in _cairo_surface_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-surface.c:2920:15
>  #15 in _cairo_gstate_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-gstate.c:2077:15
>  #16 in _cairo_default_context_glyphs at workdir/UnpackedTarball/cairo/src/cairo-default-context.c:1334:12
>  #17 in cairo_show_glyphs at workdir/UnpackedTarball/cairo/src/cairo.c:3670:14
>  #18 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:477:9
>  #19 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:72:23
>  #20 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:171:18
>  #21 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:312:16
>  #22 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:463:9
>  #23 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, KernArraySpan, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:701:9
>  #24 in SwFntObj::DrawText(SwDrawTextInfo&) at sw/source/core/txtnode/fntcache.cxx:1490:31
>  #25 in SwSubFont::DrawText_(SwDrawTextInfo&, bool) at sw/source/core/txtnode/swfont.cxx:1144:24
>  #26 in SwFont::DrawText_(SwDrawTextInfo&) at sw/source/core/inc/swfont.hxx:324:29
>  #27 in SwTextPaintInfo::DrawText_(rtl::OUString const&, SwLinePortion const&, o3tl::strong_int<int, Tag_TextFrameIndex>, o3tl::strong_int<int, Tag_TextFrameIndex>, bool, bool, bool, bool) at sw/source/core/text/inftxt.cxx:730:21
>  #28 in SwTextPaintInfo::DrawText(SwLinePortion const&, o3tl::strong_int<int, Tag_TextFrameIndex>, bool) const at sw/source/core/text/inftxt.hxx:783:41
>  #29 in SwTextPortion::Paint(SwTextPaintInfo const&) const at sw/source/core/text/portxt.cxx:603:18
>  #30 in SwTextPainter::DrawTextLine(SwRect const&, SwSaveClip&, bool, std::optional<SwTaggedPDFHelper>&, std::optional<SwTaggedPDFHelper>&, bool) at sw/source/core/text/itrpaint.cxx:433:23
>  #31 in SwTextFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/text/frmpaint.cxx:787:23
>  #32 in SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:3804:21
>  #33 in SwFlyFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:4507:20
>  #34 in SwVirtFlyDrawObj::wrap_DoPaintObject(drawinglayer::geometry::ViewInformation2D const&) const at sw/source/core/draw/dflyobj.cxx:541:18
>  #35 in drawinglayer::primitive2d::(anonymous namespace)::SwVirtFlyDrawObjPrimitive::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at sw/source/core/draw/dflyobj.cxx:244:35
>  #36 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #37 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:397:13
>  #38 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:69:21
>  #39 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:284:31
>  #40 in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:120:21
>  #41 in SdrPageWindow::RedrawLayer(o3tl::strong_int<short, SdrLayerIDTag> const*, sdr::contact::ViewObjectContactRedirector*, basegfx::B2IRange const*) at svx/source/svdraw/sdrpagewindow.cxx:421:28
>  #42 in SdrPageView::DrawLayer(o3tl::strong_int<short, SdrLayerIDTag>, OutputDevice*, sdr::contact::ViewObjectContactRedirector*, tools::Rectangle const&, basegfx::B2IRange const*) at svx/source/svdraw/svdpagv.cxx:265:27
>  #43 in SwViewShellImp::PaintLayer(o3tl::strong_int<short, SdrLayerIDTag>, SwPageFrame const&, SwRect const&, Color const*, bool, sdr::contact::ViewObjectContactRedirector*) at sw/source/core/view/vdraw.cxx:139:20
>  #44 in SwRootFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:3527:33
>  #45 in SwViewShell::PrtOle2(SwDoc*, SwViewOption const*, SwPrintData const&, OutputDevice&, tools::Rectangle const&, bool) at sw/source/core/view/vprint.cxx:592:27
>  #46 in SwDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sw/source/uibase/app/docsh.cxx:881:5
>  #47 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #48 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #49 in SfxObjectShell::CreatePreview_Impl(bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:198:40
>  #50 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:110:9
>  #51 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:3850:31
>  #52 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:3808:33
>  #53 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1531:19
>  #54 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3117:39
>  #55 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:2907:9
>  #56 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:320:19
>  #57 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:3233:42
>  #58 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1815:13
>  #59 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:213:16
>  #60 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #61 in testWritingModeBTLR::TestBody() at xmloff/qa/unit/style.cxx:193:9

Change-Id: I54d4d90e203127e018b99c34785602ac3d96e425
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163925
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Feb 28, 2024
The recently added CppunitTest_sc_tiledrendering
CPPUNIT_TEST_NAME=testEditShapeText::TestBody had started to cause

> svx/source/svdraw/sdrpagewindow.cxx:471:56: runtime error: member call on address 0x51d0000c4480 which does not point to an object of type 'SdrMarkView'
> 0x51d0000c4480: note: object is of type 'SdrPaintView'
>  00 00 00 00  30 1f 13 bc ca 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  03 00 00 00
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'SdrPaintView'
>  #0 in SdrPageWindow::InvalidatePageWindow(basegfx::B2DRange const&) at svx/source/svdraw/sdrpagewindow.cxx:471:56
>  #1 in sdr::contact::ObjectContactOfPageView::InvalidatePartOfView(basegfx::B2DRange const&) const at svx/source/sdr/contact/objectcontactofpageview.cxx:357:29
>  #2 in sdr::contact::ViewObjectContact::triggerLazyInvalidate() at svx/source/sdr/contact/viewobjectcontact.cxx:267:28
>  #3 in sdr::contact::ObjectContactOfPageView::Invoke() at svx/source/sdr/contact/objectcontactofpageview.cxx:105:29
>  #4 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() at svx/source/sdr/contact/objectcontactofpageview.cxx:74:13
>  #5 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() at svx/source/sdr/contact/objectcontactofpageview.cxx:72:9
>  #6 in SdrPageWindow::ResetObjectContact() at svx/source/svdraw/sdrpagewindow.cxx:520:9
>  #7 in SdrPageWindow::~SdrPageWindow() at svx/source/svdraw/sdrpagewindow.cxx:130:5
>  #8 in std::default_delete<SdrPageWindow>::operator()(SdrPageWindow*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2
>  #9 in std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>::~unique_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:398:4
>  #10 in void std::destroy_at<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:88:15
>  #11 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:149:7
>  #12 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:163:6
>  #13 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:195:7
>  #14 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/alloc_traits.h:941:7
>  #15 in std::__cxx1998::vector<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>>::~vector() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_vector.h:732:2
>  #16 in std::__debug::vector<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>>::~vector() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/debug/vector:245:25
>  #17 in SdrPageView::~SdrPageView() at svx/source/svdraw/svdpagv.cxx:122:1
>  #18 in std::default_delete<SdrPageView>::operator()(SdrPageView*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2
>  #19 in std::__uniq_ptr_impl<SdrPageView, std::default_delete<SdrPageView>>::reset(SdrPageView*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:205:4
>  #20 in std::unique_ptr<SdrPageView, std::default_delete<SdrPageView>>::reset(SdrPageView*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:503:7
>  #21 in SdrPaintView::ClearPageView() at svx/source/svdraw/svdpntv.cxx:356:20
>  #22 in SdrPaintView::~SdrPaintView() at svx/source/svdraw/svdpntv.cxx:189:5
>  #23 in SdrSnapView::~SdrSnapView() at svx/source/svdraw/svdsnpv.cxx:199:1
>  #24 in SdrMarkView::~SdrMarkView() at svx/source/svdraw/svdmrkv.cxx:197:1
>  #25 in SdrEditView::~SdrEditView() at svx/source/svdraw/svdedtv.cxx:126:1
>  #26 in SdrPolyEditView::~SdrPolyEditView() at svx/source/svdraw/svdpoev.cxx:58:1
>  #27 in SdrGlueEditView::~SdrGlueEditView() at svx/source/svdraw/svdglev.cxx:40:1
>  #28 in SdrObjEditView::~SdrObjEditView() at svx/source/svdraw/svdedxv.cxx:101:1
>  #29 in SdrExchangeView::~SdrExchangeView() at include/svx/svdxcgv.hxx:27:25
>  #30 in SdrDragView::~SdrDragView() at svx/source/svdraw/svddrgv.cxx:69:1
>  #31 in SdrCreateView::~SdrCreateView() at svx/source/svdraw/svdcrtv.cxx:199:1
>  #32 in SdrView::~SdrView() at svx/source/svdraw/svdview.cxx:154:1
>  #33 in E3dView::~E3dView() at svx/source/engine3d/view3d.cxx:1457:1
>  #34 in FmFormView::~FmFormView() at svx/source/form/fmview.cxx:124:1
>  #35 in FmFormView::~FmFormView() at svx/source/form/fmview.cxx:119:1
>  #36 in std::default_delete<FmFormView>::operator()(FmFormView*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2
>  #37 in std::unique_ptr<FmFormView, std::default_delete<FmFormView>>::~unique_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:398:4
>  #38 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:450:1
>  #39 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:448:1
>  #40 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:448:1
>  #41 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:43:13
>  #42 in rtl::Reference<vcl::Window>::~Reference() at include/rtl/ref.hxx:131:22
>  #43 in VclPtr<vcl::Window>::~VclPtr() at include/vcl/vclptr.hxx:112:5
>  #44 in ImplSVWinData::~ImplSVWinData() at vcl/source/app/svdata.cxx:531:34
>  #45 in DestroySVWinData(ImplSVWinData*) at vcl/source/app/svdata.cxx:388:5
>  #46 in SfxViewFrame::~SfxViewFrame() at sfx2/source/view/viewfrm.cxx:2012:5
>  #47 in SfxViewFrame::Close() at sfx2/source/view/viewfrm.cxx:1190:5
>  #48 in SfxFrame::DoClose_Impl() at sfx2/source/view/frame.cxx:138:37
>  #49 in SfxBaseController::dispose() at sfx2/source/view/sfxbasecontroller.cxx:928:27
>  #50 in (anonymous namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at framework/source/services/frame.cxx:1495:33
>  #51 in (anonymous namespace)::XFrameImpl::close(unsigned char) at framework/source/services/frame.cxx:1706:12
>  #52 in SfxFrame::DoClose() at sfx2/source/view/frame.cxx:104:29
>  #53 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) at sfx2/source/view/viewfrm.cxx:1778:28
>  #54 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:40:24
>  #55 in (anonymous namespace)::SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) at sfx2/source/doc/objxtor.cxx:147:12
>  #56 in SfxBaseModel::close(unsigned char) at sfx2/source/doc/sfxbasemodel.cxx:1516:40
>  #57 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:750:13
>  #58 in ScTiledRenderingTest::tearDown() at sc/qa/unit/tiledrendering/tiledrendering.cxx:140:22

The fix appears to be to just not call back into the in-destruction FmFormView -
... - SdrMarkView - ... - SdrPaintView - ... deep-inheritance object, by not
initiating any further triggerLazyInvalidate from within
~ObjectContactOfPageView.

Change-Id: If5e49e4ebdbbf18d38e89c6b28ff3577224080a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164024
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Feb 28, 2024
`Window::dispose` takes care of disposing its
accessible as well.

However, `VCLXWindow::dispose` was explicitly unsetting
the accessible before disposing its `vcl::Window`, resulting
in it not getting disposed, in turn resulting in a crash on exit
for the tdf#159735 case.

Potentially related:

    commit 5aa60be
    Date:   Wed May 12 11:33:06 2021 +0200

        fix leak in VCLXWindow

        which is a little tricky because dispose() can be called from either
        side (vcl::Window or VCLXWindow)

Before that commit, setting a nullptr accessible happened
in the `VCLXWindow` dtor, which is meant to get called after
the `vcl::Window` got disposed in `VCLXWindow::dispose`.
(In the Linux bibisect repo, the commit before that one is fine
and at that commit, the tdf#159735 comment 5 scenario even
crashes in step 3 already.)

Don't unset the `vcl::Window`'s accessible any more in
`VCLXWindow::dispose`, but do that after disposing it in
`vcl::Window::dispose` instead, which seems to be the
natural place to do that anyway.

Backtrace of crash:

    Thread 1 received signal SIGSEGV, Segmentation fault.
    0x00007fd754ae6fe9 in comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>::disposeAndClear (this=0x7ffccdc2b5b8, rGuard=..., rEvt=...) at include/comphelper/interfacecontainer4.hxx:397
    397                     aIt.next()->disposing(rEvt);
    (gdb) bt
    #0  0x00007fd754ae6fe9 in comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>::disposeAndClear(std::unique_lock<std::mutex>&, com::sun::star::lang::EventObject const&)
        (this=0x7ffccdc2b5b8, rGuard=..., rEvt=...) at include/comphelper/interfacecontainer4.hxx:397
    #1  0x00007fd754ae6014 in comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing(unsigned int, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&)
        (_nClient=28, _rxEventSource=uno::Reference to (accessibility::AccessibleListBox *) 0x55bf49c0ad00) at .../libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:204
    #2  0x00007fd754ae1424 in comphelper::OCommonAccessibleComponent::disposing() (this=0x55bf49c0ad00) at .../libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:61
    #3  0x00007fd74e884512 in VCLXAccessibleComponent::disposing() (this=0x55bf49c0ad00) at .../libreoffice/toolkit/source/awt/vclxaccessiblecomponent.cxx:376
    #4  0x00007fd6a3d506b7 in accessibility::AccessibleListBox::disposing() (this=0x55bf49c0ad00) at .../libreoffice/accessibility/source/extended/accessiblelistbox.cxx:246
    #5  0x00007fd75453f544 in cppu::WeakComponentImplHelperBase::dispose() (this=0x55bf49c0ad00) at .../libreoffice/cppuhelper/source/implbase.cxx:104
    #6  0x00007fd6a3d45fd5 in cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext2, com::sun::star::accessibility::XAccessibleEventBroadcaster>::dispose() (this=0x55bf49c0ad00)
        at include/cppuhelper/compbase.hxx:90
    #7  0x00007fd75453f1fe in cppu::WeakComponentImplHelperBase::release() (this=0x55bf49c0ad00) at .../libreoffice/cppuhelper/source/implbase.cxx:79
    #8  0x00007fd6a3d47d85 in cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext2, com::sun::star::accessibility::XAccessibleEventBroadcaster>::release() (this=0x55bf49c0ad00)
        at include/cppuhelper/compbase.hxx:86
    #9  0x00007fd6a3d47ca5 in cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleExtendedComponent>::release() (this=0x55bf49c0ad00) at include/cppuhelper/implbase.hxx:171
    #10 0x00007fd6a3d47c85 in cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper, com::sun::star::lang::XServiceInfo>::release() (this=0x55bf49c0ad00) at include/cppuhelper/implbase.hxx:171
    #11 0x00007fd6a3d45f55 in cppu::ImplInheritanceHelper<VCLXAccessibleComponent, com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleSelection>::release() (this=0x55bf49c0ad00)
        at include/cppuhelper/implbase.hxx:171
    #12 0x00007fd74282e13e in com::sun::star::uno::Reference<com::sun::star::uno::XInterface>::~Reference() (this=0x55bf49c0e860) at include/com/sun/star/uno/Reference.hxx:114
    #13 0x00007fd7428524c5 in std::destroy_at<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> >(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*) (__location=0x55bf49c0e860)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:88
    #14 0x00007fd7428524a5 in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> >(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*) (__pointer=0x55bf49c0e860)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:149
    #15 0x00007fd742852477 in std::_Destroy_aux<false>::__destroy<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*>(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*) (__first=0x55bf49c0e860, __last=0x55bf49c0e868) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:163
    #16 0x00007fd74285243d in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*>(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*) (__first=0x55bf49c0e860, __last=0x55bf49c0e868) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:195
    #17 0x00007fd742852379 in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> >(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*, std::allocator<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> >&) (__first=0x55bf49c0e860, __last=0x55bf49c0e868)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:948
    #18 std::__cxx1998::vector<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>, std::allocator<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> > >::~vector() (this=0x55bf4d1120f8)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:732
    #19 0x00007fd74285231d in std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>, std::allocator<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> > >::~vector() (this=0x55bf4d1120e0)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/debug/vector:230
    #20 0x00007fd7428522f5 in o3tl::sorted_vector<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>, std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> >, o3tl::find_unique>::~sorted_vector()
        (this=0x55bf4d1120e0) at include/o3tl/sorted_vector.hxx:47
    #21 0x00007fd74284f83d in DocumentFocusListener::~DocumentFocusListener() (this=0x55bf4d1120b0) at vcl/inc/unx/gtk/gtkdata.hxx:221
    #22 0x00007fd74284f869 in DocumentFocusListener::~DocumentFocusListener() (this=0x55bf4d1120b0) at vcl/inc/unx/gtk/gtkdata.hxx:221
    #23 0x00007fd7546453a0 in cppu::OWeakObject::release() (this=0x55bf4d1120b0) at .../libreoffice/cppuhelper/source/weak.cxx:230
    #24 0x00007fd742834415 in cppu::WeakImplHelper<com::sun::star::accessibility::XAccessibleEventListener>::release() (this=0x55bf4d1120b0) at include/cppuhelper/implbase.hxx:115
    #25 0x00007fd754aec91e in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>::~Reference() (this=0x55bf4896c088) at include/com/sun/star/uno/Reference.hxx:114
    #26 0x00007fd754aec8e5 in std::destroy_at<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*)
        (__location=0x55bf4896c088) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:88
    #27 0x00007fd754aec8c5 in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*)
        (__pointer=0x55bf4896c088) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:149
    #28 0x00007fd754aec897 in std::_Destroy_aux<false>::__destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*>(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*) (__first=0x55bf4896c088, __last=0x55bf4896c090)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:163
    #29 0x00007fd754aec85d in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*>(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*) (__first=0x55bf4896c080, __last=0x55bf4896c090) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:195
    #30 0x00007fd754aec799 in std::_Destroy<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>*, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> >&) (__first=0x55bf4896c080, __last=0x55bf4896c090) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:948
    --Type <RET> for more, q to quit, c to continue without paging--
    #31 std::__cxx1998::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >::~vector()
        (this=0x55bf49866bc8) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:732
    #32 0x00007fd754aec73d in std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >::~vector() (this=0x55bf49866bb0) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/debug/vector:230
    #33 0x00007fd754aec715 in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::impl_t::~impl_t() (this=0x55bf49866bb0) at include/o3tl/cow_wrapper.hxx:176
    #34 0x00007fd754aec6e4 in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::release() (this=0x55bf49b28380) at include/o3tl/cow_wrapper.hxx:207
    #35 0x00007fd754aec675 in o3tl::cow_wrapper<std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener>, std::allocator<com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEventListener> > >, o3tl::ThreadSafeRefCountingPolicy>::~cow_wrapper() (this=0x55bf49b28380) at include/o3tl/cow_wrapper.hxx:271
    #36 0x00007fd754ae6ae5 in comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>::~OInterfaceContainerHelper4() (this=0x55bf49b28380) at include/comphelper/interfacecontainer4.hxx:126
    #37 0x00007fd754ae7c49 in std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >::~pair() (this=0x55bf49b28378)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_pair.h:187
    #38 0x00007fd754ae7c25 in std::destroy_at<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >(std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >*) (__location=0x55bf49b28378) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:88
    #39 0x00007fd754ae7b4b in std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::destroy<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >(std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> >&, std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >*)
        (__a=..., __p=0x55bf49b28378) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:560
    #40 std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false>*)
        (this=0x7fd754d2aaa8 <(anonymous namespace)::gaClients+40>, __n=0x55bf49b28370) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable_policy.h:2011
    #41 0x00007fd754ae7ab5 in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false> > >::_M_deallocate_nodes(std::__detail::_Hash_node<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, false>*)
        (this=0x7fd754d2aaa8 <(anonymous namespace)::gaClients+40>, __n=0x0) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable_policy.h:2033
    #42 0x00007fd754ae79df in std::_Hashtable<unsigned int, std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> >, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::clear() (this=0x7fd754d2aaa8 <(anonymous namespace)::gaClients+40>)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable.h:2524
    #43 0x00007fd754af6415 in std::__cxx1998::unordered_map<unsigned int, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > > >::clear() (this=0x7fd754d2aaa8 <(anonymous namespace)::gaClients+40>)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unordered_map.h:798
    #44 0x00007fd754ae778d in std::__debug::unordered_map<unsigned int, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener>, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> > > >::clear() (this=0x7fd754d2aa80 <(anonymous namespace)::gaClients>)
        at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/debug/unordered_map:234
    #45 0x00007fd754ae6640 in comphelper::AccessibleEventNotifier::shutdown() () at .../libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:268
    #46 0x00007fd74d3c5e41 in DeInitVCL() () at .../libreoffice/vcl/source/app/svmain.cxx:619
    #47 0x00007fd74d3c4031 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:254
    #48 0x00007fd74d3c5f79 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:261
    #49 0x00007fd7565a4ba3 in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:94
    #50 0x000055bf472e7a5d in sal_main () at .../libreoffice/desktop/source/app/main.c:51
    #51 0x000055bf472e7a37 in main (argc=3, argv=0x7ffccdc2c9a8) at .../libreoffice/desktop/source/app/main.c:49

Change-Id: I251b2f97184e0492f02eb772e5906847f9249506
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164090
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
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 <[email protected]>
(cherry picked from commit 71d1432)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181542
Reviewed-by: Michael Stahl <[email protected]>
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 <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Mar 27, 2025
...as seen during CppunitTest_xmloff_style,

> workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31: runtime error: applying zero offset to null pointer
>  #0 in tt_var_get_item_delta at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31
>  #1 in tt_hvadvance_adjust at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1242:13
>  #2 in tt_vadvance_adjust at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1278:12
>  #3 in tt_face_get_metrics at workdir/UnpackedTarball/freetype/src/sfnt/ttmtx.c:319:11
>  #4 in cff_slot_load at workdir/UnpackedTarball/freetype/src/cff/cffgload.c:660:11
>  #5 in cff_glyph_load at workdir/UnpackedTarball/freetype/src/cff/cffdrivr.c:192:13
>  #6 in FT_Load_Glyph at workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1066:15
>  #7 in _cairo_ft_scaled_glyph_load_glyph at workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2455:13
>  #8 in _cairo_ft_scaled_glyph_init at workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2640:11
>  #9 in _cairo_scaled_glyph_lookup at workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:3035:6
>  #10 in _cairo_scaled_font_glyph_device_extents at workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:2250:15
>  #11 in _cairo_composite_rectangles_init_for_glyphs at workdir/UnpackedTarball/cairo/src/cairo-composite-rectangles.c:476:14
>  #12 in _cairo_compositor_glyphs at workdir/UnpackedTarball/cairo/src/cairo-compositor.c:280:14
>  #13 in _cairo_image_surface_glyphs at workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:1030:12
>  #14 in _cairo_surface_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-surface.c:2920:15
>  #15 in _cairo_gstate_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-gstate.c:2077:15
>  #16 in _cairo_default_context_glyphs at workdir/UnpackedTarball/cairo/src/cairo-default-context.c:1334:12
>  #17 in cairo_show_glyphs at workdir/UnpackedTarball/cairo/src/cairo.c:3670:14
>  #18 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:477:9
>  #19 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:72:23
>  #20 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:171:18
>  #21 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:312:16
>  #22 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:463:9
>  #23 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, KernArraySpan, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:701:9
>  #24 in SwFntObj::DrawText(SwDrawTextInfo&) at sw/source/core/txtnode/fntcache.cxx:1490:31
>  #25 in SwSubFont::DrawText_(SwDrawTextInfo&, bool) at sw/source/core/txtnode/swfont.cxx:1144:24
>  #26 in SwFont::DrawText_(SwDrawTextInfo&) at sw/source/core/inc/swfont.hxx:324:29
>  #27 in SwTextPaintInfo::DrawText_(rtl::OUString const&, SwLinePortion const&, o3tl::strong_int<int, Tag_TextFrameIndex>, o3tl::strong_int<int, Tag_TextFrameIndex>, bool, bool, bool, bool) at sw/source/core/text/inftxt.cxx:730:21
>  #28 in SwTextPaintInfo::DrawText(SwLinePortion const&, o3tl::strong_int<int, Tag_TextFrameIndex>, bool) const at sw/source/core/text/inftxt.hxx:783:41
>  #29 in SwTextPortion::Paint(SwTextPaintInfo const&) const at sw/source/core/text/portxt.cxx:603:18
>  #30 in SwTextPainter::DrawTextLine(SwRect const&, SwSaveClip&, bool, std::optional<SwTaggedPDFHelper>&, std::optional<SwTaggedPDFHelper>&, bool) at sw/source/core/text/itrpaint.cxx:433:23
>  #31 in SwTextFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/text/frmpaint.cxx:787:23
>  #32 in SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:3804:21
>  #33 in SwFlyFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:4507:20
>  #34 in SwVirtFlyDrawObj::wrap_DoPaintObject(drawinglayer::geometry::ViewInformation2D const&) const at sw/source/core/draw/dflyobj.cxx:541:18
>  #35 in drawinglayer::primitive2d::(anonymous namespace)::SwVirtFlyDrawObjPrimitive::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at sw/source/core/draw/dflyobj.cxx:244:35
>  #36 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #37 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:397:13
>  #38 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:69:21
>  #39 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:284:31
>  #40 in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:120:21
>  #41 in SdrPageWindow::RedrawLayer(o3tl::strong_int<short, SdrLayerIDTag> const*, sdr::contact::ViewObjectContactRedirector*, basegfx::B2IRange const*) at svx/source/svdraw/sdrpagewindow.cxx:421:28
>  #42 in SdrPageView::DrawLayer(o3tl::strong_int<short, SdrLayerIDTag>, OutputDevice*, sdr::contact::ViewObjectContactRedirector*, tools::Rectangle const&, basegfx::B2IRange const*) at svx/source/svdraw/svdpagv.cxx:265:27
>  #43 in SwViewShellImp::PaintLayer(o3tl::strong_int<short, SdrLayerIDTag>, SwPageFrame const&, SwRect const&, Color const*, bool, sdr::contact::ViewObjectContactRedirector*) at sw/source/core/view/vdraw.cxx:139:20
>  #44 in SwRootFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:3527:33
>  #45 in SwViewShell::PrtOle2(SwDoc*, SwViewOption const*, SwPrintData const&, OutputDevice&, tools::Rectangle const&, bool) at sw/source/core/view/vprint.cxx:592:27
>  #46 in SwDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sw/source/uibase/app/docsh.cxx:881:5
>  #47 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #48 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #49 in SfxObjectShell::CreatePreview_Impl(bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:198:40
>  #50 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:110:9
>  #51 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:3850:31
>  #52 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:3808:33
>  #53 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1531:19
>  #54 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3117:39
>  #55 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:2907:9
>  #56 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:320:19
>  #57 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:3233:42
>  #58 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1815:13
>  #59 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:213:16
>  #60 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #61 in testWritingModeBTLR::TestBody() at xmloff/qa/unit/style.cxx:193:9

Change-Id: I54d4d90e203127e018b99c34785602ac3d96e425
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163925
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
(cherry picked from commit 9a8f4fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183333
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Miklos Vajna <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Mar 27, 2025
...as seen during CppunitTest_xmloff_style,

> workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31: runtime error: applying zero offset to null pointer
>  #0 in tt_var_get_item_delta at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31
>  #1 in tt_hvadvance_adjust at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1242:13
>  #2 in tt_vadvance_adjust at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1278:12
>  #3 in tt_face_get_metrics at workdir/UnpackedTarball/freetype/src/sfnt/ttmtx.c:319:11
>  #4 in cff_slot_load at workdir/UnpackedTarball/freetype/src/cff/cffgload.c:660:11
>  #5 in cff_glyph_load at workdir/UnpackedTarball/freetype/src/cff/cffdrivr.c:192:13
>  #6 in FT_Load_Glyph at workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1066:15
>  #7 in _cairo_ft_scaled_glyph_load_glyph at workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2455:13
>  #8 in _cairo_ft_scaled_glyph_init at workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2640:11
>  #9 in _cairo_scaled_glyph_lookup at workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:3035:6
>  #10 in _cairo_scaled_font_glyph_device_extents at workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:2250:15
>  #11 in _cairo_composite_rectangles_init_for_glyphs at workdir/UnpackedTarball/cairo/src/cairo-composite-rectangles.c:476:14
>  #12 in _cairo_compositor_glyphs at workdir/UnpackedTarball/cairo/src/cairo-compositor.c:280:14
>  #13 in _cairo_image_surface_glyphs at workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:1030:12
>  #14 in _cairo_surface_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-surface.c:2920:15
>  #15 in _cairo_gstate_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-gstate.c:2077:15
>  #16 in _cairo_default_context_glyphs at workdir/UnpackedTarball/cairo/src/cairo-default-context.c:1334:12
>  #17 in cairo_show_glyphs at workdir/UnpackedTarball/cairo/src/cairo.c:3670:14
>  #18 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:477:9
>  #19 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:72:23
>  #20 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:171:18
>  #21 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:312:16
>  #22 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:463:9
>  #23 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, KernArraySpan, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:701:9
>  #24 in SwFntObj::DrawText(SwDrawTextInfo&) at sw/source/core/txtnode/fntcache.cxx:1490:31
>  #25 in SwSubFont::DrawText_(SwDrawTextInfo&, bool) at sw/source/core/txtnode/swfont.cxx:1144:24
>  #26 in SwFont::DrawText_(SwDrawTextInfo&) at sw/source/core/inc/swfont.hxx:324:29
>  #27 in SwTextPaintInfo::DrawText_(rtl::OUString const&, SwLinePortion const&, o3tl::strong_int<int, Tag_TextFrameIndex>, o3tl::strong_int<int, Tag_TextFrameIndex>, bool, bool, bool, bool) at sw/source/core/text/inftxt.cxx:730:21
>  #28 in SwTextPaintInfo::DrawText(SwLinePortion const&, o3tl::strong_int<int, Tag_TextFrameIndex>, bool) const at sw/source/core/text/inftxt.hxx:783:41
>  #29 in SwTextPortion::Paint(SwTextPaintInfo const&) const at sw/source/core/text/portxt.cxx:603:18
>  #30 in SwTextPainter::DrawTextLine(SwRect const&, SwSaveClip&, bool, std::optional<SwTaggedPDFHelper>&, std::optional<SwTaggedPDFHelper>&, bool) at sw/source/core/text/itrpaint.cxx:433:23
>  #31 in SwTextFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/text/frmpaint.cxx:787:23
>  #32 in SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:3804:21
>  #33 in SwFlyFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:4507:20
>  #34 in SwVirtFlyDrawObj::wrap_DoPaintObject(drawinglayer::geometry::ViewInformation2D const&) const at sw/source/core/draw/dflyobj.cxx:541:18
>  #35 in drawinglayer::primitive2d::(anonymous namespace)::SwVirtFlyDrawObjPrimitive::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at sw/source/core/draw/dflyobj.cxx:244:35
>  #36 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #37 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:397:13
>  #38 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:69:21
>  #39 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:284:31
>  #40 in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:120:21
>  #41 in SdrPageWindow::RedrawLayer(o3tl::strong_int<short, SdrLayerIDTag> const*, sdr::contact::ViewObjectContactRedirector*, basegfx::B2IRange const*) at svx/source/svdraw/sdrpagewindow.cxx:421:28
>  #42 in SdrPageView::DrawLayer(o3tl::strong_int<short, SdrLayerIDTag>, OutputDevice*, sdr::contact::ViewObjectContactRedirector*, tools::Rectangle const&, basegfx::B2IRange const*) at svx/source/svdraw/svdpagv.cxx:265:27
>  #43 in SwViewShellImp::PaintLayer(o3tl::strong_int<short, SdrLayerIDTag>, SwPageFrame const&, SwRect const&, Color const*, bool, sdr::contact::ViewObjectContactRedirector*) at sw/source/core/view/vdraw.cxx:139:20
>  #44 in SwRootFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:3527:33
>  #45 in SwViewShell::PrtOle2(SwDoc*, SwViewOption const*, SwPrintData const&, OutputDevice&, tools::Rectangle const&, bool) at sw/source/core/view/vprint.cxx:592:27
>  #46 in SwDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sw/source/uibase/app/docsh.cxx:881:5
>  #47 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #48 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #49 in SfxObjectShell::CreatePreview_Impl(bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:198:40
>  #50 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:110:9
>  #51 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:3850:31
>  #52 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:3808:33
>  #53 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1531:19
>  #54 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3117:39
>  #55 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:2907:9
>  #56 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:320:19
>  #57 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:3233:42
>  #58 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1815:13
>  #59 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:213:16
>  #60 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #61 in testWritingModeBTLR::TestBody() at xmloff/qa/unit/style.cxx:193:9

Change-Id: I54d4d90e203127e018b99c34785602ac3d96e425
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163925
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
(cherry picked from commit 9a8f4fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183333
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Miklos Vajna <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Mar 27, 2025
...as seen during CppunitTest_xmloff_style,

> workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31: runtime error: applying zero offset to null pointer
>  #0 in tt_var_get_item_delta at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31
>  #1 in tt_hvadvance_adjust at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1242:13
>  #2 in tt_vadvance_adjust at workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1278:12
>  #3 in tt_face_get_metrics at workdir/UnpackedTarball/freetype/src/sfnt/ttmtx.c:319:11
>  #4 in cff_slot_load at workdir/UnpackedTarball/freetype/src/cff/cffgload.c:660:11
>  #5 in cff_glyph_load at workdir/UnpackedTarball/freetype/src/cff/cffdrivr.c:192:13
>  #6 in FT_Load_Glyph at workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1066:15
>  #7 in _cairo_ft_scaled_glyph_load_glyph at workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2455:13
>  #8 in _cairo_ft_scaled_glyph_init at workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2640:11
>  #9 in _cairo_scaled_glyph_lookup at workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:3035:6
>  #10 in _cairo_scaled_font_glyph_device_extents at workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:2250:15
>  #11 in _cairo_composite_rectangles_init_for_glyphs at workdir/UnpackedTarball/cairo/src/cairo-composite-rectangles.c:476:14
>  #12 in _cairo_compositor_glyphs at workdir/UnpackedTarball/cairo/src/cairo-compositor.c:280:14
>  #13 in _cairo_image_surface_glyphs at workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:1030:12
>  #14 in _cairo_surface_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-surface.c:2920:15
>  #15 in _cairo_gstate_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-gstate.c:2077:15
>  #16 in _cairo_default_context_glyphs at workdir/UnpackedTarball/cairo/src/cairo-default-context.c:1334:12
>  #17 in cairo_show_glyphs at workdir/UnpackedTarball/cairo/src/cairo.c:3670:14
>  #18 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:477:9
>  #19 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:72:23
>  #20 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:171:18
>  #21 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:312:16
>  #22 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:463:9
>  #23 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, KernArraySpan, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:701:9
>  #24 in SwFntObj::DrawText(SwDrawTextInfo&) at sw/source/core/txtnode/fntcache.cxx:1490:31
>  #25 in SwSubFont::DrawText_(SwDrawTextInfo&, bool) at sw/source/core/txtnode/swfont.cxx:1144:24
>  #26 in SwFont::DrawText_(SwDrawTextInfo&) at sw/source/core/inc/swfont.hxx:324:29
>  #27 in SwTextPaintInfo::DrawText_(rtl::OUString const&, SwLinePortion const&, o3tl::strong_int<int, Tag_TextFrameIndex>, o3tl::strong_int<int, Tag_TextFrameIndex>, bool, bool, bool, bool) at sw/source/core/text/inftxt.cxx:730:21
>  #28 in SwTextPaintInfo::DrawText(SwLinePortion const&, o3tl::strong_int<int, Tag_TextFrameIndex>, bool) const at sw/source/core/text/inftxt.hxx:783:41
>  #29 in SwTextPortion::Paint(SwTextPaintInfo const&) const at sw/source/core/text/portxt.cxx:603:18
>  #30 in SwTextPainter::DrawTextLine(SwRect const&, SwSaveClip&, bool, std::optional<SwTaggedPDFHelper>&, std::optional<SwTaggedPDFHelper>&, bool) at sw/source/core/text/itrpaint.cxx:433:23
>  #31 in SwTextFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/text/frmpaint.cxx:787:23
>  #32 in SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:3804:21
>  #33 in SwFlyFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:4507:20
>  #34 in SwVirtFlyDrawObj::wrap_DoPaintObject(drawinglayer::geometry::ViewInformation2D const&) const at sw/source/core/draw/dflyobj.cxx:541:18
>  #35 in drawinglayer::primitive2d::(anonymous namespace)::SwVirtFlyDrawObjPrimitive::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at sw/source/core/draw/dflyobj.cxx:244:35
>  #36 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #37 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:397:13
>  #38 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:69:21
>  #39 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:284:31
>  #40 in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:120:21
>  #41 in SdrPageWindow::RedrawLayer(o3tl::strong_int<short, SdrLayerIDTag> const*, sdr::contact::ViewObjectContactRedirector*, basegfx::B2IRange const*) at svx/source/svdraw/sdrpagewindow.cxx:421:28
>  #42 in SdrPageView::DrawLayer(o3tl::strong_int<short, SdrLayerIDTag>, OutputDevice*, sdr::contact::ViewObjectContactRedirector*, tools::Rectangle const&, basegfx::B2IRange const*) at svx/source/svdraw/svdpagv.cxx:265:27
>  #43 in SwViewShellImp::PaintLayer(o3tl::strong_int<short, SdrLayerIDTag>, SwPageFrame const&, SwRect const&, Color const*, bool, sdr::contact::ViewObjectContactRedirector*) at sw/source/core/view/vdraw.cxx:139:20
>  #44 in SwRootFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at sw/source/core/layout/paintfrm.cxx:3527:33
>  #45 in SwViewShell::PrtOle2(SwDoc*, SwViewOption const*, SwPrintData const&, OutputDevice&, tools::Rectangle const&, bool) at sw/source/core/view/vprint.cxx:592:27
>  #46 in SwDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sw/source/uibase/app/docsh.cxx:881:5
>  #47 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #48 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #49 in SfxObjectShell::CreatePreview_Impl(bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:198:40
>  #50 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:110:9
>  #51 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:3850:31
>  #52 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:3808:33
>  #53 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1531:19
>  #54 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3117:39
>  #55 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:2907:9
>  #56 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:320:19
>  #57 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:3233:42
>  #58 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1815:13
>  #59 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:213:16
>  #60 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #61 in testWritingModeBTLR::TestBody() at xmloff/qa/unit/style.cxx:193:9

Change-Id: I54d4d90e203127e018b99c34785602ac3d96e425
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163925
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
(cherry picked from commit 9a8f4fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183333
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Miklos Vajna <[email protected]>
(cherry picked from commit dfea2cd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183367
Tested-by: Jenkins CollaboraOffice <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Apr 15, 2025
seen on jenkins, where it looks like things are destructing that need to be destructed while the solar mutex is held.

Thread 1 (Thread 0x7f41c94fc700 (LWP 2563514)):
  ^#0  0x00007f41e7b771cb in SfxItemPool::IsInRange(unsigned short) const (this=0x9999999999999999, nWhich=1077) at include/svl/itempool.hxx:332
  ^#1  0x00007f41e7b6cd84 in SfxItemPool::getTargetPool(unsigned short) const (this=0x9999999999999999, nWhich=1077) at svl/source/items/itempool.cxx:452
  ^#2  0x00007f41e7b6cdd7 in SfxItemPool::getTargetPool(unsigned short) const (this=0x53e0740, nWhich=1077) at svl/source/items/itempool.cxx:455
  ^#3  0x00007f41e7b6ce27 in SfxItemPool::CheckItemInfoFlag(unsigned short, unsigned short) const (this=0x53e0740, nWhich=1077, nMask=1) at svl/source/items/itempool.cxx:461
        pTarget = 0x7f41c94f7eb0
  ^#4  0x00007f41e7bd18a5 in SfxItemPool::NeedsSurrogateSupport(unsigned short) const (this=0x53e0740, nWhich=1077) at include/svl/itempool.hxx:344
  ^#5  0x00007f41e7bc407a in SfxItemSet::checkRemovePoolRegistration(SfxPoolItem const*) (this=0x6253bf0, pItem=0x6253dd0) at svl/source/items/itemset.cxx:382
  ^#6  0x00007f41e7bc3fc7 in SfxItemSet::ClearSingleItem_PrepareRemove(SfxPoolItem const*) (this=0x6253bf0, pItem=0x6253dd0) at svl/source/items/itemset.cxx:362
  ^#7  0x00007f41e7bc3bc0 in SfxItemSet::ClearAllItemsImpl() (this=0x6253bf0) at svl/source/items/itemset.cxx:441
        rCandidate = {first = 1077, second = 0x6253dd0}
        __range1 = std::__debug::unordered_map with 3 elements = {[1077] = 0x6253dd0, [4037] = 0x60b2e30, [1082] = 0x6253d70}
        __begin1 = {<std::__detail::_Node_iterator_base<std::pair<unsigned short const, SfxPoolItem const*>, false>> = {_M_cur = 0x6253e00}, <No data fields>}
        __end1 = {<std::__detail::_Node_iterator_base<std::pair<unsigned short const, SfxPoolItem const*>, false>> = {_M_cur = 0x0}, <No data fields>}
        nRetval = 0
  ^#8  0x00007f41e7bc389b in SfxItemSet::~SfxItemSet() (this=0x6253bf0) at svl/source/items/itemset.cxx:316
  ^#9  0x00007f41e5ff6ccc in std::_Optional_payload_base<SfxItemSet>::_M_destroy() (this=0x6253bf0) at /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/optional:287
  ^#10 0x00007f41e5ff6caa in std::_Optional_payload_base<SfxItemSet>::_M_reset() (this=0x6253bf0) at /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/optional:318
  ^#11 0x00007f41e5ff6db9 in std::_Optional_payload<SfxItemSet, false, false, false>::~_Optional_payload() (this=0x6253bf0) at /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/optional:439
  ^#12 0x00007f41e5ff6d95 in std::_Optional_base<SfxItemSet, false, false>::~_Optional_base() (this=0x6253bf0) at /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/optional:510
  ^#13 0x00007f41e5ff4025 in std::optional<SfxItemSet>::~optional() (this=0x6253bf0) at /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/optional:705
  ^#14 0x00007f41e62467eb in sdr::properties::DefaultProperties::~DefaultProperties() (this=0x6253be0) at svx/source/sdr/properties/defaultproperties.cxx:92
  ^#15 0x00007f41e625061d in sdr::properties::AttributeProperties::~AttributeProperties() (this=0x6253be0) at svx/source/sdr/properties/attributeproperties.cxx:219
  ^#16 0x00007f41e624a225 in sdr::properties::TextProperties::~TextProperties() (this=0x6253be0) at svx/source/sdr/properties/textproperties.cxx:78
  ^#17 0x00007f41e6241525 in sdr::properties::RectangleProperties::~RectangleProperties() (this=0x6253be0) at svx/source/sdr/properties/rectangleproperties.cxx:38
  ^#18 0x00007f41e6241569 in sdr::properties::RectangleProperties::~RectangleProperties() (this=0x6253be0) at svx/source/sdr/properties/rectangleproperties.cxx:37
  ^#19 0x00007f41e6429a1c in std::default_delete<sdr::properties::BaseProperties>::operator()(sdr::properties::BaseProperties*) const (this=0x6217e58, __ptr=0x6253be0) at /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/unique_ptr.h:95
  ^#20 0x00007f41e642995c in std::__uniq_ptr_impl<sdr::properties::BaseProperties, std::default_delete<sdr::properties::BaseProperties> >::reset(sdr::properties::BaseProperties*) (this=0x6217e58, __p=0x0) at /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/unique_ptr.h:203
        __old_p = 0x6253be0
  ^#21 0x00007f41e642612a in std::unique_ptr<sdr::properties::BaseProperties, std::default_delete<sdr::properties::BaseProperties> >::reset(sdr::properties::BaseProperties*) (this=0x6217e58, __p=0x0) at /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/unique_ptr.h:501
  ^#22 0x00007f41e6414094 in SdrObject::~SdrObject() (this=0x6217d00) at svx/source/svdraw/svdobj.cxx:461
        aList = std::__debug::vector of length 0, capacity 1
  ^#23 0x00007f41e64121d5 in SdrAttrObj::~SdrAttrObj() (this=0x6217d00) at svx/source/svdraw/svdoattr.cxx:42
  ^#24 0x00007f41e64bb91b in SdrTextObj::~SdrTextObj() (this=0x6217d00) at svx/source/svdraw/svdotext.cxx:203
  ^#25 0x00007f41e64b6c2f in SdrRectObj::~SdrRectObj() (this=0x6217d00) at svx/source/svdraw/svdorect.cxx:99
  ^#26 0x00007f41e6511024 in SdrUnoObj::~SdrUnoObj() (this=0x6217d00) at svx/source/svdraw/svdouno    m_xShapeAgg.clear();
.cxx:223
  ^#27 0x00007f41e5f56988 in FmFormObj::~FmFormObj() (this=0x6217d00) at svx/source/form/fmobj.cxx:119
  ^#28 0x00007f41e5f569d9 in FmFormObj::~FmFormObj() (this=0x6217d00) at svx/source/form/fmobj.cxx:112
  ^#29 0x00007f41e64145c6 in SdrObject::release() (this=0x6217d00) at svx/source/svdraw/svdobj.cxx:484
        x = 0
  ^#30 0x00007f41e62baf29 in rtl::Reference<SdrObject>::clear() (this=0x60e3e78) at include/rtl/ref.hxx:193
        pOld = 0x6217d00
  ^#31 0x00007f41e683ba73 in SvxShape::~SvxShape() (this=0x60e3ca8) at svx/source/unodraw/unoshape.cxx:197
        aGuard = {<osl::Guard<comphelper::SolarMutex>> = {pT = 0x1502140}, <No data fields>}
  ^#32 0x00007f41e685637a in SvxShapeText::~SvxShapeText() (this=0x60e3ca8) at svx/source/unodraw/unoshape.cxx:3852
  ^#33 0x00007f41e681ac5d in SvxShapeControl::~SvxShapeControl() (this=0x60e3ca0) at svx/source/unodraw/unoshap2.cxx:479
  ^#34 0x00007f41e681ace9 in SvxShapeControl::~SvxShapeControl() (this=0x60e3ca0) at svx/source/unodraw/unoshap2.cxx:478
  ^#35 0x00007f41ea9f7110 in cppu::OWeakObject::release() (this=0x60e3ca8) at cppuhelper/source/weak.cxx:230
  ^#36 0x00007f41ea9f7835 in cppu::OWeakAggObject::release() (this=0x60e3ca8) at cppuhelper/source/weak.cxx:292
        x = empty uno::Reference
  ^#37 0x00007f41e6731dd5 in cppu::WeakAggImplHelper12<com::sun::star::drawing::XShape, com::sun::star::lang::XComponent, com::sun::star::beans::XPropertySet, com::sun::star::beans::XMultiPropertySet, com::sun::star::beans::XPropertyState, com::sun::star::lang::XUnoTunnel, com::sun::star::container::XNamed, com::sun::star::drawing::XGluePointsSupplier, com::sun::star::container::XChild, com::sun::star::lang::XServiceInfo, com::sun::star::document::XActionLockable, com::sun::star::beans::XMultiPropertyStates>::release() (this=0x60e3ca8) at include/cppuhelper/implbase12.hxx:166
  ^#38 0x00007f41e6827885 in SvxShapeText::release() (this=0x60e3ca8) at include/svx/unoshape.hxx:358
  ^#39 0x00007f41e68270c9 in SvxShapeControl::release() (this=0x60e3ca0) at include/svx/unoshape.hxx:533
  ^#40 0x00007f41cbdb121e in com::sun::star::uno::Reference<com::sun::star::uno::XAggregation>::~Reference() (this=0x60b39a0) at include/com/sun/star/uno/Reference.hxx:114
  ^#41 0x00007f41cbd9f601 in SwXShape::~SwXShape() (this=0x60b3940) at sw/source/core/unocore/unodraw.cxx:974
        aGuard = {<osl::Guard<comphelper::SolarMutex>> = {pT = 0x1502140}, <No data fields>}
  ^#42 0x00007f41cbd9f699 in SwXShape::~SwXShape() (this=0x60b3940) at sw/source/core/unocore/unodraw.cxx:963
  ^#43 0x00007f41ea9f7110 in cppu::OWeakObject::release() (this=0x60b3940) at cppuhelper/source/weak.cxx:230
  ^#44 0x00007f41cbdb3485 in cppu::WeakImplHelper<com::sun::star::beans::XPropertySet, com::sun::star::beans::XPropertyState, com::sun::star::text::XTextContent, com::sun::star::lang::XServiceInfo, com::sun::star::lang::XUnoTunnel, com::sun::star::drawing::XShape>::release() (this=0x60b3940) at include/cppuhelper/implbase.hxx:115
  ^#45 0x00007f41d2748b6d in bridges::cpp_uno::shared::freeUnoInterfaceProxy(uno_ExtEnvironment*, void*) (pEnv=0x26d0dc0, pProxy=0x610fed0) at bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:42

Change-Id: Id129278ad720095d2ed77271ac2d47ba82ec32c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184199
Reviewed-by: Noel Grandin <[email protected]>
Tested-by: Jenkins
tdf-gerrit pushed a commit that referenced this pull request May 2, 2025
QWidgets may only be created in the GUI/main thread, and
that is what happens when processing the .ui file.

Therefore, ensure this is always run in the main thread.

One case observed where this was not the case was the crash
recovery dialog getting created after Impress had crashed
due to an assert being hit somewhere in the QtMultimedia
library in a non-main thread.

Backtrace:

    (gdb) bt
    #0  __GI_abort () at ./stdlib/abort.c:91
    #1  0x00007fe93850641d in qAbort () at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:46
    #2  0x00007fe93854dd9a in qt_maybe_message_fatal<QString&> (msgType=QtFatalMsg, context=..., message=...) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:2140
    #3  0x00007fe938547004 in qt_message (msgType=QtFatalMsg, context=..., msg=0x7fe938ca8ed3 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0x7fe8e27d6f30)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:412
    #4  0x00007fe93854934d in QMessageLogger::fatal (this=0x7fe8e27d70d0, msg=0x7fe938ca8ed3 "ASSERT failure in %s: \"%s\", file %s, line %d") at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:901
    #5  0x00007fe9385064d3 in qt_assert_x
        (where=0x7fe936e5576a "QWidget", what=0x7fe936e5580b "Widgets must be created in the GUI thread.", file=0x7fe936e556b4 "/home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp", line=945)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:115
    #6  0x00007fe93668477d in QWidgetPrivate::init (this=0x7fe88c19c3f0, parentWidget=0x0, f=...) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:944
    #7  0x00007fe9366845e6 in QWidget::QWidget (this=0x7fe88c003370, dd=..., parent=0x0, f=...) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:862
    #8  0x00007fe936a92cb5 in QDialog::QDialog (this=0x7fe88c003370, parent=0x0, f=...) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:375
    #9  0x00007fe93955ed73 in QtBuilder::makeObject (this=0x7fe88c0049f0, pParent=0x0, sName=u"GtkDialog", sType="", sID="DocRecoverySaveDialog", rMap=std::__debug::map with 7 elements = {...}) at vcl/qt6/../qt5/QtBuilder.cxx:213
    #10 0x00007fe93955e1a4 in QtBuilder::insertObject (this=0x7fe88c0049f0, pParent=0x0, rClass="GtkDialog", sType="", rID="DocRecoverySaveDialog", rProps=std::__debug::map with 7 elements = {...}) at vcl/qt6/../qt5/QtBuilder.cxx:109
    #11 0x00007fe9395742e5 in WidgetBuilder<QObject, QObject*, QMenu, QMenu*>::handleObject (this=0x7fe88c0049f0, pParent=0x0, pAtkProps=0x0, reader=..., sType="", sInternalChild="", bToolbarItem=false) at include/vcl/widgetbuilder.hxx:234
    #12 0x00007fe939572c16 in WidgetBuilder<QObject, QObject*, QMenu, QMenu*>::handleChild (this=0x7fe88c0049f0, pParent=0x0, pAtkProps=0x0, reader=..., bToolbarItem=false) at include/vcl/widgetbuilder.hxx:131
    #13 0x00007fe939566468 in WidgetBuilder<QObject, QObject*, QMenu, QMenu*>::processUIFile (this=0x7fe88c0049f0, pParent=0x0) at include/vcl/widgetbuilder.hxx:70
    #14 0x00007fe93955da70 in QtBuilder::QtBuilder (this=0x7fe88c0049f0, pParent=0x0, sUIRoot=u"file:///home/michi/development/git/libreoffice/instdir/program/../share/config/soffice.cfg/", rUIFile="svx/ui/docrecoverysavedialog.ui")
        at vcl/qt6/../qt5/QtBuilder.cxx:66
    #15 0x00007fe9396117a7 in std::make_unique<QtBuilder, QWidget*&, std::basic_string_view<char16_t, std::char_traits<char16_t> >&, rtl::OUString const&>
        (__args=@0x7fe8e27d91a0: 0x0, __args=u"file:///home/michi/development/git/libreoffice/instdir/program/../share/config/soffice.cfg/", __args="svx/ui/docrecoverysavedialog.ui")
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:1077
    #16 0x00007fe93960ed69 in QtInstanceBuilder::QtInstanceBuilder
        (this=0x7fe88c0db2d0, pParent=0x0, sUIRoot=u"file:///home/michi/development/git/libreoffice/instdir/program/../share/config/soffice.cfg/", rUIFile="svx/ui/docrecoverysavedialog.ui") at vcl/qt6/../qt5/QtInstanceBuilder.cxx:52
    #17 0x00007fe9395f55a8 in std::make_unique<QtInstanceBuilder, QWidget*&, rtl::OUString const&, rtl::OUString const&>
        (__args=@0x7fe8e27d92a0: 0x0, __args="file:///home/michi/development/git/libreoffice/instdir/program/../share/config/soffice.cfg/", __args="svx/ui/docrecoverysavedialog.ui")
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:1077
    #18 0x00007fe9395ef490 in QtInstance::CreateBuilder (this=0x56149a5271a0, pParent=0x0, rUIRoot="file:///home/michi/development/git/libreoffice/instdir/program/../share/config/soffice.cfg/", rUIFile="svx/ui/docrecoverysavedialog.ui")
        at vcl/qt6/../qt5/QtInstance.cxx:916
    #19 0x00007fe9395ef52c in non-virtual thunk to QtInstance::CreateBuilder(weld::Widget*, rtl::OUString const&, rtl::OUString const&) () at /home/michi/development/git/libreoffice/instdir/program/libvclplug_qt6lo.so
    #20 0x00007fe94160079f in Application::CreateBuilder (pParent=0x0, rUIFile="svx/ui/docrecoverysavedialog.ui", bMobile=false, nLOKWindowId=0) at /home/michi/development/git/libreoffice/vcl/source/window/builder.cxx:204
    #21 0x00007fe94208901d in weld::GenericDialogController::GenericDialogController (this=0x7fe88c0095a0, pParent=0x0, rUIFile="svx/ui/docrecoverysavedialog.ui", rDialogId="DocRecoverySaveDialog", bMobile=false)
        at /home/michi/development/git/libreoffice/vcl/source/app/weldutils.cxx:53
    #22 0x00007fe945a1f83d in svx::DocRecovery::SaveDialog::SaveDialog (this=0x7fe88c0095a0, pParent=0x0, pCore=0x7fe88c0dafe0) at /home/michi/development/git/libreoffice/svx/source/dialog/docrecovery.cxx:574
    #23 0x00007fe945a35e25 in (anonymous namespace)::RecoveryUI::impl_doEmergencySave (this=0x7fe88c0d4010) at /home/michi/development/git/libreoffice/svx/source/unodraw/recoveryui.cxx:254
    #24 0x00007fe945a35b03 in (anonymous namespace)::RecoveryUI::dispatchWithReturnValue (this=0x7fe88c0d4010, aURL=...) at /home/michi/development/git/libreoffice/svx/source/unodraw/recoveryui.cxx:148
    #25 0x00007fe945a35ca4 in non-virtual thunk to (anonymous namespace)::RecoveryUI::dispatchWithReturnValue(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
        at /home/michi/development/git/libreoffice/instdir/program/libsvxlo.so
    #26 0x00007fe94af24c4f in desktop::(anonymous namespace)::impl_callRecoveryUI (bEmergencySave=true, bExistsRecoveryData=false) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1057
    #27 0x00007fe94af248a1 in desktop::Desktop::Exception (this=0x7ffc5c0f5540, nCategory=ExceptionCategory::System) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1212
    #28 0x00007fe9420667fa in VCLExceptionSignal_impl (pInfo=0x7fe8e27d9d88) at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:178
    #29 0x00007fe94b2484aa in callSignalHandler (pInfo=0x7fe8e27d9d88) at /home/michi/development/git/libreoffice/sal/osl/all/signalshared.cxx:47
    #30 0x00007fe94b2dc3d3 in (anonymous namespace)::signalHandlerFunction (signal=6, info=0x7fe8e27d9fb0, context=0x7fe8e27d9e80) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:423
    #31 0x00007fe94ac49df0 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
    #32 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #33 0x00007fe94ac9e9ff in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
    #34 0x00007fe94ac49cc2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #35 0x00007fe94ac324ac in __GI_abort () at ./stdlib/abort.c:73
    #36 0x00007fe93850641d in qAbort () at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:46
    #37 0x00007fe93854dd9a in qt_maybe_message_fatal<QString&> (msgType=QtFatalMsg, context=..., message=...) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:2140
    #38 0x00007fe938547004 in qt_message (msgType=QtFatalMsg, context=..., msg=0x7fe938ca8eb2 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fe8e27dae30) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:412
    #39 0x00007fe93854934d in QMessageLogger::fatal (this=0x7fe8e27dafd8, msg=0x7fe938ca8eb2 "ASSERT: \"%s\" in file %s, line %d") at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:901
    #40 0x00007fe93850646b in qt_assert (assertion=0x7fe935abd3d7 "subject == PW_ID_CORE", file=0x7fe935abcca8 "/home/michi/development/git/qt5/qtmultimedia/src/multimedia/pipewire/qpipewire_audiocontextmanager.cpp", line=267)
        at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:106
    #41 0x00007fe9359e3b3c in QtPipeWire::QAudioContextManager::startListenDefaultMetadata(QtPipeWire::StrongIdType<unsigned int, QtPipeWire::ObjectIdTag>, unsigned int)::$_0::operator()(void*, unsigned int, char const*, char const*, char const*) const
        (this=0x7fe8e27db0c7, data=0x7fe935c05d10 <QGlobalStatic<QtGlobalStatic::Holder<QtPipeWire::(anonymous namespace)::Q_QGS_s_audioContextInstance> >::instance()::holder>, subject=113, key=0x5614a39ce960 "target.node", type=0x5614a39ce978 "Spa:Id", value=0x5614a39ce988 "-1") at /home/michi/development/git/qt5/qtmultimedia/src/multimedia/pipewire/qpipewire_audiocontextmanager.cpp:267
    #42 0x00007fe9359e2ce8 in QtPipeWire::QAudioContextManager::startListenDefaultMetadata(QtPipeWire::StrongIdType<unsigned int, QtPipeWire::ObjectIdTag>, unsigned int)::$_0::__invoke(void*, unsigned int, char const*, char const*, char const*)
        (data=0x7fe935c05d10 <QGlobalStatic<QtGlobalStatic::Holder<QtPipeWire::(anonymous namespace)::Q_QGS_s_audioContextInstance> >::instance()::holder>, subject=113, key=0x5614a39ce960 "target.node", type=0x5614a39ce978 "Spa:Id", value=0x5614a39ce988 "-1") at /home/michi/development/git/qt5/qtmultimedia/src/multimedia/pipewire/qpipewire_audiocontextmanager.cpp:265
    #43 0x00007fe8f1574054 in ??? () at /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-metadata.so
    #44 0x00007fe8f0d61671 in ??? () at /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-protocol-native.so
    #45 0x00007fe8f0d61e08 in ??? () at /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-protocol-native.so
    #46 0x00007fe8f2dd5c46 in ??? () at /usr/lib/x86_64-linux-gnu/spa-0.2/support/libspa-support.so
    #47 0x00007fe935347b55 in ??? () at /lib/x86_64-linux-gnu/libpipewire-0.3.so.0
    #48 0x00007fe94ac9cb7b in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:448
    #49 0x00007fe94ad1a7b8 in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Change-Id: I5f9f1f82d8ca76a50872d0b81b67059f78d413fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184896
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request May 10, 2025
Ensure that the QMimeData subclass set for the QDrag used
for drag and drop reports at least one supported MIME type.
Report a dummy "application/x.libreoffice-internal-drag-and-drop"
one if there is no other one.
(The string used for the MIME type is of no particular meaning,
any value would do.)

This prevents the issue seen with qt6 on Wayland that a
drag and drop operation is cancelled when no formats/MIME types
are reported.

The "wl_data_offer" Wayland protocol [1] is probably relevant
here:

> A wl_data_offer represents a piece of data offered for transfer by
> another client (the source client). It is used by the copy-and-paste and
> drag-and-drop mechanisms. The offer describes the different mime types
> that the data can be converted to and provides the mechanism for
> transferring the data directly from the source client.
>
> (...)
>
> For objects of version 3 or newer, this request determines the final
> result of the drag-and-drop operation. If the end result is that no mime
> types were accepted, the drag-and-drop operation will be cancelled and
> the corresponding drag source will receive wl_data_source.cancelled.

(Further analysis on Qt and Wayland library/protocol level
might give more insights, but this is sufficient at least for now.)

Example backtrace for how QtWaylandClient::QWaylandDrag::cancel
(in Qt's qtwayland module) got called previously when releasing
the mouse after dragging a slide to a different position in
the Impress slide sorter (on Debian testing in a Plasma Wayland
session, kwin-wayland 4:6.3.4-3, Qt self-compiled from git dev):

    Thread 1 "soffice.bin" hit Breakpoint 1, QtWaylandClient::QWaylandDrag::cancel (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:49
    49          QBasicDrag::cancel();
    (gdb) bt
    #0  QtWaylandClient::QWaylandDrag::cancel (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:49
    #1  0x00007fffe479434b in QBasicDrag::eventFilter (this=0x5555555d44d0, o=0x55555e78fb80, e=0x7fffffff3c70) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qsimpledrag.cpp:109
    #2  0x00007fffdf182bb5 in QtWaylandClient::QWaylandDrag::finishDrag (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:101
    #3  0x00007fffdf17752e in QtWaylandClient::QWaylandDataDevice::dragSourceCancelled (this=0x5555555dfb60) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddatadevice.cpp:316
    #4  0x00007fffdf179ff5 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}::operator()() const (this=0x7fffffff3d70) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #5  0x00007fffdf179f1d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}&&) (args=0x7fffffff40a0, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #6  0x00007fffdf179e3f in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)
        (f=(void (QtWaylandClient::QWaylandDataDevice::*)(QtWaylandClient::QWaylandDataDevice * const)) 0x7fffdf177500 <QtWaylandClient::QWaylandDataDevice::dragSourceCancelled()>, o=0x5555555dfb60, arg=0x7fffffff40a0)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #7  0x00007fffdf179db1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDataDevice::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)
        (f=(void (QtWaylandClient::QWaylandDataDevice::*)(QtWaylandClient::QWaylandDataDevice * const)) 0x7fffdf177500 <QtWaylandClient::QWaylandDataDevice::dragSourceCancelled()>, o=0x5555555dfb60, arg=0x7fffffff40a0)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #8  0x00007fffdf179cdb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDataDevice::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x55555e78e0a0, r=0x5555555dfb60, a=0x7fffffff40a0, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #9  0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x55555e78e0a0, r=0x5555555dfb60, a=0x7fffffff40a0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #10 0x00007fffe5329cd4 in doActivate<false> (sender=0x55555782a110, signal_index=3, argv=0x7fffffff40a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4241
    #11 0x00007fffe531fec3 in QMetaObject::activate (sender=0x55555782a110, m=0x7fffdf20cb10 <QtWaylandClient::QWaylandDataSource::staticMetaObject>, local_signal_index=0, argv=0x0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4301
    #12 0x00007fffdf180206 in QtWaylandClient::QWaylandDataSource::cancelled (this=0x55555782a110) at qtwayland/src/client/WaylandClient_autogen/include/moc_qwaylanddatasource_p.cpp:143
    #13 0x00007fffdf1801d9 in QtWaylandClient::QWaylandDataSource::data_source_cancelled (this=0x55555782a110) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddatasource.cpp:41
    #14 0x00007fffdf14e06e in QtWayland::wl_data_source::handle_cancelled (data=0x55555782a120, object=0x55555e75d680) at /home/michi/development/git/qt5/qtwayland/src/client/qwayland-wayland.cpp:770
    #15 0x00007ffff32986ce in ??? () at /lib/x86_64-linux-gnu/libffi.so.8
    #16 0x00007ffff329797e in ??? () at /lib/x86_64-linux-gnu/libffi.so.8
    #17 0x00007ffff32981ab in ffi_call () at /lib/x86_64-linux-gnu/libffi.so.8
    #18 0x00007fffe6953c91 in ??? () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #19 0x00007fffe694fc1f in ??? () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #20 0x00007fffe6950f13 in wl_display_dispatch_queue_pending () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #21 0x00007fffdf0c2fe2 in QtWaylandClient::EventThread::dispatchQueuePending (this=0x5555555e08c0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:228
    #22 0x00007fffdf0b9604 in QtWaylandClient::EventThread::readAndDispatchEvents (this=0x5555555e08c0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:113
    #23 0x00007fffdf0afd62 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555cd020) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:520
    #24 0x00007fffdf0cb1e5 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=0x7fffffff46b0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #25 0x00007fffdf0cb10d 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=0x7fffd0003c18, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #26 0x00007fffdf0cb02f 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::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0003c18)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #27 0x00007fffdf0cafa1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0003c18)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #28 0x00007fffdf0caecb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0003c18, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #29 0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0003c18) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #30 0x00007fffe53141cc in QMetaCallEvent::placeMetaCall (this=0x7fffd0003bd0, object=0x5555555cd020) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #31 0x00007fffe5315f21 in QObject::event (this=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #32 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #33 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #34 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555555cd020, event=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #35 0x00007fffe5251169 in QCoreApplication::sendEvent (receiver=0x5555555cd020, event=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1550
    #36 0x00007fffe52520a8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5555555a3f40) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1890
    #37 0x00007fffe5250fac in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1744
    #38 0x00007fffe5859481 in postEventSourceDispatch (s=0x5555555ca610) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #39 0x00007fffe9f04345 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #40 0x00007fffe9f06577 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #41 0x00007fffe9f06ce0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #42 0x00007fffe58586bb in QEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #43 0x00007fffe4989c18 in QPAEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #44 0x00007fffe526a690 in QEventLoop::processEvents (this=0x55555ea18e00, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:104
    #45 0x00007fffe526a8e3 in QEventLoop::exec (this=0x55555ea18e00, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:186
    #46 0x00007fffe4794d57 in QBasicDrag::drag (this=0x5555555d44d0, o=0x55555e762960) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qsimpledrag.cpp:176
    #47 0x00007fffe478a2e8 in QDragManager::drag (this=0x55555e78d700, o=0x55555e762960) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qdnd.cpp:81
    #48 0x00007fffe478addb in QDrag::exec (this=0x55555e762960, supportedActions=..., defaultDropAction=Qt::MoveAction) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qdrag.cpp:248
    #49 0x00007fffe6192d42 in QtDragSource::startDrag (this=0x555557046c00, sourceActions=3 '\003', rTrans=uno::Reference to (SdTransferable *) 0x55555a33bda8, rListener=uno::Reference to (SdTransferable *) 0x55555a33bdb8)
        at vcl/qt6/../qt5/QtDragAndDrop.cxx:54
    #50 0x00007fffe6192f10 in non-virtual thunk to QtDragSource::startDrag(com::sun::star::datatransfer::dnd::DragGestureEvent const&, signed char, int, int, com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> const&, com::sun::star::uno::Reference<com::sun::star::datatransfer::dnd::XDragSourceListener> const&) () at vcl/qt6/../qt5/QtDragAndDrop.cxx:76
    #51 0x00007fffee725518 in TransferableHelper::StartDrag (this=0x55555a33bd80, pWindow=0x55555a2528e0, nDnDSourceActions=3 '\003') at /home/michi/development/git/libreoffice/vcl/source/treelist/transfer.cxx:1050
    #52 0x00007fff9dbd7ff0 in sd::slidesorter::controller::Clipboard::CreateSlideTransferable (this=0x55555a22d1d0, pWindow=0x55555a2528e0, bDrag=true, bMergeMasterPagesOnly=false)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsClipboard.cxx:499
    #53 0x00007fff9dbd9489 in sd::slidesorter::controller::Clipboard::StartDrag (this=0x55555a22d1d0, rPosition=Point = {...}, pWindow=0x55555a2528e0)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsClipboard.cxx:596
    #54 0x00007fff9dc1b3ef in sd::slidesorter::SlideSorterViewShell::StartDrag (this=0x55555a21bdc0, rDragPt=Point = {...}, pWindow=0x55555a2528e0)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx:660
    #55 0x00007fff9dbf1366 in sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler::DragAndDropModeHandler
        (this=0x55555e20cd70, rSlideSorter=..., rSelectionFunction=..., rMousePosition=Point = {...}, pWindow=0x55555a2528e0) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:1396
    #56 0x00007fff9dbf124d in std::_Construct<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&>
        (__p=0x55555e20cd70, __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:119
    #57 0x00007fff9dbf0e5a in std::allocator_traits<std::allocator<void> >::construct<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (__p=0x55555e20cd70, __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/alloc_traits.h:706
    #58 std::_Sp_counted_ptr_inplace<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x55555e20cd60, __a=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:607
    #59 0x00007fff9dbf0c57 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff65a0, __p=@0x7fffffff6598: 0x0, __a=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:970
    #60 0x00007fff9dbf0b7a in std::__shared_ptr<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff6598, __tag=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1713
    #61 0x00007fff9dbf0af2 in std::shared_ptr<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler>::shared_ptr<std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff6598, __tag=..., __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:463
    #62 0x00007fff9dbee841 in std::make_shared<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&>
        (__args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:1007
    #63 0x00007fff9dbee754 in sd::slidesorter::controller::SelectionFunction::SwitchToDragAndDropMode (this=0x55555a323350, rMousePosition=Point = {...})
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:661
    #64 0x00007fff9dbef8da in sd::slidesorter::controller::SelectionFunction::ModeHandler::StartDrag (this=0x55555ea0d510, rMousePosition=Point = {...})
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:947
    #65 0x00007fff9dbf06d4 in sd::slidesorter::controller::(anonymous namespace)::NormalModeHandler::ProcessMotionEvent (this=0x55555ea0d510, rDescriptor=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:1102
    #66 0x00007fff9dbef62c in sd::slidesorter::controller::SelectionFunction::ModeHandler::ProcessEvent (this=0x55555ea0d510, rDescriptor=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:847
    #67 0x00007fff9dbee47e in sd::slidesorter::controller::SelectionFunction::ProcessEvent (this=0x55555a323350, rDescriptor=...) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:640
    #68 0x00007fff9dbecea8 in sd::slidesorter::controller::SelectionFunction::ProcessMouseEvent (this=0x55555a323350, nEventType=1024, rEvent=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:623
    #69 0x00007fff9dbecf42 in sd::slidesorter::controller::SelectionFunction::MouseMove (this=0x55555a323350, rEvent=...) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:335
    #70 0x00007fff9df19339 in sd::ViewShell::MouseMove (this=0x55555a21bdc0, rMEvt=..., pWin=0x55555a2528e0) at /home/michi/development/git/libreoffice/sd/source/ui/view/viewshel.cxx:700
    #71 0x00007fff9df01faa in sd::Window::MouseMove (this=0x55555a2528e0, rMEvt=...) at /home/michi/development/git/libreoffice/sd/source/ui/view/sdwindow.cxx:248
    #72 0x00007fffee462270 in ImplHandleMouseEvent (xWindow=..., nSVEvent=NotifyEventType::MOUSEMOVE, bMouseLeave=false, nX=117, nY=328, nMsgTime=16292359, nCode=1, nMode=MouseEventModifiers::DRAGMOVE)
        at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:693
    #73 0x00007fffee466675 in ImplHandleSalMouseMove (pWindow=0x555556e035d0, pEvent=0x7fffffff81b8) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2330
    #74 0x00007fffee465304 in ImplWindowFrameProc (_pWindow=0x555556e035d0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2663
    #75 0x00007fffe61cbdec in SalFrame::CallCallback (this=0x5555560402d0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at vcl/inc/salframe.hxx:310
    #76 0x00007fffe61c8a45 in QtFrame::CallCallback (this=0x5555560402c0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at vcl/inc/qt6/../qt5/QtFrame.hxx:235
    #77 0x00007fffe62fb633 in QtWidget::mouseMoveEvent (this=0x555556dfbdb0, pEvent=0x7fffffff9440) at vcl/qt6/../qt5/QtWidget.cxx:135
    #78 0x00007fffe32a2ae5 in QWidget::event (this=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8969
    #79 0x00007fffe62fd01a in QtWidget::event (this=0x555556dfbdb0, pEvent=0x7fffffff9440) at vcl/qt6/../qt5/QtWidget.cxx:513
    #80 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x555556dfbdb0, e=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #81 0x00007fffe31e4bf2 in QApplication::notify (this=0x55555556ea60, receiver=0x555556dfbdb0, e=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2788
    #82 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #83 0x00007fffe52511f9 in QCoreApplication::sendSpontaneousEvent (receiver=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1564
    #84 0x00007fffe31e3853 in QApplicationPrivate::sendMouseEvent
        (receiver=0x555556dfbdb0, event=0x7fffffff9440, alienWidget=0x555556dfbdb0, nativeWidget=0x555556df4450, buttonDown=0x7fffe3dd9488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
        at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2369
    #85 0x00007fffe32e2ad8 in QWidgetWindow::handleMouseEvent (this=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:669
    #86 0x00007fffe32e12f3 in QWidgetWindow::event (this=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292
    #87 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555575a7590, e=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #88 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555575a7590, e=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #89 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #90 0x00007fffe52511f9 in QCoreApplication::sendSpontaneousEvent (receiver=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1564
    #91 0x00007fffe408eb27 in QGuiApplicationPrivate::processMouseEvent (e=0x55555da09130) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2480
    #92 0x00007fffe408dc76 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x55555da09130) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2204
    #93 0x00007fffe417628d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
    #94 0x00007fffe417613e in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082
    #95 0x00007fffdf0afd75 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555cd020) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:521
    #96 0x00007fffdf0cb1e5 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=0x7fffffffaa20) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #97 0x00007fffdf0cb10d 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=0x7fffd0002f38, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #98 0x00007fffdf0cb02f 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::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0002f38)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #99 0x00007fffdf0cafa1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0002f38)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #100 0x00007fffdf0caecb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0002f38, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #101 0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0002f38) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #102 0x00007fffe53141cc in QMetaCallEvent::placeMetaCall (this=0x7fffd0002ef0, object=0x5555555cd020) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #103 0x00007fffe5315f21 in QObject::event (this=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #104 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #105 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #106 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555555cd020, event=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #107 0x00007fffe5251169 in QCoreApplication::sendEvent (receiver=0x5555555cd020, event=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1550
    #108 0x00007fffe52520a8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5555555a3f40) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1890
    #109 0x00007fffe5250fac in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1744
    #110 0x00007fffe5859481 in postEventSourceDispatch (s=0x5555555ca610) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #111 0x00007fffe9f04345 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #112 0x00007fffe9f06577 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #113 0x00007fffe9f06ce0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #114 0x00007fffe58586bb in QEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #115 0x00007fffe4989c18 in QPAEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #116 0x00007fffe61ea842 in QtInstance::ImplYield (this=0x5555555f9020, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:501
    #117 0x00007fffe61edb41 in QtInstance::DoYield (this=0x5555555f9020, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:512
    #118 0x00007fffeec40736 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #119 0x00007fffeec4004f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #120 0x00007fffeec3fe30 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #121 0x00007ffff7b28bb9 in desktop::Desktop::Main (this=0x7fffffffd650) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1680
    #122 0x00007fffeec61f76 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:231
    #123 0x00007fffeec63ba9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:249
    #124 0x00007ffff7ba306a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #125 0x00005555555559fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #126 0x00005555555559d7 in main (argc=1, argv=0x7fffffffd858) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

[1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_data_offer

Change-Id: I41476b2c9330a5a67e7663ac53a5ba57601c4b03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185136
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request May 14, 2025
Ensure that the QMimeData subclass set for the QDrag used
for drag and drop reports at least one supported MIME type.
Report a dummy "application/x.libreoffice-internal-drag-and-drop"
one if there is no other one.
(The string used for the MIME type is of no particular meaning,
any value would do.)

This prevents the issue seen with qt6 on Wayland that a
drag and drop operation is cancelled when no formats/MIME types
are reported.

The "wl_data_offer" Wayland protocol [1] is probably relevant
here:

> A wl_data_offer represents a piece of data offered for transfer by
> another client (the source client). It is used by the copy-and-paste and
> drag-and-drop mechanisms. The offer describes the different mime types
> that the data can be converted to and provides the mechanism for
> transferring the data directly from the source client.
>
> (...)
>
> For objects of version 3 or newer, this request determines the final
> result of the drag-and-drop operation. If the end result is that no mime
> types were accepted, the drag-and-drop operation will be cancelled and
> the corresponding drag source will receive wl_data_source.cancelled.

(Further analysis on Qt and Wayland library/protocol level
might give more insights, but this is sufficient at least for now.)

Example backtrace for how QtWaylandClient::QWaylandDrag::cancel
(in Qt's qtwayland module) got called previously when releasing
the mouse after dragging a slide to a different position in
the Impress slide sorter (on Debian testing in a Plasma Wayland
session, kwin-wayland 4:6.3.4-3, Qt self-compiled from git dev):

    Thread 1 "soffice.bin" hit Breakpoint 1, QtWaylandClient::QWaylandDrag::cancel (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:49
    49          QBasicDrag::cancel();
    (gdb) bt
    #0  QtWaylandClient::QWaylandDrag::cancel (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:49
    #1  0x00007fffe479434b in QBasicDrag::eventFilter (this=0x5555555d44d0, o=0x55555e78fb80, e=0x7fffffff3c70) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qsimpledrag.cpp:109
    #2  0x00007fffdf182bb5 in QtWaylandClient::QWaylandDrag::finishDrag (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:101
    #3  0x00007fffdf17752e in QtWaylandClient::QWaylandDataDevice::dragSourceCancelled (this=0x5555555dfb60) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddatadevice.cpp:316
    #4  0x00007fffdf179ff5 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}::operator()() const (this=0x7fffffff3d70) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #5  0x00007fffdf179f1d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}&&) (args=0x7fffffff40a0, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #6  0x00007fffdf179e3f in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)
        (f=(void (QtWaylandClient::QWaylandDataDevice::*)(QtWaylandClient::QWaylandDataDevice * const)) 0x7fffdf177500 <QtWaylandClient::QWaylandDataDevice::dragSourceCancelled()>, o=0x5555555dfb60, arg=0x7fffffff40a0)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #7  0x00007fffdf179db1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDataDevice::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)
        (f=(void (QtWaylandClient::QWaylandDataDevice::*)(QtWaylandClient::QWaylandDataDevice * const)) 0x7fffdf177500 <QtWaylandClient::QWaylandDataDevice::dragSourceCancelled()>, o=0x5555555dfb60, arg=0x7fffffff40a0)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #8  0x00007fffdf179cdb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDataDevice::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x55555e78e0a0, r=0x5555555dfb60, a=0x7fffffff40a0, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #9  0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x55555e78e0a0, r=0x5555555dfb60, a=0x7fffffff40a0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #10 0x00007fffe5329cd4 in doActivate<false> (sender=0x55555782a110, signal_index=3, argv=0x7fffffff40a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4241
    #11 0x00007fffe531fec3 in QMetaObject::activate (sender=0x55555782a110, m=0x7fffdf20cb10 <QtWaylandClient::QWaylandDataSource::staticMetaObject>, local_signal_index=0, argv=0x0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4301
    #12 0x00007fffdf180206 in QtWaylandClient::QWaylandDataSource::cancelled (this=0x55555782a110) at qtwayland/src/client/WaylandClient_autogen/include/moc_qwaylanddatasource_p.cpp:143
    #13 0x00007fffdf1801d9 in QtWaylandClient::QWaylandDataSource::data_source_cancelled (this=0x55555782a110) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddatasource.cpp:41
    #14 0x00007fffdf14e06e in QtWayland::wl_data_source::handle_cancelled (data=0x55555782a120, object=0x55555e75d680) at /home/michi/development/git/qt5/qtwayland/src/client/qwayland-wayland.cpp:770
    #15 0x00007ffff32986ce in ??? () at /lib/x86_64-linux-gnu/libffi.so.8
    #16 0x00007ffff329797e in ??? () at /lib/x86_64-linux-gnu/libffi.so.8
    #17 0x00007ffff32981ab in ffi_call () at /lib/x86_64-linux-gnu/libffi.so.8
    #18 0x00007fffe6953c91 in ??? () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #19 0x00007fffe694fc1f in ??? () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #20 0x00007fffe6950f13 in wl_display_dispatch_queue_pending () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #21 0x00007fffdf0c2fe2 in QtWaylandClient::EventThread::dispatchQueuePending (this=0x5555555e08c0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:228
    #22 0x00007fffdf0b9604 in QtWaylandClient::EventThread::readAndDispatchEvents (this=0x5555555e08c0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:113
    #23 0x00007fffdf0afd62 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555cd020) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:520
    #24 0x00007fffdf0cb1e5 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=0x7fffffff46b0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #25 0x00007fffdf0cb10d 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=0x7fffd0003c18, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #26 0x00007fffdf0cb02f 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::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0003c18)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #27 0x00007fffdf0cafa1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0003c18)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #28 0x00007fffdf0caecb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0003c18, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #29 0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0003c18) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #30 0x00007fffe53141cc in QMetaCallEvent::placeMetaCall (this=0x7fffd0003bd0, object=0x5555555cd020) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #31 0x00007fffe5315f21 in QObject::event (this=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #32 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #33 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #34 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555555cd020, event=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #35 0x00007fffe5251169 in QCoreApplication::sendEvent (receiver=0x5555555cd020, event=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1550
    #36 0x00007fffe52520a8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5555555a3f40) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1890
    #37 0x00007fffe5250fac in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1744
    #38 0x00007fffe5859481 in postEventSourceDispatch (s=0x5555555ca610) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #39 0x00007fffe9f04345 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #40 0x00007fffe9f06577 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #41 0x00007fffe9f06ce0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #42 0x00007fffe58586bb in QEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #43 0x00007fffe4989c18 in QPAEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #44 0x00007fffe526a690 in QEventLoop::processEvents (this=0x55555ea18e00, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:104
    #45 0x00007fffe526a8e3 in QEventLoop::exec (this=0x55555ea18e00, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:186
    #46 0x00007fffe4794d57 in QBasicDrag::drag (this=0x5555555d44d0, o=0x55555e762960) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qsimpledrag.cpp:176
    #47 0x00007fffe478a2e8 in QDragManager::drag (this=0x55555e78d700, o=0x55555e762960) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qdnd.cpp:81
    #48 0x00007fffe478addb in QDrag::exec (this=0x55555e762960, supportedActions=..., defaultDropAction=Qt::MoveAction) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qdrag.cpp:248
    #49 0x00007fffe6192d42 in QtDragSource::startDrag (this=0x555557046c00, sourceActions=3 '\003', rTrans=uno::Reference to (SdTransferable *) 0x55555a33bda8, rListener=uno::Reference to (SdTransferable *) 0x55555a33bdb8)
        at vcl/qt6/../qt5/QtDragAndDrop.cxx:54
    #50 0x00007fffe6192f10 in non-virtual thunk to QtDragSource::startDrag(com::sun::star::datatransfer::dnd::DragGestureEvent const&, signed char, int, int, com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> const&, com::sun::star::uno::Reference<com::sun::star::datatransfer::dnd::XDragSourceListener> const&) () at vcl/qt6/../qt5/QtDragAndDrop.cxx:76
    #51 0x00007fffee725518 in TransferableHelper::StartDrag (this=0x55555a33bd80, pWindow=0x55555a2528e0, nDnDSourceActions=3 '\003') at /home/michi/development/git/libreoffice/vcl/source/treelist/transfer.cxx:1050
    #52 0x00007fff9dbd7ff0 in sd::slidesorter::controller::Clipboard::CreateSlideTransferable (this=0x55555a22d1d0, pWindow=0x55555a2528e0, bDrag=true, bMergeMasterPagesOnly=false)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsClipboard.cxx:499
    #53 0x00007fff9dbd9489 in sd::slidesorter::controller::Clipboard::StartDrag (this=0x55555a22d1d0, rPosition=Point = {...}, pWindow=0x55555a2528e0)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsClipboard.cxx:596
    #54 0x00007fff9dc1b3ef in sd::slidesorter::SlideSorterViewShell::StartDrag (this=0x55555a21bdc0, rDragPt=Point = {...}, pWindow=0x55555a2528e0)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx:660
    #55 0x00007fff9dbf1366 in sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler::DragAndDropModeHandler
        (this=0x55555e20cd70, rSlideSorter=..., rSelectionFunction=..., rMousePosition=Point = {...}, pWindow=0x55555a2528e0) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:1396
    #56 0x00007fff9dbf124d in std::_Construct<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&>
        (__p=0x55555e20cd70, __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:119
    #57 0x00007fff9dbf0e5a in std::allocator_traits<std::allocator<void> >::construct<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (__p=0x55555e20cd70, __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/alloc_traits.h:706
    #58 std::_Sp_counted_ptr_inplace<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x55555e20cd60, __a=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:607
    #59 0x00007fff9dbf0c57 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff65a0, __p=@0x7fffffff6598: 0x0, __a=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:970
    #60 0x00007fff9dbf0b7a in std::__shared_ptr<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff6598, __tag=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1713
    #61 0x00007fff9dbf0af2 in std::shared_ptr<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler>::shared_ptr<std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff6598, __tag=..., __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:463
    #62 0x00007fff9dbee841 in std::make_shared<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&>
        (__args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:1007
    #63 0x00007fff9dbee754 in sd::slidesorter::controller::SelectionFunction::SwitchToDragAndDropMode (this=0x55555a323350, rMousePosition=Point = {...})
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:661
    #64 0x00007fff9dbef8da in sd::slidesorter::controller::SelectionFunction::ModeHandler::StartDrag (this=0x55555ea0d510, rMousePosition=Point = {...})
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:947
    #65 0x00007fff9dbf06d4 in sd::slidesorter::controller::(anonymous namespace)::NormalModeHandler::ProcessMotionEvent (this=0x55555ea0d510, rDescriptor=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:1102
    #66 0x00007fff9dbef62c in sd::slidesorter::controller::SelectionFunction::ModeHandler::ProcessEvent (this=0x55555ea0d510, rDescriptor=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:847
    #67 0x00007fff9dbee47e in sd::slidesorter::controller::SelectionFunction::ProcessEvent (this=0x55555a323350, rDescriptor=...) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:640
    #68 0x00007fff9dbecea8 in sd::slidesorter::controller::SelectionFunction::ProcessMouseEvent (this=0x55555a323350, nEventType=1024, rEvent=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:623
    #69 0x00007fff9dbecf42 in sd::slidesorter::controller::SelectionFunction::MouseMove (this=0x55555a323350, rEvent=...) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:335
    #70 0x00007fff9df19339 in sd::ViewShell::MouseMove (this=0x55555a21bdc0, rMEvt=..., pWin=0x55555a2528e0) at /home/michi/development/git/libreoffice/sd/source/ui/view/viewshel.cxx:700
    #71 0x00007fff9df01faa in sd::Window::MouseMove (this=0x55555a2528e0, rMEvt=...) at /home/michi/development/git/libreoffice/sd/source/ui/view/sdwindow.cxx:248
    #72 0x00007fffee462270 in ImplHandleMouseEvent (xWindow=..., nSVEvent=NotifyEventType::MOUSEMOVE, bMouseLeave=false, nX=117, nY=328, nMsgTime=16292359, nCode=1, nMode=MouseEventModifiers::DRAGMOVE)
        at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:693
    #73 0x00007fffee466675 in ImplHandleSalMouseMove (pWindow=0x555556e035d0, pEvent=0x7fffffff81b8) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2330
    #74 0x00007fffee465304 in ImplWindowFrameProc (_pWindow=0x555556e035d0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2663
    #75 0x00007fffe61cbdec in SalFrame::CallCallback (this=0x5555560402d0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at vcl/inc/salframe.hxx:310
    #76 0x00007fffe61c8a45 in QtFrame::CallCallback (this=0x5555560402c0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at vcl/inc/qt6/../qt5/QtFrame.hxx:235
    #77 0x00007fffe62fb633 in QtWidget::mouseMoveEvent (this=0x555556dfbdb0, pEvent=0x7fffffff9440) at vcl/qt6/../qt5/QtWidget.cxx:135
    #78 0x00007fffe32a2ae5 in QWidget::event (this=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8969
    #79 0x00007fffe62fd01a in QtWidget::event (this=0x555556dfbdb0, pEvent=0x7fffffff9440) at vcl/qt6/../qt5/QtWidget.cxx:513
    #80 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x555556dfbdb0, e=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #81 0x00007fffe31e4bf2 in QApplication::notify (this=0x55555556ea60, receiver=0x555556dfbdb0, e=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2788
    #82 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #83 0x00007fffe52511f9 in QCoreApplication::sendSpontaneousEvent (receiver=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1564
    #84 0x00007fffe31e3853 in QApplicationPrivate::sendMouseEvent
        (receiver=0x555556dfbdb0, event=0x7fffffff9440, alienWidget=0x555556dfbdb0, nativeWidget=0x555556df4450, buttonDown=0x7fffe3dd9488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
        at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2369
    #85 0x00007fffe32e2ad8 in QWidgetWindow::handleMouseEvent (this=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:669
    #86 0x00007fffe32e12f3 in QWidgetWindow::event (this=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292
    #87 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555575a7590, e=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #88 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555575a7590, e=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #89 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #90 0x00007fffe52511f9 in QCoreApplication::sendSpontaneousEvent (receiver=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1564
    #91 0x00007fffe408eb27 in QGuiApplicationPrivate::processMouseEvent (e=0x55555da09130) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2480
    #92 0x00007fffe408dc76 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x55555da09130) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2204
    #93 0x00007fffe417628d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
    #94 0x00007fffe417613e in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082
    #95 0x00007fffdf0afd75 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555cd020) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:521
    #96 0x00007fffdf0cb1e5 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=0x7fffffffaa20) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #97 0x00007fffdf0cb10d 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=0x7fffd0002f38, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #98 0x00007fffdf0cb02f 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::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0002f38)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #99 0x00007fffdf0cafa1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0002f38)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #100 0x00007fffdf0caecb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0002f38, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #101 0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0002f38) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #102 0x00007fffe53141cc in QMetaCallEvent::placeMetaCall (this=0x7fffd0002ef0, object=0x5555555cd020) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #103 0x00007fffe5315f21 in QObject::event (this=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #104 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #105 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #106 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555555cd020, event=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #107 0x00007fffe5251169 in QCoreApplication::sendEvent (receiver=0x5555555cd020, event=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1550
    #108 0x00007fffe52520a8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5555555a3f40) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1890
    #109 0x00007fffe5250fac in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1744
    #110 0x00007fffe5859481 in postEventSourceDispatch (s=0x5555555ca610) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #111 0x00007fffe9f04345 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #112 0x00007fffe9f06577 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #113 0x00007fffe9f06ce0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #114 0x00007fffe58586bb in QEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #115 0x00007fffe4989c18 in QPAEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #116 0x00007fffe61ea842 in QtInstance::ImplYield (this=0x5555555f9020, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:501
    #117 0x00007fffe61edb41 in QtInstance::DoYield (this=0x5555555f9020, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:512
    #118 0x00007fffeec40736 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #119 0x00007fffeec4004f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #120 0x00007fffeec3fe30 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #121 0x00007ffff7b28bb9 in desktop::Desktop::Main (this=0x7fffffffd650) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1680
    #122 0x00007fffeec61f76 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:231
    #123 0x00007fffeec63ba9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:249
    #124 0x00007ffff7ba306a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #125 0x00005555555559fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #126 0x00005555555559d7 in main (argc=1, argv=0x7fffffffd858) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

[1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_data_offer

Change-Id: I41476b2c9330a5a67e7663ac53a5ba57601c4b03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185136
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
(cherry picked from commit 479dd32)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185139
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Jun 10, 2025
Ensure that the QMimeData subclass set for the QDrag used
for drag and drop reports at least one supported MIME type.
Report a dummy "application/x.libreoffice-internal-drag-and-drop"
one if there is no other one.
(The string used for the MIME type is of no particular meaning,
any value would do.)

This prevents the issue seen with qt6 on Wayland that a
drag and drop operation is cancelled when no formats/MIME types
are reported.

The "wl_data_offer" Wayland protocol [1] is probably relevant
here:

> A wl_data_offer represents a piece of data offered for transfer by
> another client (the source client). It is used by the copy-and-paste and
> drag-and-drop mechanisms. The offer describes the different mime types
> that the data can be converted to and provides the mechanism for
> transferring the data directly from the source client.
>
> (...)
>
> For objects of version 3 or newer, this request determines the final
> result of the drag-and-drop operation. If the end result is that no mime
> types were accepted, the drag-and-drop operation will be cancelled and
> the corresponding drag source will receive wl_data_source.cancelled.

(Further analysis on Qt and Wayland library/protocol level
might give more insights, but this is sufficient at least for now.)

Example backtrace for how QtWaylandClient::QWaylandDrag::cancel
(in Qt's qtwayland module) got called previously when releasing
the mouse after dragging a slide to a different position in
the Impress slide sorter (on Debian testing in a Plasma Wayland
session, kwin-wayland 4:6.3.4-3, Qt self-compiled from git dev):

    Thread 1 "soffice.bin" hit Breakpoint 1, QtWaylandClient::QWaylandDrag::cancel (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:49
    49          QBasicDrag::cancel();
    (gdb) bt
    #0  QtWaylandClient::QWaylandDrag::cancel (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:49
    #1  0x00007fffe479434b in QBasicDrag::eventFilter (this=0x5555555d44d0, o=0x55555e78fb80, e=0x7fffffff3c70) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qsimpledrag.cpp:109
    #2  0x00007fffdf182bb5 in QtWaylandClient::QWaylandDrag::finishDrag (this=0x5555555d44d0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddnd.cpp:101
    #3  0x00007fffdf17752e in QtWaylandClient::QWaylandDataDevice::dragSourceCancelled (this=0x5555555dfb60) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddatadevice.cpp:316
    #4  0x00007fffdf179ff5 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}::operator()() const (this=0x7fffffff3d70) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #5  0x00007fffdf179f1d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)::{lambda()#1}&&) (args=0x7fffffff40a0, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #6  0x00007fffdf179e3f in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDataDevice::*)()>::call(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)
        (f=(void (QtWaylandClient::QWaylandDataDevice::*)(QtWaylandClient::QWaylandDataDevice * const)) 0x7fffdf177500 <QtWaylandClient::QWaylandDataDevice::dragSourceCancelled()>, o=0x5555555dfb60, arg=0x7fffffff40a0)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #7  0x00007fffdf179db1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDataDevice::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDataDevice::*)(), QtWaylandClient::QWaylandDataDevice*, void**)
        (f=(void (QtWaylandClient::QWaylandDataDevice::*)(QtWaylandClient::QWaylandDataDevice * const)) 0x7fffdf177500 <QtWaylandClient::QWaylandDataDevice::dragSourceCancelled()>, o=0x5555555dfb60, arg=0x7fffffff40a0)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #8  0x00007fffdf179cdb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDataDevice::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x55555e78e0a0, r=0x5555555dfb60, a=0x7fffffff40a0, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #9  0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x55555e78e0a0, r=0x5555555dfb60, a=0x7fffffff40a0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #10 0x00007fffe5329cd4 in doActivate<false> (sender=0x55555782a110, signal_index=3, argv=0x7fffffff40a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4241
    #11 0x00007fffe531fec3 in QMetaObject::activate (sender=0x55555782a110, m=0x7fffdf20cb10 <QtWaylandClient::QWaylandDataSource::staticMetaObject>, local_signal_index=0, argv=0x0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4301
    #12 0x00007fffdf180206 in QtWaylandClient::QWaylandDataSource::cancelled (this=0x55555782a110) at qtwayland/src/client/WaylandClient_autogen/include/moc_qwaylanddatasource_p.cpp:143
    #13 0x00007fffdf1801d9 in QtWaylandClient::QWaylandDataSource::data_source_cancelled (this=0x55555782a110) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddatasource.cpp:41
    #14 0x00007fffdf14e06e in QtWayland::wl_data_source::handle_cancelled (data=0x55555782a120, object=0x55555e75d680) at /home/michi/development/git/qt5/qtwayland/src/client/qwayland-wayland.cpp:770
    #15 0x00007ffff32986ce in ??? () at /lib/x86_64-linux-gnu/libffi.so.8
    #16 0x00007ffff329797e in ??? () at /lib/x86_64-linux-gnu/libffi.so.8
    #17 0x00007ffff32981ab in ffi_call () at /lib/x86_64-linux-gnu/libffi.so.8
    #18 0x00007fffe6953c91 in ??? () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #19 0x00007fffe694fc1f in ??? () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #20 0x00007fffe6950f13 in wl_display_dispatch_queue_pending () at /lib/x86_64-linux-gnu/libwayland-client.so.0
    #21 0x00007fffdf0c2fe2 in QtWaylandClient::EventThread::dispatchQueuePending (this=0x5555555e08c0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:228
    #22 0x00007fffdf0b9604 in QtWaylandClient::EventThread::readAndDispatchEvents (this=0x5555555e08c0) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:113
    #23 0x00007fffdf0afd62 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555cd020) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:520
    #24 0x00007fffdf0cb1e5 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=0x7fffffff46b0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #25 0x00007fffdf0cb10d 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=0x7fffd0003c18, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #26 0x00007fffdf0cb02f 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::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0003c18)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #27 0x00007fffdf0cafa1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0003c18)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #28 0x00007fffdf0caecb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0003c18, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #29 0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0003c18) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #30 0x00007fffe53141cc in QMetaCallEvent::placeMetaCall (this=0x7fffd0003bd0, object=0x5555555cd020) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #31 0x00007fffe5315f21 in QObject::event (this=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #32 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #33 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555555cd020, e=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #34 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555555cd020, event=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #35 0x00007fffe5251169 in QCoreApplication::sendEvent (receiver=0x5555555cd020, event=0x7fffd0003bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1550
    #36 0x00007fffe52520a8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5555555a3f40) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1890
    #37 0x00007fffe5250fac in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1744
    #38 0x00007fffe5859481 in postEventSourceDispatch (s=0x5555555ca610) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #39 0x00007fffe9f04345 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #40 0x00007fffe9f06577 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #41 0x00007fffe9f06ce0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #42 0x00007fffe58586bb in QEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #43 0x00007fffe4989c18 in QPAEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #44 0x00007fffe526a690 in QEventLoop::processEvents (this=0x55555ea18e00, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:104
    #45 0x00007fffe526a8e3 in QEventLoop::exec (this=0x55555ea18e00, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:186
    #46 0x00007fffe4794d57 in QBasicDrag::drag (this=0x5555555d44d0, o=0x55555e762960) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qsimpledrag.cpp:176
    #47 0x00007fffe478a2e8 in QDragManager::drag (this=0x55555e78d700, o=0x55555e762960) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qdnd.cpp:81
    #48 0x00007fffe478addb in QDrag::exec (this=0x55555e762960, supportedActions=..., defaultDropAction=Qt::MoveAction) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qdrag.cpp:248
    #49 0x00007fffe6192d42 in QtDragSource::startDrag (this=0x555557046c00, sourceActions=3 '\003', rTrans=uno::Reference to (SdTransferable *) 0x55555a33bda8, rListener=uno::Reference to (SdTransferable *) 0x55555a33bdb8)
        at vcl/qt6/../qt5/QtDragAndDrop.cxx:54
    #50 0x00007fffe6192f10 in non-virtual thunk to QtDragSource::startDrag(com::sun::star::datatransfer::dnd::DragGestureEvent const&, signed char, int, int, com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> const&, com::sun::star::uno::Reference<com::sun::star::datatransfer::dnd::XDragSourceListener> const&) () at vcl/qt6/../qt5/QtDragAndDrop.cxx:76
    #51 0x00007fffee725518 in TransferableHelper::StartDrag (this=0x55555a33bd80, pWindow=0x55555a2528e0, nDnDSourceActions=3 '\003') at /home/michi/development/git/libreoffice/vcl/source/treelist/transfer.cxx:1050
    #52 0x00007fff9dbd7ff0 in sd::slidesorter::controller::Clipboard::CreateSlideTransferable (this=0x55555a22d1d0, pWindow=0x55555a2528e0, bDrag=true, bMergeMasterPagesOnly=false)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsClipboard.cxx:499
    #53 0x00007fff9dbd9489 in sd::slidesorter::controller::Clipboard::StartDrag (this=0x55555a22d1d0, rPosition=Point = {...}, pWindow=0x55555a2528e0)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsClipboard.cxx:596
    #54 0x00007fff9dc1b3ef in sd::slidesorter::SlideSorterViewShell::StartDrag (this=0x55555a21bdc0, rDragPt=Point = {...}, pWindow=0x55555a2528e0)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx:660
    #55 0x00007fff9dbf1366 in sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler::DragAndDropModeHandler
        (this=0x55555e20cd70, rSlideSorter=..., rSelectionFunction=..., rMousePosition=Point = {...}, pWindow=0x55555a2528e0) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:1396
    #56 0x00007fff9dbf124d in std::_Construct<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&>
        (__p=0x55555e20cd70, __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:119
    #57 0x00007fff9dbf0e5a in std::allocator_traits<std::allocator<void> >::construct<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (__p=0x55555e20cd70, __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/alloc_traits.h:706
    #58 std::_Sp_counted_ptr_inplace<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x55555e20cd60, __a=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:607
    #59 0x00007fff9dbf0c57 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff65a0, __p=@0x7fffffff6598: 0x0, __a=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:970
    #60 0x00007fff9dbf0b7a in std::__shared_ptr<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff6598, __tag=..., __args=..., __args=..., __args=Point = {...}, __args=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1713
    #61 0x00007fff9dbf0af2 in std::shared_ptr<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler>::shared_ptr<std::allocator<void>, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&> (this=0x7fffffff6598, __tag=..., __args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:463
    #62 0x00007fff9dbee841 in std::make_shared<sd::slidesorter::controller::(anonymous namespace)::DragAndDropModeHandler, sd::slidesorter::SlideSorter&, sd::slidesorter::controller::SelectionFunction&, Point const&, VclPtr<sd::Window>&>
        (__args=..., __args=..., __args=Point = {...}, __args=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:1007
    #63 0x00007fff9dbee754 in sd::slidesorter::controller::SelectionFunction::SwitchToDragAndDropMode (this=0x55555a323350, rMousePosition=Point = {...})
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:661
    #64 0x00007fff9dbef8da in sd::slidesorter::controller::SelectionFunction::ModeHandler::StartDrag (this=0x55555ea0d510, rMousePosition=Point = {...})
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:947
    #65 0x00007fff9dbf06d4 in sd::slidesorter::controller::(anonymous namespace)::NormalModeHandler::ProcessMotionEvent (this=0x55555ea0d510, rDescriptor=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:1102
    #66 0x00007fff9dbef62c in sd::slidesorter::controller::SelectionFunction::ModeHandler::ProcessEvent (this=0x55555ea0d510, rDescriptor=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:847
    #67 0x00007fff9dbee47e in sd::slidesorter::controller::SelectionFunction::ProcessEvent (this=0x55555a323350, rDescriptor=...) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:640
    #68 0x00007fff9dbecea8 in sd::slidesorter::controller::SelectionFunction::ProcessMouseEvent (this=0x55555a323350, nEventType=1024, rEvent=...)
        at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:623
    #69 0x00007fff9dbecf42 in sd::slidesorter::controller::SelectionFunction::MouseMove (this=0x55555a323350, rEvent=...) at /home/michi/development/git/libreoffice/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:335
    #70 0x00007fff9df19339 in sd::ViewShell::MouseMove (this=0x55555a21bdc0, rMEvt=..., pWin=0x55555a2528e0) at /home/michi/development/git/libreoffice/sd/source/ui/view/viewshel.cxx:700
    #71 0x00007fff9df01faa in sd::Window::MouseMove (this=0x55555a2528e0, rMEvt=...) at /home/michi/development/git/libreoffice/sd/source/ui/view/sdwindow.cxx:248
    #72 0x00007fffee462270 in ImplHandleMouseEvent (xWindow=..., nSVEvent=NotifyEventType::MOUSEMOVE, bMouseLeave=false, nX=117, nY=328, nMsgTime=16292359, nCode=1, nMode=MouseEventModifiers::DRAGMOVE)
        at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:693
    #73 0x00007fffee466675 in ImplHandleSalMouseMove (pWindow=0x555556e035d0, pEvent=0x7fffffff81b8) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2330
    #74 0x00007fffee465304 in ImplWindowFrameProc (_pWindow=0x555556e035d0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2663
    #75 0x00007fffe61cbdec in SalFrame::CallCallback (this=0x5555560402d0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at vcl/inc/salframe.hxx:310
    #76 0x00007fffe61c8a45 in QtFrame::CallCallback (this=0x5555560402c0, nEvent=SalEvent::MouseMove, pEvent=0x7fffffff81b8) at vcl/inc/qt6/../qt5/QtFrame.hxx:235
    #77 0x00007fffe62fb633 in QtWidget::mouseMoveEvent (this=0x555556dfbdb0, pEvent=0x7fffffff9440) at vcl/qt6/../qt5/QtWidget.cxx:135
    #78 0x00007fffe32a2ae5 in QWidget::event (this=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8969
    #79 0x00007fffe62fd01a in QtWidget::event (this=0x555556dfbdb0, pEvent=0x7fffffff9440) at vcl/qt6/../qt5/QtWidget.cxx:513
    #80 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x555556dfbdb0, e=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #81 0x00007fffe31e4bf2 in QApplication::notify (this=0x55555556ea60, receiver=0x555556dfbdb0, e=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2788
    #82 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #83 0x00007fffe52511f9 in QCoreApplication::sendSpontaneousEvent (receiver=0x555556dfbdb0, event=0x7fffffff9440) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1564
    #84 0x00007fffe31e3853 in QApplicationPrivate::sendMouseEvent
        (receiver=0x555556dfbdb0, event=0x7fffffff9440, alienWidget=0x555556dfbdb0, nativeWidget=0x555556df4450, buttonDown=0x7fffe3dd9488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
        at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2369
    #85 0x00007fffe32e2ad8 in QWidgetWindow::handleMouseEvent (this=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:669
    #86 0x00007fffe32e12f3 in QWidgetWindow::event (this=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292
    #87 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555575a7590, e=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #88 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555575a7590, e=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #89 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #90 0x00007fffe52511f9 in QCoreApplication::sendSpontaneousEvent (receiver=0x5555575a7590, event=0x7fffffffa518) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1564
    #91 0x00007fffe408eb27 in QGuiApplicationPrivate::processMouseEvent (e=0x55555da09130) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2480
    #92 0x00007fffe408dc76 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x55555da09130) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2204
    #93 0x00007fffe417628d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
    #94 0x00007fffe417613e in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082
    #95 0x00007fffdf0afd75 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x5555555cd020) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:521
    #96 0x00007fffdf0cb1e5 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=0x7fffffffaa20) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #97 0x00007fffdf0cb10d 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=0x7fffd0002f38, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #98 0x00007fffdf0cb02f 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::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0002f38)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #99 0x00007fffdf0cafa1 in QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay::*)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)
        (f=(void (QtWaylandClient::QWaylandDisplay::*)(QtWaylandClient::QWaylandDisplay * const)) 0x7fffdf0afd30 <QtWaylandClient::QWaylandDisplay::flushRequests()>, o=0x5555555cd020, arg=0x7fffd0002f38)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #100 0x00007fffdf0caecb in QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0002f38, ret=0x0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #101 0x00007fffe51061d2 in QtPrivate::QSlotObjectBase::call (this=0x5555555f34c0, r=0x5555555cd020, a=0x7fffd0002f38) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #102 0x00007fffe53141cc in QMetaCallEvent::placeMetaCall (this=0x7fffd0002ef0, object=0x5555555cd020) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:620
    #103 0x00007fffe5315f21 in QObject::event (this=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1429
    #104 0x00007fffe31e2f30 in QApplicationPrivate::notify_helper (this=0x55555557cb40, receiver=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3311
    #105 0x00007fffe31e6e38 in QApplication::notify (this=0x55555556ea60, receiver=0x5555555cd020, e=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3261
    #106 0x00007fffe52504f9 in QCoreApplication::notifyInternal2 (receiver=0x5555555cd020, event=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1110
    #107 0x00007fffe5251169 in QCoreApplication::sendEvent (receiver=0x5555555cd020, event=0x7fffd0002ef0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1550
    #108 0x00007fffe52520a8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5555555a3f40) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1890
    #109 0x00007fffe5250fac in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1744
    #110 0x00007fffe5859481 in postEventSourceDispatch (s=0x5555555ca610) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #111 0x00007fffe9f04345 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #112 0x00007fffe9f06577 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #113 0x00007fffe9f06ce0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #114 0x00007fffe58586bb in QEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #115 0x00007fffe4989c18 in QPAEventDispatcherGlib::processEvents (this=0x55555556f6e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #116 0x00007fffe61ea842 in QtInstance::ImplYield (this=0x5555555f9020, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:501
    #117 0x00007fffe61edb41 in QtInstance::DoYield (this=0x5555555f9020, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:512
    #118 0x00007fffeec40736 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #119 0x00007fffeec4004f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #120 0x00007fffeec3fe30 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #121 0x00007ffff7b28bb9 in desktop::Desktop::Main (this=0x7fffffffd650) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1680
    #122 0x00007fffeec61f76 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:231
    #123 0x00007fffeec63ba9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:249
    #124 0x00007ffff7ba306a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #125 0x00005555555559fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #126 0x00005555555559d7 in main (argc=1, argv=0x7fffffffd858) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

[1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_data_offer

Change-Id: I41476b2c9330a5a67e7663ac53a5ba57601c4b03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185136
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
(cherry picked from commit 479dd32)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185139
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Jun 30, 2025
For the gtk3 VCL plugin, calling weld::DrawingArea::set_size_request
can trigger the creation of the corresponding a11y object,
which wants to access the drawing area to determine its states.

Therefore, call the base class implementation to set the
drawing area right at the start of IMapWindow::SetDrawingArea,
as is done elsewhere (e.g. in CuiGraphicPreviewWindow::SetDrawingArea).

This fixes a crash with the below backtrace seen after

    commit 62b8ebe
    Author: Michael Weghorn <[email protected]>
    Date:   Wed Feb 12 13:15:52 2025 +0100

        GraphCtrl a11y: Use comphelper::OAccessibleComponentHelper

when opening the "Tools" -> "ImageMap" dialog in Impress or Writer
with the gtk3 VCL plugin.

        Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
    0x00007ffff24b0634 in weld::CustomWidgetController::HasFocus (this=0x55555d7068e0) at include/vcl/customweld.hxx:67
    67          bool HasFocus() const { return m_pDrawingArea->has_focus(); }
    (gdb) bt
    #0  0x00007ffff24b0634 in weld::CustomWidgetController::HasFocus (this=0x55555d7068e0) at include/vcl/customweld.hxx:67
    #1  0x00007ffff24ada4a in SvxGraphCtrlAccessibleContext::getAccessibleStateSet (this=0x555558db29c0) at /home/michi/development/git/libreoffice/svx/source/accessibility/GraphCtlAccessibleContext.cxx:256
    #2  0x00007fffe62582d8 in atk_object_wrapper_new (rxAccessible=uno::Reference to (SvxGraphCtrlAccessibleContext *) 0x555558db2a10, parent=0x5555598c69a0, orig=0x555558dd9210)
        at /home/michi/development/git/libreoffice/vcl/unx/gtk3/a11y/atkwrapper.cxx:974
    #3  0x00007fffe62b15c4 in (anonymous namespace)::GtkInstanceDrawingArea::GetAtkObject (this=0x555558f99f60, pDefaultAccessible=0x555558dd9210) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:18964
    #4  0x00007fffe62b14ea in (anonymous namespace)::drawing_area_get_accessible (pWidget=0x55555d7192f0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:23966
    #5  0x00007fffe5c131b5 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #6  0x00007ffff09b4950 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #7  0x00007ffff09c8d43 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #8  0x00007ffff09ca769 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #9  0x00007ffff09d05a6 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #10 0x00007ffff09d0663 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #11 0x00007ffff09b8b14 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #12 0x00007ffff09ba767 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #13 0x00007fffe62985f3 in (anonymous namespace)::GtkInstanceWidget::set_size_request (this=0x555558f99f60, nWidth=608, nHeight=383) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:3625
    #14 0x00007ffff2617c53 in IMapWindow::SetDrawingArea (this=0x55555d7068e0, pDrawingArea=0x555558f9a210) at /home/michi/development/git/libreoffice/svx/source/dialog/imapwnd.cxx:92
    #15 0x00007fffee96f280 in weld::CustomWeld::CustomWeld (this=0x5555598c6520, rBuilder=..., rDrawingId="container", rWidgetController=...) at /home/michi/development/git/libreoffice/vcl/source/app/customweld.cxx:28
    #16 0x00007ffff260c4b7 in SvxIMapDlg::SvxIMapDlg (this=0x555558838180, _pBindings=0x555556aadbd0, pCW=0x55555d6f5530, _pParent=0x55555d723e28) at /home/michi/development/git/libreoffice/svx/source/dialog/imapdlg.cxx:118
    #17 0x00007ffff2616b46 in std::_Construct<SvxIMapDlg, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (__p=0x555558838180, __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:119
    #18 0x00007ffff2616775 in std::allocator_traits<std::allocator<void> >::construct<SvxIMapDlg, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (__p=0x555558838180, __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/alloc_traits.h:706
    #19 std::_Sp_counted_ptr_inplace<SvxIMapDlg, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (this=0x555558838170, __a=..., __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:607
    #20 0x00007ffff26164ff in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<SvxIMapDlg, std::allocator<void>, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (this=0x7fffffff4158, __p=@0x7fffffff4150: 0x0, __a=..., __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:970
    #21 0x00007ffff261642c in std::__shared_ptr<SvxIMapDlg, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (this=0x7fffffff4150, __tag=..., __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1713
    #22 0x00007ffff26163aa in std::shared_ptr<SvxIMapDlg>::shared_ptr<std::allocator<void>, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (this=0x7fffffff4150, __tag=..., __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:463
    #23 0x00007ffff2612a49 in std::make_shared<SvxIMapDlg, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*> (__args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:1007
    #24 0x00007ffff260bb7c in SvxIMapDlgChildWindow::SvxIMapDlgChildWindow (this=0x55555d6f5530, _pParent=0x5555576ad680, nId=10371, pBindings=0x555556aadbd0, pInfo=0x7fffffff43e8)
        at /home/michi/development/git/libreoffice/svx/source/dialog/imapdlg.cxx:89
    #25 0x00007ffff261290c in std::make_unique<SvxIMapDlgChildWindow, vcl::Window*&, unsigned short&, SfxBindings*&, SfxChildWinInfo*&>
        (__args=@0x7fffffff4230: 0x5555576ad680, __args=@0x7fffffff422e: 10371, __args=@0x7fffffff4220: 0x555556aadbd0, __args=@0x7fffffff4218: 0x7fffffff43e8)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:1077
    #26 0x00007ffff260b704 in SvxIMapDlgChildWindow::CreateImpl (pParent=0x5555576ad680, nId=10371, pBindings=0x555556aadbd0, pInfo=0x7fffffff43e8) at /home/michi/development/git/libreoffice/svx/source/dialog/imapdlg.cxx:59
    #27 0x00007ffff38c3b6f in SfxChildWindow::CreateChildWindow (nId=10371, pParent=0x5555576ad680, pBindings=0x555556aadbd0, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:242
    #28 0x00007ffff395f5bd in SfxWorkWindow::CreateChildWin_Impl (this=0x5555571433b0, pCW=0x55555864a020, bSetFocus=true) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #29 0x00007ffff3961853 in SfxWorkWindow::ToggleChildWindow_Impl (this=0x5555571433b0, nId=10371, bSetFocus=true) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1835
    #30 0x00007ffff403ba89 in SfxViewFrame::ToggleChildWindow (this=0x555557128f90, nId=10371) at /home/michi/development/git/libreoffice/sfx2/source/view/viewfrm.cxx:3695
    #31 0x00007fffbb6290d4 in sd::DrawViewShell::FuTemporary (this=0x55555728c010, rReq=...) at /home/michi/development/git/libreoffice/sd/source/ui/view/drviews2.cxx:3893
    #32 0x00007fffbb6949b5 in SfxStubDrawViewShellFuTemporary (pShell=0x55555728c010, rReq=...) at workdir/SdiTarget/sd/sdi/sdslots.hxx:1551
    #33 0x00007ffff39c8d1e in SfxDispatcher::Call_Impl (this=0x555556af3f30, rShell=..., rSlot=..., rReq=..., bRecord=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:256
    #34 0x00007ffff39cd5d6 in SfxDispatcher::Execute_ (this=0x555556af3f30, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:755
    #35 0x00007ffff39b59ee in SfxBindings::Execute_Impl (this=0x555556aadbd0, aReq=..., pSlot=0x7fffbb7c6270 <aDrawViewShellSlots_Impl+14400>, pShell=0x55555728c010)
        at /home/michi/development/git/libreoffice/sfx2/source/control/bindings.cxx:1046
    #36 0x00007ffff3a95e2d in SfxDispatchController_Impl::dispatch (this=0x555557e27950, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:736
    #37 0x00007ffff3a948e4 in SfxOfficeDispatch::dispatch (this=0x555557e278b0, aURL=..., aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:255
    #38 0x00007ffff4f0bd04 in framework::(anonymous namespace)::AsyncMenuExecute (data=0x5555588c6000) at /home/michi/development/git/libreoffice/framework/source/uielement/menubarmanager.cxx:790
    #39 0x00007fffee275a41 in Link<void*, void>::Call (this=0x55555d70f598, data=0x5555588c6000) at include/tools/link.hxx:105
    #40 0x00007fffee271c71 in ImplHandleUserEvent (pSVEvent=0x55555d70f590) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2285
    #41 0x00007fffee26eb9f in ImplWindowFrameProc (_pWindow=0x555556ba6530, nEvent=SalEvent::UserEvent, pEvent=0x55555d70f590) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2849
    #42 0x00007fffeee4638c in SalFrame::CallCallback (this=0x5555569908a0, nEvent=SalEvent::UserEvent, pEvent=0x55555d70f590) at vcl/inc/salframe.hxx:310
    #43 0x00007fffeee6ed1f in SalGenericDisplay::ProcessEvent (this=0x5555568f8ef0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #44 0x00007fffee97966d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffffb920) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #45 0x00007fffee97953b in SalUserEventList::DispatchUserEvents (this=0x5555568f8ef0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #46 0x00007fffeee6ec75 in SalGenericDisplay::DispatchInternalEvent (this=0x5555568f8ef0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #47 0x00007fffe62891ef in call_userEventFn (data=0x5555555b3ab0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:827
    #48 0x00007fffe99043c5 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #49 0x00007fffe99065f7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #50 0x00007fffe9906d60 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #51 0x00007fffe6287e6c in GtkSalData::Yield (this=0x5555555b3ab0, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:405
    #52 0x00007fffe628cf13 in GtkInstance::DoYield (this=0x5555555b3960, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:439
    #53 0x00007fffeea45406 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #54 0x00007fffeea44d1f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #55 0x00007fffeea44b00 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #56 0x00007ffff7b29455 in desktop::Desktop::Main (this=0x7fffffffd660) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1678
    #57 0x00007fffeea6f1b6 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #58 0x00007fffeea70ca9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #59 0x00007ffff7ba387a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #60 0x00005555555559fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #61 0x00005555555559d7 in main (argc=2, argv=0x7fffffffd868) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: I9488a66c1512e41b37bcea0d4bb25a6733884976
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187162
Reviewed-by: Michael Weghorn <[email protected]>
Tested-by: Jenkins
tdf-gerrit pushed a commit that referenced this pull request Jun 30, 2025
For the gtk3 VCL plugin, calling weld::DrawingArea::set_size_request
can trigger the creation of the corresponding a11y object,
which wants to access the drawing area to determine its states.

Therefore, call the base class implementation to set the
drawing area right at the start of IMapWindow::SetDrawingArea,
as is done elsewhere (e.g. in CuiGraphicPreviewWindow::SetDrawingArea).

This fixes a crash with the below backtrace seen after

    commit 62b8ebe
    Author: Michael Weghorn <[email protected]>
    Date:   Wed Feb 12 13:15:52 2025 +0100

        GraphCtrl a11y: Use comphelper::OAccessibleComponentHelper

when opening the "Tools" -> "ImageMap" dialog in Impress or Writer
with the gtk3 VCL plugin.

        Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
    0x00007ffff24b0634 in weld::CustomWidgetController::HasFocus (this=0x55555d7068e0) at include/vcl/customweld.hxx:67
    67          bool HasFocus() const { return m_pDrawingArea->has_focus(); }
    (gdb) bt
    #0  0x00007ffff24b0634 in weld::CustomWidgetController::HasFocus (this=0x55555d7068e0) at include/vcl/customweld.hxx:67
    #1  0x00007ffff24ada4a in SvxGraphCtrlAccessibleContext::getAccessibleStateSet (this=0x555558db29c0) at /home/michi/development/git/libreoffice/svx/source/accessibility/GraphCtlAccessibleContext.cxx:256
    #2  0x00007fffe62582d8 in atk_object_wrapper_new (rxAccessible=uno::Reference to (SvxGraphCtrlAccessibleContext *) 0x555558db2a10, parent=0x5555598c69a0, orig=0x555558dd9210)
        at /home/michi/development/git/libreoffice/vcl/unx/gtk3/a11y/atkwrapper.cxx:974
    #3  0x00007fffe62b15c4 in (anonymous namespace)::GtkInstanceDrawingArea::GetAtkObject (this=0x555558f99f60, pDefaultAccessible=0x555558dd9210) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:18964
    #4  0x00007fffe62b14ea in (anonymous namespace)::drawing_area_get_accessible (pWidget=0x55555d7192f0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:23966
    #5  0x00007fffe5c131b5 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #6  0x00007ffff09b4950 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #7  0x00007ffff09c8d43 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #8  0x00007ffff09ca769 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #9  0x00007ffff09d05a6 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #10 0x00007ffff09d0663 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #11 0x00007ffff09b8b14 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #12 0x00007ffff09ba767 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #13 0x00007fffe62985f3 in (anonymous namespace)::GtkInstanceWidget::set_size_request (this=0x555558f99f60, nWidth=608, nHeight=383) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:3625
    #14 0x00007ffff2617c53 in IMapWindow::SetDrawingArea (this=0x55555d7068e0, pDrawingArea=0x555558f9a210) at /home/michi/development/git/libreoffice/svx/source/dialog/imapwnd.cxx:92
    #15 0x00007fffee96f280 in weld::CustomWeld::CustomWeld (this=0x5555598c6520, rBuilder=..., rDrawingId="container", rWidgetController=...) at /home/michi/development/git/libreoffice/vcl/source/app/customweld.cxx:28
    #16 0x00007ffff260c4b7 in SvxIMapDlg::SvxIMapDlg (this=0x555558838180, _pBindings=0x555556aadbd0, pCW=0x55555d6f5530, _pParent=0x55555d723e28) at /home/michi/development/git/libreoffice/svx/source/dialog/imapdlg.cxx:118
    #17 0x00007ffff2616b46 in std::_Construct<SvxIMapDlg, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (__p=0x555558838180, __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:119
    #18 0x00007ffff2616775 in std::allocator_traits<std::allocator<void> >::construct<SvxIMapDlg, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (__p=0x555558838180, __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/alloc_traits.h:706
    #19 std::_Sp_counted_ptr_inplace<SvxIMapDlg, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (this=0x555558838170, __a=..., __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:607
    #20 0x00007ffff26164ff in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<SvxIMapDlg, std::allocator<void>, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (this=0x7fffffff4158, __p=@0x7fffffff4150: 0x0, __a=..., __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:970
    #21 0x00007ffff261642c in std::__shared_ptr<SvxIMapDlg, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (this=0x7fffffff4150, __tag=..., __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1713
    #22 0x00007ffff26163aa in std::shared_ptr<SvxIMapDlg>::shared_ptr<std::allocator<void>, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*>
        (this=0x7fffffff4150, __tag=..., __args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:463
    #23 0x00007ffff2612a49 in std::make_shared<SvxIMapDlg, SfxBindings*&, SvxIMapDlgChildWindow*, weld::Window*> (__args=@0x7fffffff4170: 0x555556aadbd0, __args=@0x7fffffff4148: 0x55555d6f5530, __args=@0x7fffffff4140: 0x55555d723e28)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:1007
    #24 0x00007ffff260bb7c in SvxIMapDlgChildWindow::SvxIMapDlgChildWindow (this=0x55555d6f5530, _pParent=0x5555576ad680, nId=10371, pBindings=0x555556aadbd0, pInfo=0x7fffffff43e8)
        at /home/michi/development/git/libreoffice/svx/source/dialog/imapdlg.cxx:89
    #25 0x00007ffff261290c in std::make_unique<SvxIMapDlgChildWindow, vcl::Window*&, unsigned short&, SfxBindings*&, SfxChildWinInfo*&>
        (__args=@0x7fffffff4230: 0x5555576ad680, __args=@0x7fffffff422e: 10371, __args=@0x7fffffff4220: 0x555556aadbd0, __args=@0x7fffffff4218: 0x7fffffff43e8)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:1077
    #26 0x00007ffff260b704 in SvxIMapDlgChildWindow::CreateImpl (pParent=0x5555576ad680, nId=10371, pBindings=0x555556aadbd0, pInfo=0x7fffffff43e8) at /home/michi/development/git/libreoffice/svx/source/dialog/imapdlg.cxx:59
    #27 0x00007ffff38c3b6f in SfxChildWindow::CreateChildWindow (nId=10371, pParent=0x5555576ad680, pBindings=0x555556aadbd0, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:242
    #28 0x00007ffff395f5bd in SfxWorkWindow::CreateChildWin_Impl (this=0x5555571433b0, pCW=0x55555864a020, bSetFocus=true) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #29 0x00007ffff3961853 in SfxWorkWindow::ToggleChildWindow_Impl (this=0x5555571433b0, nId=10371, bSetFocus=true) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1835
    #30 0x00007ffff403ba89 in SfxViewFrame::ToggleChildWindow (this=0x555557128f90, nId=10371) at /home/michi/development/git/libreoffice/sfx2/source/view/viewfrm.cxx:3695
    #31 0x00007fffbb6290d4 in sd::DrawViewShell::FuTemporary (this=0x55555728c010, rReq=...) at /home/michi/development/git/libreoffice/sd/source/ui/view/drviews2.cxx:3893
    #32 0x00007fffbb6949b5 in SfxStubDrawViewShellFuTemporary (pShell=0x55555728c010, rReq=...) at workdir/SdiTarget/sd/sdi/sdslots.hxx:1551
    #33 0x00007ffff39c8d1e in SfxDispatcher::Call_Impl (this=0x555556af3f30, rShell=..., rSlot=..., rReq=..., bRecord=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:256
    #34 0x00007ffff39cd5d6 in SfxDispatcher::Execute_ (this=0x555556af3f30, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:755
    #35 0x00007ffff39b59ee in SfxBindings::Execute_Impl (this=0x555556aadbd0, aReq=..., pSlot=0x7fffbb7c6270 <aDrawViewShellSlots_Impl+14400>, pShell=0x55555728c010)
        at /home/michi/development/git/libreoffice/sfx2/source/control/bindings.cxx:1046
    #36 0x00007ffff3a95e2d in SfxDispatchController_Impl::dispatch (this=0x555557e27950, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:736
    #37 0x00007ffff3a948e4 in SfxOfficeDispatch::dispatch (this=0x555557e278b0, aURL=..., aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:255
    #38 0x00007ffff4f0bd04 in framework::(anonymous namespace)::AsyncMenuExecute (data=0x5555588c6000) at /home/michi/development/git/libreoffice/framework/source/uielement/menubarmanager.cxx:790
    #39 0x00007fffee275a41 in Link<void*, void>::Call (this=0x55555d70f598, data=0x5555588c6000) at include/tools/link.hxx:105
    #40 0x00007fffee271c71 in ImplHandleUserEvent (pSVEvent=0x55555d70f590) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2285
    #41 0x00007fffee26eb9f in ImplWindowFrameProc (_pWindow=0x555556ba6530, nEvent=SalEvent::UserEvent, pEvent=0x55555d70f590) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2849
    #42 0x00007fffeee4638c in SalFrame::CallCallback (this=0x5555569908a0, nEvent=SalEvent::UserEvent, pEvent=0x55555d70f590) at vcl/inc/salframe.hxx:310
    #43 0x00007fffeee6ed1f in SalGenericDisplay::ProcessEvent (this=0x5555568f8ef0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #44 0x00007fffee97966d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffffb920) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #45 0x00007fffee97953b in SalUserEventList::DispatchUserEvents (this=0x5555568f8ef0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #46 0x00007fffeee6ec75 in SalGenericDisplay::DispatchInternalEvent (this=0x5555568f8ef0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #47 0x00007fffe62891ef in call_userEventFn (data=0x5555555b3ab0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:827
    #48 0x00007fffe99043c5 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #49 0x00007fffe99065f7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #50 0x00007fffe9906d60 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #51 0x00007fffe6287e6c in GtkSalData::Yield (this=0x5555555b3ab0, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:405
    #52 0x00007fffe628cf13 in GtkInstance::DoYield (this=0x5555555b3960, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:439
    #53 0x00007fffeea45406 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #54 0x00007fffeea44d1f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #55 0x00007fffeea44b00 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #56 0x00007ffff7b29455 in desktop::Desktop::Main (this=0x7fffffffd660) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1678
    #57 0x00007fffeea6f1b6 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #58 0x00007fffeea70ca9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #59 0x00007ffff7ba387a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #60 0x00005555555559fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #61 0x00005555555559d7 in main (argc=2, argv=0x7fffffffd868) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: I9488a66c1512e41b37bcea0d4bb25a6733884976
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187162
Reviewed-by: Michael Weghorn <[email protected]>
Tested-by: Jenkins
(cherry picked from commit fdffaac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187190
Reviewed-by: Xisco Fauli <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Jul 5, 2025
Since

    commit 380bd85
    Date:   Tue Jun 24 11:21:04 2025 +0200

        [API CHANGE] remove css::drawing::framework::XView

, starting an Impress presentation in a dual screen setup
with presenter console enabled, then existing the presentation
resulted in a deadlock with the below backtrace, because
WeakComponentImplHelperBase::dispose (frame 9)
locks the base class's UnoImplBase::m_aMutex and then
sdext::presenter::PresenterSlideShowView::disposing (frame 8)
tries to lock it again.

Use the existing lock passed as a method param and pass it
down to the called methods instead. Add an assert
it is actually a lock for the correct mutex.

    #0  futex_wait (futex_word=0x55555d5afb70, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
    #1  __GI___lll_lock_wait (futex=futex@entry=0x55555d5afb70, private=0) at ./nptl/lowlevellock.c:49
    #2  0x00007ffff789ff72 in lll_mutex_lock_optimized (mutex=0x55555d5afb70) at ./nptl/pthread_mutex_lock.c:48
    #3  ___pthread_mutex_lock (mutex=0x55555d5afb70) at ./nptl/pthread_mutex_lock.c:93
    #4  0x00007fffc768849f in __gthread_mutex_lock (__mutex=0x55555d5afb70) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:762
    #5  0x00007fffc7693185 in std::mutex::lock (this=0x55555d5afb70) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_mutex.h:113
    #6  0x00007fffc7693154 in std::unique_lock<std::mutex>::lock (this=0x7fffffff8838) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:147
    #7  0x00007fffc768b068 in std::unique_lock<std::mutex>::unique_lock (this=0x7fffffff8838, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_lock.h:73
    #8  0x00007fffc76f408c in sdext::presenter::PresenterSlideShowView::disposing (this=0x55555d5afa10) at /home/michi/development/git/libreoffice/sd/source/console/PresenterSlideShowView.cxx:186
    #9  0x00007ffff6134bb0 in comphelper::WeakComponentImplHelperBase::dispose (this=0x55555d5afa10) at /home/michi/development/git/libreoffice/comphelper/source/misc/compbase.cxx:26
    #10 0x00007fffc76a4885 in comphelper::WeakComponentImplHelper<>::dispose() (this=0x55555d5afa10) at include/comphelper/compbase.hxx:78
    #11 0x00007fffc7783b71 in sdext::presenter::PresenterViewFactory::releaseResource (this=0x55555d649400, rxView=rtl::Reference to 0x55555d5afa10) at /home/michi/development/git/libreoffice/sd/source/console/PresenterViewFactory.cxx:229
    #12 0x00007fffbb192dec in sd::framework::ConfigurationControllerResourceManager::DeactivateResource (this=0x555557655ca0, rxResourceId=rtl::Reference to 0x55555d6492f0, rxConfiguration=rtl::Reference to 0x555556a598e0)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:203
    #13 0x00007fffbb193814 in sd::framework::ConfigurationControllerResourceManager::DeactivateResources(std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > const&, rtl::Reference<sd::framework::Configuration> const&)::$_0::operator()(rtl::Reference<sd::framework::ResourceId> const&) const (this=0x7fffffff9290, xResource=rtl::Reference to 0x55555d6492f0)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:90
    #14 0x00007fffbb192a9b in std::for_each<std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<rtl::Reference<sd::framework::ResourceId> const*, std::__cxx1998::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > >, std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > >, std::random_access_iterator_tag> >, sd::framework::ConfigurationControllerResourceManager::DeactivateResources(std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > const&, rtl::Reference<sd::framework::Configuration> const&)::$_0>(std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<rtl::Reference<sd::framework::ResourceId> const*, std::__cxx1998::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > >, std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > >, std::random_access_iterator_tag> >, std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<rtl::Reference<sd::framework::ResourceId> const*, std::__cxx1998::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > >, std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > >, std::random_access_iterator_tag> >, sd::framework::ConfigurationControllerResourceManager::DeactivateResources(std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > const&, rtl::Reference<sd::framework::Configuration> const&)::$_0) (__first=..., __last=..., __f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_algo.h:3786
    #15 0x00007fffbb192844 in sd::framework::ConfigurationControllerResourceManager::DeactivateResources
        (this=0x555557655ca0, rResources=std::__debug::vector of length 7, capacity 7 = {...}, rxConfiguration=rtl::Reference to 0x555556a598e0)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:86
    #16 0x00007fffbb19a50e in sd::framework::ConfigurationUpdater::UpdateCore (this=0x555557657360, rClassifier=...) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:250
    #17 0x00007fffbb199afc in sd::framework::ConfigurationUpdater::UpdateConfiguration (this=0x555557657360) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:161
    #18 0x00007fffbb19957b in sd::framework::ConfigurationUpdater::RequestUpdate (this=0x555557657360, rxRequestedConfiguration=rtl::Reference to 0x555556a5a320)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:108
    #19 0x00007fffbb16d349 in sd::framework::ChangeRequestQueueProcessor::ProcessOneEvent (this=0x555557657f30) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:158
    #20 0x00007fffbb16cd9f in sd::framework::ChangeRequestQueueProcessor::ProcessEvent (this=0x555557657f30) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:115
    #21 0x00007fffbb16cd4d in sd::framework::ChangeRequestQueueProcessor::LinkStubProcessEvent (instance=0x555557657f30, data=0x0)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:109
    #22 0x00007fffee275c21 in Link<void*, void>::Call (this=0x55555880a688, data=0x0) at include/tools/link.hxx:105
    #23 0x00007fffee271e51 in ImplHandleUserEvent (pSVEvent=0x55555880a680) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2285
    #24 0x00007fffee26ed7f in ImplWindowFrameProc (_pWindow=0x5555569e6b00, nEvent=SalEvent::UserEvent, pEvent=0x55555880a680) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2849
    #25 0x00007fffeee478bc in SalFrame::CallCallback (this=0x55555688b5d0, nEvent=SalEvent::UserEvent, pEvent=0x55555880a680) at vcl/inc/salframe.hxx:310
    #26 0x00007fffeee7021f in SalGenericDisplay::ProcessEvent (this=0x5555568a4060, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #27 0x00007fffee97bd7d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffffb920) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #28 0x00007fffee97bc4b in SalUserEventList::DispatchUserEvents (this=0x5555568a4060, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #29 0x00007fffeee70175 in SalGenericDisplay::DispatchInternalEvent (this=0x5555568a4060, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #30 0x00007fffe628460f in call_userEventFn (data=0x5555555b3ab0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:825
    #31 0x00007fffe99043c5 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #32 0x00007fffe99065f7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #33 0x00007fffe9906d60 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #34 0x00007fffe628328c in GtkSalData::Yield (this=0x5555555b3ab0, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:403
    #35 0x00007fffe6288333 in GtkInstance::DoYield (this=0x5555555b3960, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:439
    #36 0x00007fffeea47b16 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #37 0x00007fffeea4742f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #38 0x00007fffeea47210 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #39 0x00007ffff7b297a5 in desktop::Desktop::Main (this=0x7fffffffd660) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1678
    #40 0x00007fffeea71846 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #41 0x00007fffeea73339 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #42 0x00007ffff7ba40ba in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #43 0x00005555555559fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #44 0x00005555555559d7 in main (argc=2, argv=0x7fffffffd868) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: I2f0cc4db777c3e6e2db3d2ec7756bc89f43f0093
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187436
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Jul 25, 2025
This fixes an assert seen in a WIP branch to support the
"Manage Changes" dialog when the dialog was open in the
previous run when LO crashed, and then restarting LO.

Also add an assert that this is running in the main thread.

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  0x00007fa78409e9ff in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
    #2  0x00007fa784049cc2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007fa7840324ac in __GI_abort () at ./stdlib/abort.c:73
    #4  0x00007fa784032420 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=36, function=<optimized out>) at ./assert/assert.c:118
    #5  0x00007fa77b38413c in ImplDbgTestSolarMutex (owned=true) at /home/michi/development/git/libreoffice/vcl/source/app/dbggui.cxx:36
    #6  0x00007fa78252be74 in DbgTestSolarMutex (owned=true) at /home/michi/development/git/libreoffice/tools/source/debug/debug.cxx:54
    #7  0x00007fa77ac6732b in vcl::WindowOutputDevice::AcquireGraphics (this=0x55f164887f80) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:819
    #8  0x00007fa77ae68d7b in OutputDevice::ImplIsAntiparallel (this=0x55f164887f80) at /home/michi/development/git/libreoffice/vcl/source/outdev/outdev.cxx:614
    #9  0x00007fa77aba212f in vcl::Window::GetPointerPosPixel (this=0x55f167b88570) at /home/michi/development/git/libreoffice/vcl/source/window/mouse.cxx:548
    #10 0x00007fa77aba2030 in vcl::Window::ImplTestMousePointerSet (this=0x55f167b88570) at /home/michi/development/git/libreoffice/vcl/source/window/mouse.cxx:90
    #11 0x00007fa77aba47bb in vcl::Window::EnterWait (this=0x55f167b88570) at /home/michi/development/git/libreoffice/vcl/source/window/mouse.cxx:613
    #12 0x00007fa7476b98d7 in SwWait::EnterWaitAndLockDispatcher (this=0x7ffe7c5985d8) at /home/michi/development/git/libreoffice/sw/source/uibase/app/swwait.cxx:47
    #13 0x00007fa7476b9864 in SwWait::SwWait (this=0x7ffe7c5985d8, rDocShell=..., bLockUnlockDispatcher=false) at /home/michi/development/git/libreoffice/sw/source/uibase/app/swwait.cxx:34
    #14 0x00007fa7478a051b in SwModelessRedlineAcceptDlg::Activate (this=0x55f1689d4140) at /home/michi/development/git/libreoffice/sw/source/uibase/misc/redlndlg.cxx:95
    #15 0x00007fa7804e12f5 in SfxDialogController::FocusChangeHdl (this=0x55f1689d4140) at /home/michi/development/git/libreoffice/sfx2/source/dialog/basedlgs.cxx:114
    #16 0x00007fa7804e129d in SfxDialogController::LinkStubFocusChangeHdl (instance=0x55f1689d4140, data=...) at /home/michi/development/git/libreoffice/sfx2/source/dialog/basedlgs.cxx:111
    #17 0x00007fa772af7211 in Link<weld::Container&, void>::Call (this=0x55f168a187d0, data=...) at include/tools/link.hxx:105
    #18 0x00007fa772af712c in weld::Container::signal_container_focus_changed (this=0x55f168a187c8) at include/vcl/weld.hxx:396
    #19 0x00007fa772af4b1f in QtInstanceWindow::eventFilter (this=0x55f168a18600, pObject=0x55f168483010, pEvent=0x7ffe7c599350) at vcl/qt6/../qt5/QtInstanceWindow.cxx:228
    #20 0x00007fa771a52f9d in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=0x55f168483010, event=0x7ffe7c599350) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1246
    #21 0x00007fa76f9e60ce in QApplicationPrivate::notify_helper (this=0x55f162d3fb40, receiver=0x55f168483010, e=0x7ffe7c599350) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3301
    #22 0x00007fa76f9e9fd4 in QApplication::notify (this=0x55f162d31a60, receiver=0x55f168483010, e=0x7ffe7c599350) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3253
    #23 0x00007fa771a52a99 in QCoreApplication::notifyInternal2 (receiver=0x55f168483010, event=0x7ffe7c599350) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109
    #24 0x00007fa771a53799 in QCoreApplication::sendSpontaneousEvent (receiver=0x55f168483010, event=0x7ffe7c599350) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1563
    #25 0x00007fa76f9e48ee in QApplicationPrivate::setActiveWindow (act=0x55f168483010) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:1880
    #26 0x00007fa76f9e5015 in QApplicationPrivate::notifyActiveWindowChange (this=0x55f162d3fb40, previous=0x0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:1950
    #27 0x00007fa7708973c4 in QGuiApplicationPrivate::processFocusWindowEvent (e=0x55f1690e6910) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2726
    #28 0x00007fa7708935a8 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x55f1690e6910) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2215
    #29 0x00007fa77097c52d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
    #30 0x00007fa77097c3de in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082
    #31 0x00007fa76b8b5665 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x55f162d8feb0) at /home/michi/development/git/qt5/qtbase/src/plugins/platforms/wayland/qwaylanddisplay.cpp:523
    #32 0x00007fa76b8ba6c4 in QtWaylandClient::QWaylandDisplay::qt_static_metacall (_o=0x55f162d8feb0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7ffe7c5999b0)
        at qtbase/src/plugins/platforms/wayland/WaylandClient_autogen/include/moc_qwaylanddisplay_p.cpp:90
    #33 0x00007fa771b2d43f in doActivate<false> (sender=0x55f162d326e0, signal_index=3, argv=0x7ffe7c5999b0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4295
    #34 0x00007fa771b234a3 in QMetaObject::activate (sender=0x55f162d326e0, m=0x7fa77243f028 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=0, argv=0x0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4343
    #35 0x00007fa771a3b8b6 in QAbstractEventDispatcher::aboutToBlock (this=0x55f162d326e0) at qtbase/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:122
    #36 0x00007fa772059673 in QEventDispatcherGlib::processEvents (this=0x55f162d326e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:386
    #37 0x00007fa77119ba38 in QPAEventDispatcherGlib::processEvents (this=0x55f162d326e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #38 0x00007fa7729f8212 in QtInstance::ImplYield (this=0x55f162dbc230, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:500
    #39 0x00007fa7729fb551 in QtInstance::DoYield (this=0x55f162dbc230, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:511
    #40 0x00007fa77b45b226 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #41 0x00007fa77b45ab3f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #42 0x00007fa77b45a920 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #43 0x00007fa784328e65 in desktop::Desktop::Main (this=0x7ffe7c59b5c0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1678
    #44 0x00007fa77b487146 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #45 0x00007fa77b488c39 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #46 0x00007fa7843a2b0a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #47 0x000055f1441869fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #48 0x000055f1441869d7 in main (argc=2, argv=0x7ffe7c59b7c8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Ia3f78c245022c6aa989292737730079b403a7493
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188310
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Aug 7, 2025
Otherwise, this triggers the following assertion:

    soffice.bin: .../vcl/source/app/dbggui.cxx:36: void ImplDbgTestSolarMutex(bool): Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not owned!"' failed.

when opening an Impress presenation with a slide containing
a video with SAL_VCL_QT_USE_QT_FRAME_GRABBER=1, potentially
since

    commit 88e9af0
    Date:   Wed Aug 6 09:49:42 2025 +0200

        BitmapEx->Bitmap in PngImageReader

and follow-up commit

    commit 32627a5
    Date:   Wed Aug 6 15:48:28 2025 +0200

        blind fix for qt6 build

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  0x00007fbf6409e9ff in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
    #2  0x00007fbf64049cc2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007fbf640324ac in __GI_abort () at ./stdlib/abort.c:73
    #4  0x00007fbf64032420 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=36, function=<optimized out>) at ./assert/assert.c:118
    #5  0x00007fbf5b3889ec in ImplDbgTestSolarMutex (owned=true) at /home/michi/development/git/libreoffice/vcl/source/app/dbggui.cxx:36
    #6  0x00007fbf6352b124 in DbgTestSolarMutex (owned=true) at /home/michi/development/git/libreoffice/tools/source/debug/debug.cxx:54
    #7  0x00007fbf5b24fafb in VirtualDevice::AcquireGraphics (this=0x557da1d5e290) at /home/michi/development/git/libreoffice/vcl/source/gdi/virdev.cxx:49
    #8  0x00007fbf5aecf733 in OutputDevice::DrawRect (this=0x557da1d5e290, rRect=...) at /home/michi/development/git/libreoffice/vcl/source/outdev/rect.cxx:67
    #9  0x00007fbf5aee0999 in OutputDevice::DrawColorWallpaper (this=0x557da1d5e290, nX=0, nY=0, nWidth=721, nHeight=401, rWallpaper=...) at /home/michi/development/git/libreoffice/vcl/source/outdev/wallpaper.cxx:90
    #10 0x00007fbf5aedefcf in OutputDevice::DrawWallpaper (this=0x557da1d5e290, nX=0, nY=0, nWidth=721, nHeight=401, rWallpaper=...) at /home/michi/development/git/libreoffice/vcl/source/outdev/wallpaper.cxx:70
    #11 0x00007fbf5aedeeab in OutputDevice::DrawWallpaper (this=0x557da1d5e290, rRect=..., rWallpaper=...) at /home/michi/development/git/libreoffice/vcl/source/outdev/wallpaper.cxx:53
    #12 0x00007fbf5b2523b0 in VirtualDevice::InnerImplSetOutputSizePixel (this=0x557da1d5e290, rNewSize=Size = {...}, bErase=true, bAlphaMaskTransparent=true) at /home/michi/development/git/libreoffice/vcl/source/gdi/virdev.cxx:295
    #13 0x00007fbf5b2527dd in VirtualDevice::SetOutputSizePixel (this=0x557da1d5e290, rNewSize=Size = {...}, bErase=true, bAlphaMaskTransparent=true) at /home/michi/development/git/libreoffice/vcl/source/gdi/virdev.cxx:350
    #14 0x00007fbf5b2ac951 in Bitmap::Bitmap (this=0x7fffdcfcae00, rBitmapEx=...) at /home/michi/development/git/libreoffice/vcl/source/bitmap/bitmap.cxx:146
    #15 0x00007fbf5b5e8e6f in vcl::PngImageReader::read (this=0x7fffdcfcb128, rBitmap=...) at /home/michi/development/git/libreoffice/vcl/source/filter/png/PngImageReader.cxx:820
    #16 0x00007fbf2c1be088 in (anonymous namespace)::toXGraphic (rImage=...) at /home/michi/development/git/libreoffice/avmedia/source/qt6/QtFrameGrabber.cxx:36
    #17 0x00007fbf2c1bda8e in avmedia::qt::QtFrameGrabber::onVideoFrameChanged (this=0x7fbf24003b00, rFrame=...) at /home/michi/development/git/libreoffice/avmedia/source/qt6/QtFrameGrabber.cxx:73
    #18 0x00007fbf2c1c33d4 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QVideoFrame const&>, void, void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&)>::call(void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&), avmedia::qt::QtFrameGrabber*, void**)::{lambda()#1}::operator()() const (this=0x7fffdcfcb300) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #19 0x00007fbf2c1c3359 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QVideoFrame const&>, void, void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&)>::call(void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&), avmedia::qt::QtFrameGrabber*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QVideoFrame const&>, void, void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&)>::call(void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&), avmedia::qt::QtFrameGrabber*, void**)::{lambda()#1}&&) (args=0x7fbf24003bd8, fn=...)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #20 0x00007fbf2c1c3323 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QVideoFrame const&>, void, void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&)>::call
        (f=(void (avmedia::qt::QtFrameGrabber::*)(class avmedia::qt::QtFrameGrabber * const, const class QVideoFrame &)) 0x7fbf2c1bda40 <avmedia::qt::QtFrameGrabber::onVideoFrameChanged(QVideoFrame const&)>, o=0x7fbf24003b00, arg=0x7fbf24003bd8) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #21 0x00007fbf2c1c329d in QtPrivate::FunctionPointer<void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&)>::call<QtPrivate::List<QVideoFrame const&>, void>
        (f=(void (avmedia::qt::QtFrameGrabber::*)(class avmedia::qt::QtFrameGrabber * const, const class QVideoFrame &)) 0x7fbf2c1bda40 <avmedia::qt::QtFrameGrabber::onVideoFrameChanged(QVideoFrame const&)>, o=0x7fbf24003b00, arg=0x7fbf24003bd8) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #22 0x00007fbf2c1c31c6 in QtPrivate::QCallableObject<void (avmedia::qt::QtFrameGrabber::*)(QVideoFrame const&), QtPrivate::List<QVideoFrame const&>, void>::impl
        (which=1, this_=0x557d9d23f1c0, r=0x7fbf24003b00, a=0x7fbf24003bd8, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #23 0x00007fbf51907b62 in QtPrivate::QSlotObjectBase::call (this=0x557d9d23f1c0, r=0x7fbf24003b00, a=0x7fbf24003bd8) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #24 0x00007fbf51b1a02c in QMetaCallEvent::placeMetaCall (this=0x7fbf24003b90, object=0x7fbf24003b00) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:544
    #25 0x00007fbf51b1c1c1 in QObject::event (this=0x7fbf24003b00, e=0x7fbf24003b90) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1465
    #26 0x00007fbf4f9e6130 in QApplicationPrivate::notify_helper (this=0x557d975ccb40, receiver=0x7fbf24003b00, e=0x7fbf24003b90) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3307
    #27 0x00007fbf4f9ea038 in QApplication::notify (this=0x557d975bdec0, receiver=0x7fbf24003b00, e=0x7fbf24003b90) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3257
    #28 0x00007fbf51a52ac9 in QCoreApplication::notifyInternal2 (receiver=0x7fbf24003b00, event=0x7fbf24003b90) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109
    #29 0x00007fbf51a53739 in QCoreApplication::sendEvent (receiver=0x7fbf24003b00, event=0x7fbf24003b90) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1549
    #30 0x00007fbf51a5466a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x557d975f3770) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1904
    #31 0x00007fbf51a5357c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1757
    #32 0x00007fbf5205bba1 in postEventSourceDispatch (s=0x557d9761ac80) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
    #33 0x00007fbf561043c5 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #34 0x00007fbf561065f7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #35 0x00007fbf56106d60 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #36 0x00007fbf5205addb in QEventDispatcherGlib::processEvents (this=0x557d975bf280, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
    #37 0x00007fbf5119f838 in QPAEventDispatcherGlib::processEvents (this=0x557d975bf280, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89
    #38 0x00007fbf52a19b84 in QtInstance::ImplYield (this=0x557d976494e0, bWait=false, bHandleAllCurrentEvents=true) at vcl/qt6/../qt5/QtInstance.cxx:503
    #39 0x00007fbf52a1ce71 in QtInstance::DoYield (this=0x557d976494e0, bWait=false, bHandleAllCurrentEvents=true) at vcl/qt6/../qt5/QtInstance.cxx:512
    #40 0x00007fbf5b45f3a6 in ImplYield (i_bWait=false, i_bAllEvents=true) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #41 0x00007fbf5b45f667 in Scheduler::ProcessEventsToIdle () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:435
    #42 0x00007fbf2c1be3cd in avmedia::qt::QtFrameGrabber::grabFrame (this=0x7fbf24003b00, fMediaTime=0) at /home/michi/development/git/libreoffice/avmedia/source/qt6/QtFrameGrabber.cxx:100
    #43 0x00007fbf2c1be4ce in non-virtual thunk to avmedia::qt::QtFrameGrabber::grabFrame(double) () at /home/michi/development/git/libreoffice/instdir/program/../program/libavmediaqt6.so
    #44 0x00007fbf5d3e5b13 in avmedia::MediaWindow::grabFrame (xPlayer=uno::Reference to (avmedia::qt::QtPlayer *) 0x557d9c991168, rGraphic=empty uno::Reference)
        at /home/michi/development/git/libreoffice/avmedia/source/viewer/mediawindow.cxx:384
    #45 0x00007fbf5e430b5f in SdrMediaObj::getSnapshot() const::$_0::operator()(com::sun::star::uno::Reference<com::sun::star::media::XPlayer> const&) const
        (this=0x557d9c98fea0, rPlayer=uno::Reference to (avmedia::qt::QtPlayer *) 0x557d9c991168) at /home/michi/development/git/libreoffice/svx/source/svdraw/svdomedia.cxx:195
    #46 0x00007fbf5e430add in std::__invoke_impl<void, SdrMediaObj::getSnapshot() const::$_0&, com::sun::star::uno::Reference<com::sun::star::media::XPlayer> const&>(std::__invoke_other, SdrMediaObj::getSnapshot() const::$_0&, com::sun::star::uno::Reference<com::sun::star::media::XPlayer> const&) (__f=..., __args=uno::Reference to (avmedia::qt::QtPlayer *) 0x557d9c991168) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/invoke.h:61
    #47 0x00007fbf5e430a8d in std::__invoke_r<void, SdrMediaObj::getSnapshot() const::$_0&, com::sun::star::uno::Reference<com::sun::star::media::XPlayer> const&>(SdrMediaObj::getSnapshot() const::$_0&, com::sun::star::uno::Reference<com::sun::star::media::XPlayer> const&) (__fn=..., __args=uno::Reference to (avmedia::qt::QtPlayer *) 0x557d9c991168) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/invoke.h:111
    #48 0x00007fbf5e430905 in std::_Function_handler<void(com::sun::star::uno::Reference<com::sun::star::media::XPlayer> const&), SdrMediaObj::getSnapshot() const::$_0>::_M_invoke
        (__functor=..., __args=uno::Reference to (avmedia::qt::QtPlayer *) 0x557d9c991168) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_function.h:290
    #49 0x00007fbf5d3ec066 in std::function<void(com::sun::star::uno::Reference<com::sun::star::media::XPlayer> const&)>::operator() (this=0x557d9c975aa8, __args=uno::Reference to (avmedia::qt::QtPlayer *) 0x557d9c991168)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_function.h:591
    #50 0x00007fbf5d3e8261 in avmedia::PlayerListener::callPlayerWindowSizeAvailable (this=0x557d9c975a60, rPlayer=uno::Reference to (avmedia::qt::QtPlayer *) 0x557d9c991168) at include/avmedia/mediawindow.hxx:74
    #51 0x00007fbf5d3e5eab in avmedia::MediaWindow::grabFrame (rURL="file:///tmp/7qg9UE.ogg", rReferer="", sMimeType="audio/ogg", xPreferredPixelSizeListener=rtl::Reference to 0x557d9c975a60)
        at /home/michi/development/git/libreoffice/avmedia/source/viewer/mediawindow.cxx:434
    #52 0x00007fbf5e42e93c in SdrMediaObj::getSnapshot (this=0x557d9921fd10) at /home/michi/development/git/libreoffice/svx/source/svdraw/svdomedia.cxx:199
    #53 0x00007fbf5e17a1a9 in sdr::contact::ViewContactOfSdrMediaObj::createViewIndependentPrimitive2DSequence (this=0x557d997790d0, rVisitor=...)
        at /home/michi/development/git/libreoffice/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx:122
    #54 0x00007fbf5e19363b in sdr::contact::ViewContact::getViewIndependentPrimitive2DContainer (this=0x557d997790d0, rVisitor=...) at /home/michi/development/git/libreoffice/svx/source/sdr/contact/viewcontact.cxx:261
    #55 0x00007fbf5e3c8a34 in SdrObject::RecalcBoundRect (this=0x557d9921fd10) at /home/michi/development/git/libreoffice/svx/source/svdraw/svdobj.cxx:988
    #56 0x00007fbf5e3c8959 in SdrObject::GetCurrentBoundRect (this=0x557d9921fd10) at /home/michi/development/git/libreoffice/svx/source/svdraw/svdobj.cxx:958
    #57 0x00007fbf5e4b91d0 in SdrObjList::RecalcRects (this=0x557d9925ec30) at /home/michi/development/git/libreoffice/svx/source/svdraw/svdpage.cxx:242
    #58 0x00007fbf5e4bcf99 in SdrObjList::GetAllObjBoundRect (this=0x557d9925ec30) at /home/michi/development/git/libreoffice/svx/source/svdraw/svdpage.cxx:740
    #59 0x00007fbf5e4e1142 in SdrPageView::InvalidateAllWin (this=0x557d9c973a00) at /home/michi/development/git/libreoffice/svx/source/svdraw/svdpagv.cxx:202
    #60 0x00007fbf5e4e3301 in SdrPageView::SetHelpLines (this=0x557d9c973a00, rHLL=...) at /home/michi/development/git/libreoffice/svx/source/svdraw/svdpagv.cxx:687
    #61 0x00007fbf2fe0a543 in sd::DrawViewShell::SwitchPage (this=0x557d990dc4b0, nSelectedPage=0, bAllowChangeFocus=true, bUpdateScrollbars=true) at /home/michi/development/git/libreoffice/sd/source/ui/view/drviews1.cxx:1050
    #62 0x00007fbf2fe0869d in sd::DrawViewShell::ChangeEditMode (this=0x557d990dc4b0, eEMode=EditMode::Page, bIsLayerModeActive=false) at /home/michi/development/git/libreoffice/sd/source/ui/view/drviews1.cxx:409
    #63 0x00007fbf2fe566cc in sd::DrawViewShell::ReadFrameViewData (this=0x557d990dc4b0, pView=0x557d9c970370) at /home/michi/development/git/libreoffice/sd/source/ui/view/drviews5.cxx:291
    #64 0x00007fbf2fe6f3e1 in sd::DrawViewShell::Construct (this=0x557d990dc4b0, pDocSh=0x557d98f74bd0, eInitialPageKind=PageKind::Standard) at /home/michi/development/git/libreoffice/sd/source/ui/view/drviewsa.cxx:304
    #65 0x00007fbf2fe6ea0d in sd::DrawViewShell::DrawViewShell (this=0x557d990dc4b0, rViewShellBase=..., pParentWindow=0x557d99842f80, ePageKind=PageKind::Standard, pFrameViewArgument=0x0)
        at /home/michi/development/git/libreoffice/sd/source/ui/view/drviewsa.cxx:126
    #66 0x00007fbf2f9caedd in std::_Construct<sd::DrawViewShell, sd::ViewShellBase&, vcl::Window*, PageKind, sd::FrameView*&>
        (__p=0x557d990dc4b0, __args=..., __args=@0x7fffdcfcfcd0: 0x557d99842f80, __args=@0x7fffdcfcfccc: PageKind::Standard, __args=@0x7fffdcfcfcf0: 0x0)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:119
    #67 0x00007fbf2f9caafe in std::allocator_traits<std::allocator<void> >::construct<sd::DrawViewShell, sd::ViewShellBase&, vcl::Window*, PageKind, sd::FrameView*&>
        (__p=0x557d990dc4b0, __args=..., __args=@0x7fffdcfcfcd0: 0x557d99842f80, __args=@0x7fffdcfcfccc: PageKind::Standard, __args=@0x7fffdcfcfcf0: 0x0)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/alloc_traits.h:706
    #68 std::_Sp_counted_ptr_inplace<sd::DrawViewShell, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<sd::ViewShellBase&, vcl::Window*, PageKind, sd::FrameView*&>
        (this=0x557d990dc4a0, __a=..., __args=..., __args=@0x7fffdcfcfcd0: 0x557d99842f80, __args=@0x7fffdcfcfccc: PageKind::Standard, __args=@0x7fffdcfcfcf0: 0x0)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:607
    #69 0x00007fbf2f9ca8f7 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<sd::DrawViewShell, std::allocator<void>, sd::ViewShellBase&, vcl::Window*, PageKind, sd::FrameView*&>
        (this=0x7fffdcfcfce0, __p=@0x7fffdcfcfcd8: 0x0, __a=..., __args=..., __args=@0x7fffdcfcfcd0: 0x557d99842f80, __args=@0x7fffdcfcfccc: PageKind::Standard, __args=@0x7fffdcfcfcf0: 0x0)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:970
    #70 0x00007fbf2f9ca81a in std::__shared_ptr<sd::DrawViewShell, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, sd::ViewShellBase&, vcl::Window*, PageKind, sd::FrameView*&>
        (this=0x7fffdcfcfcd8, __tag=..., __args=..., __args=@0x7fffdcfcfcd0: 0x557d99842f80, __args=@0x7fffdcfcfccc: PageKind::Standard, __args=@0x7fffdcfcfcf0: 0x0)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1713
    #71 0x00007fbf2f9ca792 in std::shared_ptr<sd::DrawViewShell>::shared_ptr<std::allocator<void>, sd::ViewShellBase&, vcl::Window*, PageKind, sd::FrameView*&>
        (this=0x7fffdcfcfcd8, __tag=..., __args=..., __args=@0x7fffdcfcfcd0: 0x557d99842f80, __args=@0x7fffdcfcfccc: PageKind::Standard, __args=@0x7fffdcfcfcf0: 0x0)
        at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:463
    #72 0x00007fbf2f9c4911 in std::make_shared<sd::DrawViewShell, sd::ViewShellBase&, vcl::Window*, PageKind, sd::FrameView*&>
        (__args=..., __args=@0x7fffdcfcfcd0: 0x557d99842f80, __args=@0x7fffdcfcfccc: PageKind::Standard, __args=@0x7fffdcfcfcf0: 0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:1007
    #73 0x00007fbf2f9c11f3 in sd::framework::BasicViewFactory::CreateViewShell (this=0x557d9963e1a0, rxViewId=rtl::Reference to 0x557d998d8910, rWindow=..., pFrameView=0x0)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/factories/BasicViewFactory.cxx:284
    #74 0x00007fbf2f9c0553 in sd::framework::BasicViewFactory::CreateView (this=0x557d9963e1a0, rxViewId=rtl::Reference to 0x557d998d8910, rWindow=..., rxPane=rtl::Reference to 0x557d9c953020, pFrameView=0x0, bIsCenterPane=true)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/factories/BasicViewFactory.cxx:241
    #75 0x00007fbf2f9bffcb in sd::framework::BasicViewFactory::createResource (this=0x557d9963e1a0, rxViewId=rtl::Reference to 0x557d998d8910)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/factories/BasicViewFactory.cxx:167
    #76 0x00007fbf2f994c48 in sd::framework::ConfigurationControllerResourceManager::ActivateResource (this=0x557d9963f120, rxResourceId=rtl::Reference to 0x557d998d8910, rxConfiguration=rtl::Reference to 0x557d999b0dc0)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:130
    #77 0x00007fbf2f9945f8 in sd::framework::ConfigurationControllerResourceManager::ActivateResources (this=0x557d9963f120, rResources=std::__debug::vector of length 5, capacity 5 = {...}, rxConfiguration=rtl::Reference to 0x557d999b0dc0)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:75
    #78 0x00007fbf2f99d07a in sd::framework::ConfigurationUpdater::UpdateCore (this=0x557d999afee0, rClassifier=...) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:251
    #79 0x00007fbf2f99c61c in sd::framework::ConfigurationUpdater::UpdateConfiguration (this=0x557d999afee0) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:161
    #80 0x00007fbf2f99c09b in sd::framework::ConfigurationUpdater::RequestUpdate (this=0x557d999afee0, rxRequestedConfiguration=rtl::Reference to 0x557d998c8ed0)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:108
    #81 0x00007fbf2f96fe69 in sd::framework::ChangeRequestQueueProcessor::ProcessOneEvent (this=0x557d999b0e60) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:158
    #82 0x00007fbf2f982909 in sd::framework::ConfigurationController::ProcessEvent (this=0x557d999b0bf0) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationController.cxx:157
    #83 0x00007fbf2fdbc797 in sd::ViewShellBase::LateInit (this=0x557d99242e30, rsDefaultView="") at /home/michi/development/git/libreoffice/sd/source/ui/view/ViewShellBase.cxx:345
    #84 0x00007fbf2fd78a33 in sd::ImpressViewShellBase::CreateInstance (rFrame=..., pOldView=0x0) at /home/michi/development/git/libreoffice/sd/source/ui/view/ImpressViewShellBase.cxx:45
    #85 0x00007fbf60a31855 in SfxViewFactory::CreateInstance (this=0x557d991cd6a0, rFrame=..., pOldSh=0x0) at /home/michi/development/git/libreoffice/sfx2/source/view/viewfac.cxx:26
    #86 0x00007fbf60840fbf in SfxBaseModel::createViewController (this=0x557d9913bc50, i_rViewName="Default", i_rArguments=empty uno::Sequence, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x557d98f32e40)
        at /home/michi/development/git/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:4355
    #87 0x00007fbf60841a9f in non-virtual thunk to SfxBaseModel::createViewController(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&) () at /home/michi/development/git/libreoffice/instdir/program/libsfxlo.so
    #88 0x00007fbf609dc0f4 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView
        (i_rModel=uno::Reference to (SdXImpressDocument *) 0x557d9913bce0, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x557d98f32e40, i_rViewFactoryArgs=..., i_rViewName="Default")
        at /home/michi/development/git/libreoffice/sfx2/source/view/frmload.cxx:586
    #89 0x00007fbf609d96ac in (anonymous namespace)::SfxFrameLoader_Impl::load (this=0x557d99388d30, rArgs=uno::Sequence of length 12 = {...}, _rTargetFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x557d98f32e40)
        at /home/michi/development/git/libreoffice/sfx2/source/view/frmload.cxx:813
    #90 0x00007fbf615c72c4 in framework::LoadEnv::impl_loadContent (this=0x557d98866fa8) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:1180
    #91 0x00007fbf615c4425 in framework::LoadEnv::start (this=0x557d98866fa8) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:415
    #92 0x00007fbf615c20d2 in framework::LoadEnv::startLoading
        (this=0x557d98866fa8, sURL="file:///home/michi/git/computer-doc/misc/impress_presentations_with_audio_and_video/slide_with_video.odp", lMediaDescriptor=uno::Sequence of length 4 = {...}, xBaseFrame=uno::Reference to (framework::Desktop *) 0x557d978a34b8, sTarget="_default", nSearchFlags=0, eFeature=(LoadEnvFeatures::WorkWithUI | LoadEnvFeatures::AllowContentHandler)) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:311
    #93 0x00007fbf6145aaa1 in framework::LoadDispatcher::impl_dispatch (this=0x557d98866f50, rURL=..., lArguments=uno::Sequence of length 4 = {...}, xListener=empty uno::Reference)
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:107
    #94 0x00007fbf6145b801 in framework::LoadDispatcher::dispatchWithReturnValue (this=0x557d98866f50, rURL=..., lArguments=uno::Sequence of length 4 = {...})
        at /home/michi/development/git/libreoffice/framework/source/dispatch/loaddispatcher.cxx:60
    #95 0x00007fbf6145b8a4 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
    #96 0x00007fbf629f10c0 in comphelper::SynchronousDispatch::dispatch
        (xStartPoint=uno::Reference to (framework::Desktop *) 0x557d978a34a8, sURL="file:///home/michi/git/computer-doc/misc/impress_presentations_with_audio_and_video/slide_with_video.odp", sTarget="_default", lArguments=uno::Sequence of length 4 = {...}) at /home/michi/development/git/libreoffice/comphelper/source/misc/synchronousdispatch.cxx:62
    #97 0x00007fbf64377054 in desktop::DispatchWatcher::executeDispatchRequests (this=0x557d99219bb0, aDispatchRequestsList=std::__debug::vector of length 1, capacity 1 = {...}, bNoTerminate=false, pFlags=0x7fffdcfd6994)
        at /home/michi/development/git/libreoffice/desktop/source/app/dispatchwatcher.cxx:531
    #98 0x00007fbf64395488 in desktop::RequestHandler::ExecuteCmdLineRequests (aRequest=..., noTerminate=false) at /home/michi/development/git/libreoffice/desktop/source/app/officeipcthread.cxx:1317
    #99 0x00007fbf6432ee7f in desktop::Desktop::OpenClients () at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:2218
    #100 0x00007fbf6432cdf3 in desktop::Desktop::OpenClients_Impl (this=0x7fffdcfda450) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1978
    #101 0x00007fbf6432b45d in desktop::Desktop::LinkStubOpenClients_Impl (instance=0x7fffdcfda450, data=0x0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1962
    #102 0x00007fbf5ac98231 in Link<void*, void>::Call (this=0x557d98fba098, data=0x0) at include/tools/link.hxx:105
    #103 0x00007fbf5ac93af1 in ImplHandleUserEvent (pSVEvent=0x557d98fba090) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2312
    #104 0x00007fbf5ac90a1f in ImplWindowFrameProc (_pWindow=0x557d988b22c0, nEvent=SalEvent::UserEvent, pEvent=0x557d98fba090) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2876
    #105 0x00007fbf529fb3ec in SalFrame::CallCallback (this=0x557d988b3f20, nEvent=SalEvent::UserEvent, pEvent=0x557d98fba090) at vcl/inc/salframe.hxx:310
    #106 0x00007fbf52a1d2af in QtInstance::ProcessEvent (this=0x557d976494e0, aEvent=...) at vcl/qt6/../qt5/QtInstance.cxx:594
    #107 0x00007fbf5b393fbd in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffdcfd88a0) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #108 0x00007fbf5b393e8b in SalUserEventList::DispatchUserEvents (this=0x557d97649518, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #109 0x00007fbf52a19a91 in QtInstance::ImplYield (this=0x557d976494e0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:490
    #110 0x00007fbf52a1ce71 in QtInstance::DoYield (this=0x557d976494e0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:512
    #111 0x00007fbf5b45f3a6 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #112 0x00007fbf5b45ecbf in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #113 0x00007fbf5b45eaa0 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #114 0x00007fbf64329435 in desktop::Desktop::Main (this=0x7fffdcfda450) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1678
    #115 0x00007fbf5b48b2c6 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #116 0x00007fbf5b48cdb9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #117 0x00007fbf643a30ea in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #118 0x0000557d789219fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #119 0x0000557d789219d7 in main (argc=2, argv=0x7fffdcfda658) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: I1e2265e38d7c93171146df4f58666e9cf22bdaf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189036
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Aug 13, 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 <[email protected]>
(cherry picked from commit 38024bc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188096
Reviewed-by: Xisco Fauli <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Aug 14, 2025
...to avoid

> warn:legacy.osl:1217871:1217871:sd/source/ui/framework/tools/FrameworkHelper.cxx:656: FrameworkHelper::WaitForEvent(), no event for a minute? giving up!
> warn:legacy.osl:1217871:1217871:canvas/source/cairo/cairo_spritecanvas.cxx:82: CairoSpriteCanvas::SpriteCanvas: No Cairo capability
> =================================================================
> ==1217871==ERROR: AddressSanitizer: stack-use-after-return on address 0x7fa9e7be2720 at pc 0x7fa98f2d3422 bp 0x7ffea89263e0 sp 0x7ffea89263d8
> WRITE of size 1 at 0x7fa9e7be2720 thread T0
>     #0 0x7fa98f2d3421 in sd::framework::(anonymous namespace)::FlagUpdater::operator()(bool) const /sd/source/ui/framework/tools/FrameworkHelper.cxx:627:42
>     #1 0x7fa98f2d330e in void std::__invoke_impl<void, sd::framework::(anonymous namespace)::FlagUpdater&, bool>(std::__invoke_other, sd::framework::(anonymous namespace)::FlagUpdater&, bool&&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:61:14
>     #2 0x7fa98f2d30ed in std::enable_if<is_invocable_r_v<void, sd::framework::(anonymous namespace)::FlagUpdater&, bool>, void>::type std::__invoke_r<void, sd::framework::(anonymous namespace)::FlagUpdater&, bool>(sd::framework::(anonymous namespace)::FlagUpdater&, bool&&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:111:2
>     #3 0x7fa98f2d2cad in std::_Function_handler<void (bool), sd::framework::(anonymous namespace)::FlagUpdater>::_M_invoke(std::_Any_data const&, bool&&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/std_function.h:290:9
>     #4 0x7fa98f2dc5eb in std::function<void (bool)>::operator()(bool) const /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/std_function.h:591:9
>     #5 0x7fa98f2ce73f in (anonymous namespace)::CallbackCaller::notifyConfigurationChange(sd::framework::ConfigurationChangeEvent const&) /sd/source/ui/framework/tools/FrameworkHelper.cxx:827:5
>     #6 0x7fa98f0cb3be in sd::framework::ConfigurationControllerBroadcaster::NotifyListeners(std::__debug::vector<rtl::Reference<sd::framework::ConfigurationChangeListener>, std::allocator<rtl::Reference<sd::framework::ConfigurationChangeListener> > > const&, sd::framework::ConfigurationChangeEvent const&) /sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx:84:24
>     #7 0x7fa98f0cbe73 in sd::framework::ConfigurationControllerBroadcaster::NotifyListeners(sd::framework::ConfigurationChangeEvent const&) /sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx:109:9
>     #8 0x7fa98f12ee24 in sd::framework::ConfigurationUpdater::UpdateConfiguration() /sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:169:28
>     #9 0x7fa98f12d569 in sd::framework::ConfigurationUpdater::RequestUpdate(rtl::Reference<sd::framework::Configuration> const&) /sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:108:13
>     #10 0x7fa98f0536dc in sd::framework::ChangeRequestQueueProcessor::ProcessOneEvent() /sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:158:33
>     #11 0x7fa98f0521a9 in sd::framework::ChangeRequestQueueProcessor::ProcessEvent(void*) /sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:115:5
>     #12 0x7fa98f052018 in sd::framework::ChangeRequestQueueProcessor::LinkStubProcessEvent(void*, void*) /sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:109:1
>     #13 0x7fa9caadaf2d in Link<void*, void>::Call(void*) const /include/tools/link.hxx:105:45
>     #14 0x7fa9caac0560 in ImplHandleUserEvent(ImplSVEvent*) /vcl/source/window/winproc.cxx:2312:30
>     #15 0x7fa9caaab2aa in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) /vcl/source/window/winproc.cxx:2876:13
>     #16 0x7fa9ce83a5f2 in SalFrame::CallCallback(SalEvent, void const*) const /vcl/inc/salframe.hxx:310:29
>     #17 0x7fa9ce8e7311 in SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) /vcl/headless/svpinst.cxx:284:22
>     #18 0x7fa9ce8e7aa2 in non-virtual thunk to SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) /vcl/headless/svpinst.cxx
>     #19 0x7fa9cd06f7a3 in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const /vcl/source/app/salusereventlist.cxx:119:58
>     #20 0x7fa9cd06ef3a in SalUserEventList::DispatchUserEvents(bool) /vcl/source/app/salusereventlist.cxx:120:13
>     #21 0x7fa9ce8eb7ba in SvpSalInstance::ImplYield(bool, bool) /vcl/headless/svpinst.cxx:437:22
>     #22 0x7fa9ce8edfd3 in SvpSalInstance::DoYield(bool, bool) /vcl/headless/svpinst.cxx:516:21
>     #23 0x7fa9cd4d1a1a in ImplYield(bool, bool) /vcl/source/app/svapp.cxx:385:48
>     #24 0x7fa9cd4d28cf in Scheduler::ProcessEventsToIdle() /vcl/source/app/svapp.cxx:435:12
>     #25 0x7fa9a610ec3c in SdUiImpressTest::typeKey(SdXImpressDocument*, unsigned short) /sd/qa/unit/uiimpress.cxx:103:5
>     #26 0x7fa9a619cf17 in testTdf166647_userpaint::TestBody() /sd/qa/unit/uiimpress.cxx:2012:5
>     #27 0x7fa9a6327587 in void std::__invoke_impl<void, void (testTdf166647_userpaint::*&)(), testTdf166647_userpaint*&>(std::__invoke_memfun_deref, void (testTdf166647_userpaint::*&)(), testTdf166647_userpaint*&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:74:14
>     #28 0x7fa9a63271f4 in std::__invoke_result<void (testTdf166647_userpaint::*&)(), testTdf166647_userpaint*&>::type std::__invoke<void (testTdf166647_userpaint::*&)(), testTdf166647_userpaint*&>(void (testTdf166647_userpaint::*&)(), testTdf166647_userpaint*&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14
>     #29 0x7fa9a6327070 in void std::_Bind<void (testTdf166647_userpaint::* (testTdf166647_userpaint*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11
>     #30 0x7fa9a6326dd4 in void std::_Bind<void (testTdf166647_userpaint::* (testTdf166647_userpaint*))()>::operator()<void>() /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17
>     #31 0x7fa9a6326c4c in void std::__invoke_impl<void, std::_Bind<void (testTdf166647_userpaint::* (testTdf166647_userpaint*))()>&>(std::__invoke_other, std::_Bind<void (testTdf166647_userpaint::* (testTdf166647_userpaint*))()>&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:61:14
>     #32 0x7fa9a6326afc in std::enable_if<is_invocable_r_v<void, std::_Bind<void (testTdf166647_userpaint::* (testTdf166647_userpaint*))()>&>, void>::type std::__invoke_r<void, std::_Bind<void (testTdf166647_userpaint::* (testTdf166647_userpaint*))()>&>(std::_Bind<void (testTdf166647_userpaint::* (testTdf166647_userpaint*))()>&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:111:2
>     #33 0x7fa9a632629c in std::_Function_handler<void (), std::_Bind<void (testTdf166647_userpaint::* (testTdf166647_userpaint*))()> >::_M_invoke(std::_Any_data const&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/std_function.h:290:9
>     #34 0x7fa9a6217041 in std::function<void ()>::operator()() const /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/std_function.h:591:9
>     #35 0x7fa9a6325668 in CppUnit::TestCaller<testTdf166647_userpaint>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7
>     #36 0x7fa9ecf0988b in CppUnit::TestCaseMethodFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x31688b)
>     #37 0x7fa9ed3c86c0 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:37:14
>     #38 0x7fa9eced8ccc in CppUnit::ProtectorChain::ProtectFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x2e5ccc)
>     #39 0x7fa9e7651410 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12
>     #40 0x7fa9eced8ccc in CppUnit::ProtectorChain::ProtectFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x2e5ccc)
>     #41 0x7fa9ed2ff0ae in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:181:16
>     #42 0x7fa9eced8ccc in CppUnit::ProtectorChain::ProtectFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x2e5ccc)
>     #43 0x7fa9ece619df in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x26e9df)
>     #44 0x7fa9eced8ccc in CppUnit::ProtectorChain::ProtectFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x2e5ccc)
>     #45 0x7fa9eced2498 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x2df498)
>     #46 0x7fa9ecf7a1e7 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/.libs/libcppunit-1.15.so.1+0x3871e7)
>     #47 0x7fa9ecf080eb in CppUnit::TestCase::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x3150eb)
>     #48 0x7fa9ecf0bbc1 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x318bc1)
>     #49 0x7fa9ecf0ae18 in CppUnit::TestComposite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x317e18)
>     #50 0x7fa9ecf0bbc1 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x318bc1)
>     #51 0x7fa9ecf0ae18 in CppUnit::TestComposite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x317e18)
>     #52 0x7fa9ecfaf846 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x3bc846)
>     #53 0x7fa9ecf78c9e in CppUnit::TestResult::runTest(CppUnit::Test*) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x385c9e)
>     #54 0x7fa9ecfb0712 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x3bd712)
>     #55 0x50a2bb in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:328:20
>     #56 0x506d13 in main2() /sal/cppunittester/cppunittester.cxx:482:16
>     #57 0x50512f in sal_main() /sal/cppunittester/cppunittester.cxx:627:14
>     #58 0x504f6e in main /sal/cppunittester/cppunittester.cxx:622:1

(<https://ci.libreoffice.org/job/lo_ubsan/3648/>) as seen during (recently
introduced) CppunitTest_sd_uiimpress testTdf166647_userpaint::TestBody.

(I assume that there is a pre-existing race accessing
CallbackCaller::mxConfigurationController, and that an additional
CallbackCaller::stop accessing it doesn't make things worse, so left that point
alone for now.)

Change-Id: I069b2935b5ca6430710d401b4cae32e4b9c8b7f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189598
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Aug 20, 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 <[email protected]>
(cherry picked from commit 38024bc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188096
Reviewed-by: Xisco Fauli <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Aug 28, 2025
This fixes the below assert seen with gtk4 when
hovering over paragraph styles in the "Styles" sidebar
deck in Writer with.

    soffice.bin: /home/michi/development/git/libreoffice/vcl/source/app/dbggui.cxx:36: void ImplDbgTestSolarMutex(bool): Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not owned!"' failed.

    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  0x00007fe0abe9e9ff in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
    #2  0x00007fe0abe49cc2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007fe0abe324ac in __GI_abort () at ./stdlib/abort.c:73
    #4  0x00007fe0abe32420 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=36, function=<optimized out>) at ./assert/assert.c:118
    #5  0x00007fe0a31b5ccc in ImplDbgTestSolarMutex (owned=true) at /home/michi/development/git/libreoffice/vcl/source/app/dbggui.cxx:36
    #6  0x00007fe0aa32b044 in DbgTestSolarMutex (owned=true) at /home/michi/development/git/libreoffice/tools/source/debug/debug.cxx:54
    #7  0x00007fe0549fc572 in SwModify::CallSwClientNotify (this=0x559770009880, rHint=...) at /home/michi/development/git/libreoffice/sw/source/core/attr/calbck.cxx:273
    #8  0x00007fe0549fc9b1 in sw::BroadcastingModify::CallSwClientNotify (this=0x559770009880, rHint=...) at /home/michi/development/git/libreoffice/sw/source/core/attr/calbck.cxx:297
    #9  0x00007fe054f0cd67 in SwDoc::IsUsed (this=0x55976fdd1cf0, rModify=...) at /home/michi/development/git/libreoffice/sw/source/core/doc/poolfmt.cxx:109
    #10 0x00007fe055e8fe47 in SwDocStyleSheet::IsUsed (this=0x55976fe02e80) at /home/michi/development/git/libreoffice/sw/source/uibase/app/docstyle.cxx:2481
    #11 0x00007fe0a83f603d in StyleList::QueryTooltipHdl (this=0x559771b48dd0, rEntry=...) at /home/michi/development/git/libreoffice/sfx2/source/dialog/StyleList.cxx:1753
    #12 0x00007fe0a83edd68 in StyleList::LinkStubQueryTooltipHdl (instance=0x559771b48dd0, data=...) at /home/michi/development/git/libreoffice/sfx2/source/dialog/StyleList.cxx:1743
    #13 0x00007fe09a7907bd in Link<weld::TreeIter const&, rtl::OUString>::Call (this=0x559771b27bb8, data=...) at include/tools/link.hxx:105
    #14 0x00007fe09a79075f in weld::TreeView::signal_query_tooltip (this=0x559771b27a08, rIter=...) at include/vcl/weld.hxx:1025
    #15 0x00007fe09a6e8d09 in (anonymous namespace)::GtkInstanceTreeView::signalQueryTooltip (x=382, y=153, keyboard_tip=0, tooltip=0x559769fbaa90, widget=0x559771b27400) at vcl/unx/gtk4/../gtk3/gtkinst.cxx:14531
    #16 0x00007fe0994dedfc in _gtk_marshal_BOOLEAN__INT_INT_BOOLEAN_OBJECT (closure=0x559771b24580, return_value=0x7ffef76e15b0, n_param_values=5, param_values=0x7ffef76e1640, invocation_hint=0x7ffef76e1590, marshal_data=0x0)
        at gtk/gtkmarshalers.c:1109
    #17 0x00007fe0a967d950 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #18 0x00007fe0a9691d43 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #19 0x00007fe0a9693032 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #20 0x00007fe0a96995a6 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #21 0x00007fe0a9699663 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #22 0x00007fe0997c6ada in gtk_widget_query_tooltip (widget=0x55976892b2b0, x=382, y=153, keyboard_mode=0, tooltip=0x559769fbaa90) at ../gtk/gtkwidget.c:5114
    #23 0x00007fe0997af430 in gtk_tooltip_run_requery (widget=0x7ffef76e1a58, tooltip=0x559769fbaa90, x=0x7ffef76e1a90, y=0x7ffef76e1a8c) at ../gtk/gtktooltip.c:559
    #24 0x00007fe0997b01bb in gtk_tooltip_handle_event_internal (event_type=GDK_MOTION_NOTIFY, surface=0x559764aa88a0, target_widget=0x55976892b2b0, dx=382.953125, dy=153.796875) at ../gtk/gtktooltip.c:1009
    #25 0x00007fe0997b0065 in _gtk_tooltip_handle_event (target=0x55976892b2b0, event=0x559772515280) at ../gtk/gtktooltip.c:957
    #26 0x00007fe099686120 in gtk_main_do_event (event=0x559772515280) at ../gtk/gtkmain.c:1751
    #27 0x00007fe0997e6720 in surface_event (surface=0x559764aa88a0, event=0x559772515280, widget=0x55976a125f10) at ../gtk/gtkwindow.c:4951
    #28 0x00007fe099a684cb in _gdk_marshal_BOOLEAN__POINTERv (closure=0x55976bc7ddf0, return_value=0x7ffef76e1eb0, instance=0x559764aa88a0, args=0x7ffef76e1fb0, marshal_data=0x0, n_params=1, param_types=0x559764ac5730)
        at gdk/gdkmarshalers.c:302
    #29 0x00007fe099b50e3c in gdk_surface_event_marshallerv (closure=0x55976bc7ddf0, return_value=0x7ffef76e1eb0, instance=0x559764aa88a0, args=0x7ffef76e1fb0, marshal_data=0x0, n_params=1, param_types=0x559764ac5730)
        at ../gdk/gdksurface.c:465
    #30 0x00007fe0a967db81 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #31 0x00007fe0a9692b33 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #32 0x00007fe0a96995a6 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #33 0x00007fe0a9699663 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #34 0x00007fe099b55ee7 in gdk_surface_handle_event (event=0x559772515280) at ../gdk/gdksurface.c:3001
    #35 0x00007fe099b0ae91 in _gdk_event_emit (event=0x559772515280) at ../gdk/gdkevents.c:491
    #36 0x00007fe099b0b946 in _gdk_event_queue_flush (display=0x5597649c1140) at ../gdk/gdkevents.c:856
    #37 0x00007fe099b54d84 in gdk_surface_flush_events (clock=0x559764a437b0, data=0x559764aa88a0) at ../gdk/gdksurface.c:2419
    #38 0x00007fe0a967db81 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #39 0x00007fe0a96938b8 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #40 0x00007fe0a96995a6 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #41 0x00007fe0a9699663 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #42 0x00007fe099b13cae in _gdk_frame_clock_emit_flush_events (frame_clock=0x559764a437b0) at ../gdk/gdkframeclock.c:701
    #43 0x00007fe099b1492d in gdk_frame_clock_flush_idle (data=0x559764a437b0) at ../gdk/gdkframeclockidle.c:391
    #44 0x00007fe09e50744e in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #45 0x00007fe09e5043c5 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #46 0x00007fe09e5065f7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #47 0x00007fe09e506d60 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #48 0x00007fe09a683dac in GtkSalData::Yield (this=0x5597637370a0, bWait=true, bHandleAllCurrentEvents=false) at vcl/unx/gtk4/../gtk3/gtkdata.cxx:403
    #49 0x00007fe09a689403 in GtkInstance::DoYield (this=0x559763736f50, bWait=true, bHandleAllCurrentEvents=false) at vcl/unx/gtk4/../gtk3/gtkinst.cxx:440
    #50 0x00007fe0a328c606 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:385
    #51 0x00007fe0a328bf1f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:488
    #52 0x00007fe0a328bd00 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:360
    #53 0x00007fe0ac129915 in desktop::Desktop::Main (this=0x7ffef76e4160) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1678
    #54 0x00007fe0a32b8526 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #55 0x00007fe0a32ba019 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #56 0x00007fe0ac1a35ca in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #57 0x0000559759c3b9fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #58 0x0000559759c3b9d7 in main (argc=2, argv=0x7ffef76e4368) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: If520816e8f748a7f082226d216b10aa5a2c27717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190318
Reviewed-by: Michael Weghorn <[email protected]>
Tested-by: Jenkins
tdf-gerrit pushed a commit that referenced this pull request Aug 30, 2025
...cf.

> warn:sal.osl:998109:998080:sal/osl/unx/module.cxx:103: dlopen(.../core/instdir/program/libacclo.so, 1): .../core/instdir/program/libacclo.so: undefined symbol: _ZTI7TabPage

and the failing assert at

>  #0 in vcl::AccessibleFactoryAccess::ensureInitialized() at core/vcl/source/helper/svtaccessiblefactory.cxx:252:80
>  #1 in vcl::AccessibleFactoryAccess::getFactory() at core/vcl/source/helper/svtaccessiblefactory.cxx:280:9
>  #2 in IconView::CreateAccessible() at core/vcl/source/treelist/iconview.cxx:248:44
>  #3 in SalInstanceIconView::SalInstanceIconView(IconView*, SalInstanceBuilder*, bool) at core/vcl/source/app/salvtables.cxx:5398:45
>  #4 in JSWidget<SalInstanceIconView, IconView>::JSWidget(JSDialogSender*, IconView*, SalInstanceBuilder*, bool) at core/vcl/inc/jsdialog/jsdialogbuilder.hxx:300:11
>  #5 in JSIconView::JSIconView(JSDialogSender*, IconView*, SalInstanceBuilder*, bool) at core/vcl/jsdialog/jsdialogbuilder.cxx:1892:7
>  #6 in std::__detail::_MakeUniq<JSIconView>::__single_object std::make_unique<JSIconView, JSInstanceBuilder*, IconView*&, JSInstanceBuilder*, bool>(JSInstanceBuilder*&&, IconView*&, JSInstanceBuilder*&&, bool&&) at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/unique_ptr.h:1085:34
>  #7 in JSInstanceBuilder::weld_icon_view(rtl::OUString const&) at core/vcl/jsdialog/jsdialogbuilder.cxx:772:23
>  #8 in StylesPreviewWindow_Base::StylesPreviewWindow_Base(weld::Builder&, std::__debug::vector<std::pair<rtl::OUString, rtl::OUString>, std::allocator<std::pair<rtl::OUString, rtl::OUString>>>&&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at core/svx/source/tbxctrls/StylesPreviewWindow.cxx:449:30
>  #9 in StylesPreviewWindow_Impl::StylesPreviewWindow_Impl(vcl::Window*, std::__debug::vector<std::pair<rtl::OUString, rtl::OUString>, std::allocator<std::pair<rtl::OUString, rtl::OUString>>>&&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at core/svx/source/tbxctrls/StylesPreviewWindow.cxx:661:7
>  #10 in VclPtr<StylesPreviewWindow_Impl> VclPtr<StylesPreviewWindow_Impl>::Create<VclPtr<vcl::Window>&, std::__debug::vector<std::pair<rtl::OUString, rtl::OUString>, std::allocator<std::pair<rtl::OUString, rtl::OUString>>>, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>&>(VclPtr<vcl::Window>&, std::__debug::vector<std::pair<rtl::OUString, rtl::OUString>, std::allocator<std::pair<rtl::OUString, rtl::OUString>>>&&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>&) at core/include/vcl/vclptr.hxx:130:46
>  #11 in StylesPreviewToolBoxControl::createItemWindow(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&) at core/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx:159:25
>  #12 in non-virtual thunk to StylesPreviewToolBoxControl::createItemWindow(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&) at core/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
>  #13 in sfx2::sidebar::ControllerFactory::CreateToolBoxController(ToolBox*, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&, com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, int, bool) at core/sfx2/source/sidebar/ControllerFactory.cxx:117:63
>  #14 in sfx2::sidebar::SidebarToolBox::CreateController(o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, int, bool) at core/sfx2/source/sidebar/SidebarToolBox.cxx:169:59
>  #15 in sfx2::sidebar::SidebarToolBox::InsertItem(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, ToolBoxItemBits, Size const&, unsigned long) at core/sfx2/source/sidebar/SidebarToolBox.cxx:137:5
>  #16 in VclBuilder::makeObject(vcl::Window*, rtl::OUString const&, rtl::OUString const&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>&) at core/vcl/source/window/builder.cxx:1973:27
>  #17 in VclBuilder::insertObject(vcl::Window*, rtl::OUString const&, std::basic_string_view<char, std::char_traits<char>>, rtl::OUString const&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>&) at core/vcl/source/window/builder.cxx:2350:25
>  #18 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::handleObject(vcl::Window*, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>*, xmlreader::XmlReader&, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, bool) at core/include/vcl/widgetbuilder.hxx:285:29
>  #19 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::handleChild(vcl::Window*, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>*, xmlreader::XmlReader&, bool) at core/include/vcl/widgetbuilder.hxx:127:37
>  #20 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::handleObject(vcl::Window*, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>*, xmlreader::XmlReader&, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, bool) at core/include/vcl/widgetbuilder.hxx:233:21
>  #21 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::handleChild(vcl::Window*, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>*, xmlreader::XmlReader&, bool) at core/include/vcl/widgetbuilder.hxx:127:37
>  #22 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::handleObject(vcl::Window*, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>*, xmlreader::XmlReader&, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, bool) at core/include/vcl/widgetbuilder.hxx:233:21
>  #23 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::handleChild(vcl::Window*, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>*, xmlreader::XmlReader&, bool) at core/include/vcl/widgetbuilder.hxx:127:37
>  #24 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::handleObject(vcl::Window*, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>*, xmlreader::XmlReader&, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, bool) at core/include/vcl/widgetbuilder.hxx:233:21
>  #25 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::handleChild(vcl::Window*, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString>>>*, xmlreader::XmlReader&, bool) at core/include/vcl/widgetbuilder.hxx:127:37
>  #26 in WidgetBuilder<vcl::Window, VclPtr<vcl::Window>, PopupMenu, VclPtr<PopupMenu>>::processUIFile(vcl::Window*) at core/include/vcl/widgetbuilder.hxx:70:13
>  #27 in VclBuilder::VclBuilder(vcl::Window*, std::basic_string_view<char16_t, std::char_traits<char16_t>>, rtl::OUString const&, rtl::OUString, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>, bool, std::unique_ptr<NotebookBarAddonsItem, std::default_delete<NotebookBarAddonsItem>>) at core/vcl/source/window/builder.cxx:535:5
>  #28 in SalInstanceBuilder::SalInstanceBuilder(vcl::Window*, std::basic_string_view<char16_t, std::char_traits<char16_t>>, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at core/vcl/source/app/salvtables.cxx:7164:22
>  #29 in JSInstanceBuilder::JSInstanceBuilder(weld::Widget*, vcl::Window*, std::basic_string_view<char16_t, std::char_traits<char16_t>>, rtl::OUString const&, JSInstanceBuilder::Type, unsigned long, std::basic_string_view<char16_t, std::char_traits<char16_t>> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at core/vcl/jsdialog/jsdialogbuilder.cxx:276:7
>  #30 in std::__detail::_MakeUniq<JSInstanceBuilder>::__single_object std::make_unique<JSInstanceBuilder, std::nullptr_t, vcl::Window*&, rtl::OUString const&, rtl::OUString const&, JSInstanceBuilder::Type, unsigned long&, char16_t const (&) [1], com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&>(std::nullptr_t&&, vcl::Window*&, rtl::OUString const&, rtl::OUString const&, JSInstanceBuilder::Type&&, unsigned long&, char16_t const (&) [1], com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/unique_ptr.h:1085:34
>  #31 in JSInstanceBuilder::CreateNotebookbarBuilder(vcl::Window*, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, unsigned long) at core/vcl/jsdialog/jsdialogbuilder.cxx:331:12
>  #32 in WeldedTabbedNotebookbar::WeldedTabbedNotebookbar(VclPtr<vcl::Window> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, unsigned long) at core/vcl/source/control/WeldedTabbedNotebookbar.cxx:17:18
>  #33 in sfx2::SfxNotebookBar::StateMethod(SystemWindow*, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, std::basic_string_view<char16_t, std::char_traits<char16_t>>, bool) at core/sfx2/source/notebookbar/SfxNotebookBar.cxx:513:29
>  #34 in sfx2::SfxNotebookBar::StateMethod(SfxBindings&, std::basic_string_view<char16_t, std::char_traits<char16_t>>, bool) at core/sfx2/source/notebookbar/SfxNotebookBar.cxx:423:12
>  #35 in SwDocShell::GetState(SfxItemSet&) at core/sw/source/uibase/app/docsh.cxx:1117:28
>  #36 in SfxStubSwDocShellGetState(SfxShell*, SfxItemSet&) at core/workdir/SdiTarget/sw/sdi/swslots.hxx:1427:1
>  #37 in SfxShell::GetSlotState(unsigned short, SfxInterface const*, SfxItemSet*) at core/sfx2/source/control/shell.cxx:492:13
>  #38 in SfxDispatcher::QueryState(unsigned short, SfxPoolItemHolder&) at core/sfx2/source/control/dispatch.cxx:2051:26
>  #39 in SfxApplication::MiscExec_Impl(SfxRequest&) at core/sfx2/source/appl/appserv.cxx:1144:50
>  #40 in SfxStubSfxApplicationMiscExec_Impl(SfxShell*, SfxRequest&) at core/workdir/SdiTarget/sfx2/sdi/sfxslots.hxx:1307:1
>  #41 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) at core/sfx2/source/control/dispatch.cxx:255:9
>  #42 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) at core/sfx2/source/control/dispatch.cxx:754:9
>  #43 in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) at core/sfx2/source/control/dispatch.cxx:813:9
>  #44 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) at core/sfx2/source/control/unoctitm.cxx:716:46
>  #45 in SfxOfficeDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at core/sfx2/source/control/unoctitm.cxx:255:20
>  #46 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) at core/comphelper/source/misc/dispatchcommand.cxx:63:12
>  #47 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) at core/comphelper/source/misc/dispatchcommand.cxx:73:12
>  #48 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) at core/comphelper/source/misc/dispatchcommand.cxx:94:12
>  #49 in doc_postUnoCommand(_LibreOfficeKitDocument*, char const*, char const*, bool) at core/desktop/source/lib/init.cxx:5617:19
>  #50 in ChildSession::unoCommand(StringVector const&) at online/kit/ChildSession.cpp:2357:25
>  #51 in ChildSession::_handleInput(char const*, int) at online/kit/ChildSession.cpp:703:20
>  #52 in Session::handleMessage(std::vector<char, std::allocator<char>> const&) at online/common/Session.cpp
>  #53 in Document::forwardToChild(std::basic_string_view<char, std::char_traits<char>>, std::vector<char, std::allocator<char>> const&) at online/kit/Kit.cpp:2283:26
>  #54 in Document::drainQueue() at online/kit/Kit.cpp:2553:17
>  #55 in KitSocketPoll::drainQueue() at online/kit/Kit.cpp:2961:20
>  #56 in KitSocketPoll::kitPoll(int) at online/kit/Kit.cpp:3034:13
>  #57 in SvpSalInstance::ImplYield(bool, bool) at core/vcl/headless/svpinst.cxx:463:31
>  #58 in SvpSalInstance::DoYield(bool, bool) at core/vcl/headless/svpinst.cxx:504:21
>  #59 in ImplYield(bool, bool) at core/vcl/source/app/svapp.cxx:389:48
>  #60 in Application::Yield() at core/vcl/source/app/svapp.cxx:492:5
>  #61 in Application::Execute() at core/vcl/source/app/svapp.cxx:364:13
>  #62 in desktop::Desktop::Main() at core/desktop/source/app/app.cxx:1680:13
>  #63 in ImplSVMain() at core/vcl/source/app/svmain.cxx:228:35
>  #64 in SVMain() at core/vcl/source/app/svmain.cxx:246:12
>  #65 in soffice_main at core/desktop/source/app/sofficemain.cxx:121:12
>  #66 in lo_runLoop(_LibreOfficeKit*, int (*)(void*, int), void (*)(void*), void*) at core/desktop/source/lib/init.cxx:7849:9
>  #67 in lokit_main(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool, bool, bool, bool, bool, unsigned long) at online/kit/Kit.cpp:3928:16
>  #68 in createLibreOfficeKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)::$_0::operator()() const at online/kit/ForKit.cpp:553:13
>  #69 in void std::__invoke_impl<void, createLibreOfficeKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)::$_0&>(std::__invoke_other, createLibreOfficeKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)::$_0&) at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/invoke.h:63:14
>  #70 in std::enable_if<is_invocable_r_v<void, createLibreOfficeKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)::$_0&>, void>::type std::__invoke_r<void, createLibreOfficeKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)::$_0&>(createLibreOfficeKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)::$_0&) at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/invoke.h:113:2
>  #71 in std::_Function_handler<void (), createLibreOfficeKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)::$_0>::_M_invoke(std::_Any_data const&) at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/std_function.h:292:9
>  #72 in std::function<void ()>::operator()() const at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/std_function.h:593:9
>  #73 in forkKit(std::function<void ()> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<void (int)> const&) at online/kit/ForKit.cpp:496:9
>  #74 in createLibreOfficeKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool) at online/kit/ForKit.cpp:573:20
>  #75 in createSubForKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)::$_0::operator()() const at online/kit/ForKit.cpp:620:33
>  #76 in void std::__invoke_impl<void, createSubForKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)::$_0&>(std::__invoke_other, createSubForKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)::$_0&) at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/invoke.h:63:14
>  #77 in std::enable_if<is_invocable_r_v<void, createSubForKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)::$_0&>, void>::type std::__invoke_r<void, createSubForKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)::$_0&>(createSubForKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)::$_0&) at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/invoke.h:113:2
>  #78 in std::_Function_handler<void (), createSubForKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)::$_0>::_M_invoke(std::_Any_data const&) at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/std_function.h:292:9
>  #79 in std::function<void ()>::operator()() const at /usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/std_function.h:593:9
>  #80 in forkKit(std::function<void ()> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<void (int)> const&) at online/kit/ForKit.cpp:496:9
>  #81 in createSubForKit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) at online/kit/ForKit.cpp:657:16
>  #82 in createSubForKits(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) at online/kit/ForKit.cpp:674:13
>  #83 in forkit_main(int, char**) at online/kit/ForKit.cpp:1102:17
>  #84 in __libc_start_call_main at <null>

(and this is no longer relevant on master after
9283da8 "a11y: Merge accessibility module into
vcl")

Change-Id: Icc49bcf8e9bd95b4fdb86b9420cc360e5fa17c08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190390
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Andras Timar <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Sep 16, 2025
...presumably after 981d8be "freetype: upgrade
to 2.14.1", causing e.g. CppunitTest_chart2_pivot_chart_test to fail with

> workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:3708:31: runtime error: signed integer overflow: 2161 - -9223372036854775808 cannot be represented in type 'FT_Pos' (aka 'long')
>  #0 in af_glyph_hints_apply_vertical_separation_adjustments at workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:3708:31
>  #1 in af_latin_hints_apply at workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:5054:9
>  #2 in af_loader_load_glyph at workdir/UnpackedTarball/freetype/src/autofit/afloader.c:411:17
>  #3 in af_autofitter_load_glyph at workdir/UnpackedTarball/freetype/src/autofit/afmodule.c:498:13
>  #4 in FT_Load_Glyph at workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1055:19
>  #5  at <null> (/lib64/libcairo.so.2 +0x9be4b)
>  #6  at <null> (/lib64/libcairo.so.2 +0xa0df1)
>  #7  at <null> (/lib64/libcairo.so.2 +0x528b6)
>  #8  at <null> (/lib64/libcairo.so.2 +0x57184)
>  #9  at <null> (/lib64/libcairo.so.2 +0x179f6)
>  #10  at <null> (/lib64/libcairo.so.2 +0x1a5f7)
>  #11  at <null> (/lib64/libcairo.so.2 +0x27459)
>  #12  at <null> (/lib64/libcairo.so.2 +0x701c8)
>  #13  at <null> (/lib64/libcairo.so.2 +0x22a8b)
>  #14 in cairo_show_glyphs at <null> (/lib64/libcairo.so.2 +0x78a7d)
>  #15 in CairoTextRender::ImplDrawTextLayout(_cairo*, Color const&, GenericSalLayout const&, CairoCommon*, bool) at vcl/unx/generic/gdi/cairotextrender.cxx:517:9
>  #16 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:292:5
>  #17 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:74:23
>  #18 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:314:18
>  #19 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:311:16
>  #20 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:464:9
>  #21 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, std::span<double const, 18446744073709551615ul>, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:750:9
>  #22 in ScOutputData::LayoutStringsImpl(bool, RowInfo*, short, int, unsigned long, std::optional<short>&, std::optional<short>&, short, std::__debug::vector<std::unique_ptr<ScPatternAttr, std::default_delete<ScPatternAttr>>, std::allocator<std::unique_ptr<ScPatternAttr, std::default_delete<ScPatternAttr>>>>&, ScPatternAttr const*&, SfxItemSet const*&, SvtScriptType&, ScDrawStringsVars&, bool&, long, long, bool, bool&, vcl::PDFExtOutDevData*, long, std::__debug::vector<double, std::allocator<double>>&) at sc/source/ui/view/output2.cxx:2248:28
>  #23 in ScOutputData::LayoutStrings(bool) at sc/source/ui/view/output2.cxx:1565:17
>  #24 in ScOutputData::DrawStrings(bool) at sc/source/ui/view/output2.cxx:1487:5
>  #25 in ScPrintFunc::DrawToDev(ScDocument&, OutputDevice*, double, tools::Rectangle const&, ScViewData&, bool) at sc/source/ui/view/printfun.cxx:604:17
>  #26 in ScDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sc/source/ui/docshell/docsh4.cxx:2656:9
>  #27 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #28 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #29 in SfxObjectShell::CreatePreview_Impl(bool, bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:201:40
>  #30 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:113:9
>  #31 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:4157:29
>  #32 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:4112:33
>  #33 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1839:19
>  #34 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3421:39
>  #35 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3212:9
>  #36 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:323:19
>  #37 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:3253:42
>  #38 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1834:13
>  #39 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:194:16
>  #40 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #41 in UnoApiTest::saveAndReload(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:199:5
>  #42 in PivotChartTest::testRoundtrip() at chart2/qa/extras/PivotChartTest.cxx:354:5

Change-Id: I6bb42532fce1291b4208108ab1898b94dda02e68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191043
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Sep 17, 2025
...presumably after 981d8be "freetype: upgrade
to 2.14.1", causing e.g. CppunitTest_chart2_pivot_chart_test to fail with

> workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:3708:31: runtime error: signed integer overflow: 2161 - -9223372036854775808 cannot be represented in type 'FT_Pos' (aka 'long')
>  #0 in af_glyph_hints_apply_vertical_separation_adjustments at workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:3708:31
>  #1 in af_latin_hints_apply at workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:5054:9
>  #2 in af_loader_load_glyph at workdir/UnpackedTarball/freetype/src/autofit/afloader.c:411:17
>  #3 in af_autofitter_load_glyph at workdir/UnpackedTarball/freetype/src/autofit/afmodule.c:498:13
>  #4 in FT_Load_Glyph at workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1055:19
>  #5  at <null> (/lib64/libcairo.so.2 +0x9be4b)
>  #6  at <null> (/lib64/libcairo.so.2 +0xa0df1)
>  #7  at <null> (/lib64/libcairo.so.2 +0x528b6)
>  #8  at <null> (/lib64/libcairo.so.2 +0x57184)
>  #9  at <null> (/lib64/libcairo.so.2 +0x179f6)
>  #10  at <null> (/lib64/libcairo.so.2 +0x1a5f7)
>  #11  at <null> (/lib64/libcairo.so.2 +0x27459)
>  #12  at <null> (/lib64/libcairo.so.2 +0x701c8)
>  #13  at <null> (/lib64/libcairo.so.2 +0x22a8b)
>  #14 in cairo_show_glyphs at <null> (/lib64/libcairo.so.2 +0x78a7d)
>  #15 in CairoTextRender::ImplDrawTextLayout(_cairo*, Color const&, GenericSalLayout const&, CairoCommon*, bool) at vcl/unx/generic/gdi/cairotextrender.cxx:517:9
>  #16 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:292:5
>  #17 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:74:23
>  #18 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:314:18
>  #19 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:311:16
>  #20 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:464:9
>  #21 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, std::span<double const, 18446744073709551615ul>, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:750:9
>  #22 in ScOutputData::LayoutStringsImpl(bool, RowInfo*, short, int, unsigned long, std::optional<short>&, std::optional<short>&, short, std::__debug::vector<std::unique_ptr<ScPatternAttr, std::default_delete<ScPatternAttr>>, std::allocator<std::unique_ptr<ScPatternAttr, std::default_delete<ScPatternAttr>>>>&, ScPatternAttr const*&, SfxItemSet const*&, SvtScriptType&, ScDrawStringsVars&, bool&, long, long, bool, bool&, vcl::PDFExtOutDevData*, long, std::__debug::vector<double, std::allocator<double>>&) at sc/source/ui/view/output2.cxx:2248:28
>  #23 in ScOutputData::LayoutStrings(bool) at sc/source/ui/view/output2.cxx:1565:17
>  #24 in ScOutputData::DrawStrings(bool) at sc/source/ui/view/output2.cxx:1487:5
>  #25 in ScPrintFunc::DrawToDev(ScDocument&, OutputDevice*, double, tools::Rectangle const&, ScViewData&, bool) at sc/source/ui/view/printfun.cxx:604:17
>  #26 in ScDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sc/source/ui/docshell/docsh4.cxx:2656:9
>  #27 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #28 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #29 in SfxObjectShell::CreatePreview_Impl(bool, bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:201:40
>  #30 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:113:9
>  #31 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:4157:29
>  #32 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:4112:33
>  #33 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1839:19
>  #34 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3421:39
>  #35 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3212:9
>  #36 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:323:19
>  #37 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:3253:42
>  #38 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1834:13
>  #39 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:194:16
>  #40 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #41 in UnoApiTest::saveAndReload(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:199:5
>  #42 in PivotChartTest::testRoundtrip() at chart2/qa/extras/PivotChartTest.cxx:354:5

Change-Id: I6bb42532fce1291b4208108ab1898b94dda02e68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191043
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
(cherry picked from commit a8133d2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191064
Reviewed-by: Xisco Fauli <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Sep 17, 2025
...presumably after 981d8be "freetype: upgrade
to 2.14.1", causing e.g. CppunitTest_chart2_pivot_chart_test to fail with

> workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:3708:31: runtime error: signed integer overflow: 2161 - -9223372036854775808 cannot be represented in type 'FT_Pos' (aka 'long')
>  #0 in af_glyph_hints_apply_vertical_separation_adjustments at workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:3708:31
>  #1 in af_latin_hints_apply at workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:5054:9
>  #2 in af_loader_load_glyph at workdir/UnpackedTarball/freetype/src/autofit/afloader.c:411:17
>  #3 in af_autofitter_load_glyph at workdir/UnpackedTarball/freetype/src/autofit/afmodule.c:498:13
>  #4 in FT_Load_Glyph at workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1055:19
>  #5  at <null> (/lib64/libcairo.so.2 +0x9be4b)
>  #6  at <null> (/lib64/libcairo.so.2 +0xa0df1)
>  #7  at <null> (/lib64/libcairo.so.2 +0x528b6)
>  #8  at <null> (/lib64/libcairo.so.2 +0x57184)
>  #9  at <null> (/lib64/libcairo.so.2 +0x179f6)
>  #10  at <null> (/lib64/libcairo.so.2 +0x1a5f7)
>  #11  at <null> (/lib64/libcairo.so.2 +0x27459)
>  #12  at <null> (/lib64/libcairo.so.2 +0x701c8)
>  #13  at <null> (/lib64/libcairo.so.2 +0x22a8b)
>  #14 in cairo_show_glyphs at <null> (/lib64/libcairo.so.2 +0x78a7d)
>  #15 in CairoTextRender::ImplDrawTextLayout(_cairo*, Color const&, GenericSalLayout const&, CairoCommon*, bool) at vcl/unx/generic/gdi/cairotextrender.cxx:517:9
>  #16 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:292:5
>  #17 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:74:23
>  #18 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:314:18
>  #19 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:311:16
>  #20 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:464:9
>  #21 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, std::span<double const, 18446744073709551615ul>, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:750:9
>  #22 in ScOutputData::LayoutStringsImpl(bool, RowInfo*, short, int, unsigned long, std::optional<short>&, std::optional<short>&, short, std::__debug::vector<std::unique_ptr<ScPatternAttr, std::default_delete<ScPatternAttr>>, std::allocator<std::unique_ptr<ScPatternAttr, std::default_delete<ScPatternAttr>>>>&, ScPatternAttr const*&, SfxItemSet const*&, SvtScriptType&, ScDrawStringsVars&, bool&, long, long, bool, bool&, vcl::PDFExtOutDevData*, long, std::__debug::vector<double, std::allocator<double>>&) at sc/source/ui/view/output2.cxx:2248:28
>  #23 in ScOutputData::LayoutStrings(bool) at sc/source/ui/view/output2.cxx:1565:17
>  #24 in ScOutputData::DrawStrings(bool) at sc/source/ui/view/output2.cxx:1487:5
>  #25 in ScPrintFunc::DrawToDev(ScDocument&, OutputDevice*, double, tools::Rectangle const&, ScViewData&, bool) at sc/source/ui/view/printfun.cxx:604:17
>  #26 in ScDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sc/source/ui/docshell/docsh4.cxx:2656:9
>  #27 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #28 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #29 in SfxObjectShell::CreatePreview_Impl(bool, bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:201:40
>  #30 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:113:9
>  #31 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:4157:29
>  #32 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:4112:33
>  #33 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1839:19
>  #34 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3421:39
>  #35 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3212:9
>  #36 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:323:19
>  #37 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:3253:42
>  #38 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1834:13
>  #39 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:194:16
>  #40 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #41 in UnoApiTest::saveAndReload(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:199:5
>  #42 in PivotChartTest::testRoundtrip() at chart2/qa/extras/PivotChartTest.cxx:354:5

Change-Id: I6bb42532fce1291b4208108ab1898b94dda02e68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191043
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
(cherry picked from commit a8133d2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191064
Reviewed-by: Xisco Fauli <[email protected]>
(cherry picked from commit fb9337d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191096
tdf-gerrit pushed a commit that referenced this pull request Sep 18, 2025
 coolforkit-ns: /home/mk/core/vcl/source/app/dbggui.cxx:36: void ImplDbgTestSolarMutex(bool):
 Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not
 owned!"' failed.

Seen with this call stack:

 #0  0x00007f71b2b7ee96 in __GI___assert_fail (
     assertion=0x7f71aa2c4de0 "ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && \"SolarMutex not owned!\"", file=0x7f71aa2c4db8 "/home/mk/core/vcl/source/app/dbggui.cxx", line=36,
     function=0x7f71aa2c4d90 "void ImplDbgTestSolarMutex(bool)") at ./assert/assert.c:103
 #1  0x00007f71a952e69b in ImplDbgTestSolarMutex (owned=true) at /home/mk/core/vcl/source/app/dbggui.cxx:36
 #2  0x00007f71ab311ee0 in DbgTestSolarMutex (owned=true) at /home/mk/core/tools/source/debug/debug.cxx:54
 #3  0x00007f719ae4156d in SwModify::Add (this=0x55ace7ff8ec0, rDepend=...)
     at /home/mk/core/sw/source/core/attr/calbck.cxx:172
 #4  0x00007f719b42e062 in SwContentNode::SwContentNode (this=0x55ace8021f50, rWhere=..., nNdType=SwNodeType::Text, pColl=0x55ace7ff8ec0) at /home/mk/core/sw/source/core/docnode/node.cxx:1082
 #5  0x00007f719ba84bee in SwTextNode::SwTextNode (this=0x55ace8021f50, rWhere=..., pTextColl=0x55ace7ff8ec0, pAutoAttr=0x0) at /home/mk/core/sw/source/core/txtnode/ndtxt.cxx:219
 #6  0x00007f719ba84661 in SwNodes::MakeTextNode (this=0x55ace83b0ee0, rWhere=..., pColl=0x55ace7ff8ec0, bNewFrames=true) at /home/mk/core/sw/source/core/txtnode/ndtxt.cxx:133
 #7  0x00007f719b442347 in SwNodes::MakeTextSection (this=0x55ace83b0ee0, rWhere=..., eSttNdTyp=SwNormalStartNode, pColl=0x55ace7ff8ec0) at /home/mk/core/sw/source/core/docnode/nodes.cxx:1953
 #8  0x00007f719b18c9a2 in SwRangeRedline::MoveToSection (this=0x55ace8302bd0) at /home/mk/core/sw/source/core/doc/docredln.cxx:1962
 #9  0x00007f719b18b8c8 in SwRangeRedline::ShowOriginal (this=0x55ace8302bd0, nLoop=0, nMyPos=3) at /home/mk/core/sw/source/core/doc/docredln.cxx:1772
 #10 0x00007f719c650b17 in (anonymous namespace)::HideNewerShowOlder::Hide (pRedline=0x55ace8302bd0, rTable=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:934
 #11 0x00007f719c650668 in (anonymous namespace)::HideNewerShowOlder::HideNewerShowOlder (this=0x7ffea7e20b60, limit=..., rTable=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:885
 #12 0x00007f719c651152 in (anonymous namespace)::GetDocStructureTrackChanges (rJsonWriter=..., pDocShell=0x55ace7d72d00, filterArguments=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:997
 #13 0x00007f719c651cc3 in (anonymous namespace)::GetDocStructure (rJsonWriter=..., pDocShell=0x55ace7d72d00, rArguments=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:1077
 #14 0x00007f719c6524a4 in SwXTextDocument::getCommandValues (this=0x55ace836de60, rJsonWriter=..., rCommand=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:1162
 #15 0x00007f71b272492f in lo_extractDocumentStructureRequest (pFilePath=0x55ace4085040 "file:///tmp/user/docs/IvJPNWKKqE4D3jXV/works.docx", pFilter=0x55ace7b2a450 "trackchanges,contextLen:100") at /home/mk/core/desktop/source/lib/init.cxx:3352
 #16 0x000055accb8ae888 in lok::Office::extractDocumentStructureRequest (pFilter=<optimized out>, pFilePath=<optimized out>, this=0x55acd7c16bd0) at /home/mk/core/include/LibreOfficeKit/LibreOfficeKit.hxx:1301
 #17 ChildSession::_handleInput (this=0x55ace78ead30, buffer=<optimized out>, length=<optimized out>) at kit/ChildSession.cpp:371
 #18 0x000055accb95f62c in Session::handleMessage (this=0x55ace78ead30, data=...) at common/Session.cpp:326
 #19 0x000055accb901e25 in Document::forwardToChild (this=0x55ace7a662b0, prefix=..., payload=...) at kit/Kit.cpp:2283
 #20 0x000055accb902a8e in Document::drainQueue (this=0x55ace7a662b0) at /usr/include/c++/13/string_view:146
 #21 0x000055accb9036cd in KitSocketPoll::drainQueue (this=0x55ace7a8c880) at kit/Kit.cpp:2961
 #22 KitSocketPoll::kitPoll (this=0x55ace7a8c880, timeoutMicroS=<optimized out>) at kit/Kit.cpp:3034
 #23 0x00007f71a99ac661 in SvpSalInstance::ImplYield (this=0x55acd7c35700, bWait=true, bHandleAllCurrentEvents=false) at /home/mk/core/vcl/headless/svpinst.cxx:463
 #24 0x00007f71a99ac938 in SvpSalInstance::DoYield (this=0x55acd7c35700, bWait=true, bHandleAllCurrentEvents=false) at /home/mk/core/vcl/headless/svpinst.cxx:504
 #25 0x00007f71a95f88d9 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/mk/core/vcl/source/app/svapp.cxx:389
 #26 0x00007f71a95f9794 in Application::Yield () at /home/mk/core/vcl/source/app/svapp.cxx:492
 #27 0x00007f71a95f855a in Application::Execute () at /home/mk/core/vcl/source/app/svapp.cxx:364
 #28 0x00007f71b26602a7 in desktop::Desktop::Main (this=0x7ffea7e23f30) at /home/mk/core/desktop/source/app/app.cxx:1680
 #29 0x00007f71a96249f1 in ImplSVMain () at /home/mk/core/vcl/source/app/svmain.cxx:228
 #30 0x00007f71a9624ad6 in SVMain () at /home/mk/core/vcl/source/app/svmain.cxx:246
 #31 0x00007f71b26d300e in soffice_main () at /home/mk/core/desktop/source/app/sofficemain.cxx:121
 #32 0x00007f71b2743c40 in lo_runLoop (pPollCallback=0x55accb904070 <pollCallback(void*, int)>, pWakeCallback=0x55accb8e6ab0 <wakeCallback(void*)>, pData=0x55ace7a8c880) at /home/mk/core/desktop/source/lib/init.cxx:7873
 #33 0x000055accb90c3af in lok::Office::runLoop (pData=0x55ace7a8c880, pWakeCallback=0x55accb8e6ab0 <wakeCallback(void*)>, pPollCallback=0x55accb904070 <pollCallback(void*, int)>, this=0x55acd7c16bd0) at /home/mk/core/include/LibreOfficeKit/LibreOfficeKit.hxx:1156
 #34 lokit_main (childRoot=..., jailId=..., configId=..., sysTemplate=..., loTemplate=..., noCapabilities=<optimized out>, noSeccomp=<optimized out>, useMountNamespaces=<optimized out>, queryVersion=<optimized out>, displayVersion=<optimized out>, sysTemplateIncomplete=<optimized out>, numericIdentifier=<optimized out>) at kit/Kit.cpp:3926
 #35 0x000055accb8c7ea9 in operator() (__closure=<optimized out>) at kit/ForKit.cpp:556
 #36 std::__invoke_impl<void, createLibreOfficeKit(const std::string&, const std::string&, const std::string&, const std::string&, bool, bool)::<lambda()>&> (__f=...) at /usr/include/c++/13/bits/invoke.h:61
 #37 std::__invoke_r<void, createLibreOfficeKit(const std::string&, const std::string&, const std::string&, const std::string&, bool, bool)::<lambda()>&> (__fn=...) at /usr/include/c++/13/bits/invoke.h:111
 #38 std::_Function_handler<void(), createLibreOfficeKit(const std::string&, const std::string&, const std::string&, const std::string&, bool, bool)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290
 #39 0x000055accb8cb1c2 in std::function<void ()>::operator()() const (this=0x7ffea7e24e90) at /usr/include/c++/13/bits/std_function.h:591
 #40 forkKit(const std::function<void()> &, const std::string &, const std::function<void(int)> &) (childFunc=..., childProcessName=..., parentFunc=...) at kit/ForKit.cpp:499
 #41 0x000055accb8cc6ef in createLibreOfficeKit (childRoot=..., sysTemplate=..., loTemplate=..., useMountNamespaces=<optimized out>, queryVersion=<optimized out>, configId=...) at kit/ForKit.cpp:576
 #42 0x000055accb8d1578 in forkit_main (argc=<optimized out>, argv=<optimized out>) at kit/ForKit.cpp:1042
 #43 0x00007f71b2b6ed90 in __libc_start_call_main (main=main@entry=0x55accb8835a0 <main(int, char**)>, argc=argc@entry=10, argv=argv@entry=0x7ffea7e25e58) at ../sysdeps/nptl/libc_start_call_main.h:58
 #44 0x00007f71b2b6ee40 in __libc_start_main_impl (main=0x55accb8835a0 <main(int, char**)>, argc=10, argv=0x7ffea7e25e58, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffea7e25e48) at ../csu/libc-start.c:392
 #45 0x000055accb884845 in _start ()

Change-Id: Ib7e8f93b094db925b6bb60134d23aeb325a10f54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191016
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Jenkins CollaboraOffice <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Sep 19, 2025
...presumably after 981d8be "freetype: upgrade
to 2.14.1", causing e.g. CppunitTest_chart2_pivot_chart_test to fail with

> workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:3708:31: runtime error: signed integer overflow: 2161 - -9223372036854775808 cannot be represented in type 'FT_Pos' (aka 'long')
>  #0 in af_glyph_hints_apply_vertical_separation_adjustments at workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:3708:31
>  #1 in af_latin_hints_apply at workdir/UnpackedTarball/freetype/src/autofit/aflatin.c:5054:9
>  #2 in af_loader_load_glyph at workdir/UnpackedTarball/freetype/src/autofit/afloader.c:411:17
>  #3 in af_autofitter_load_glyph at workdir/UnpackedTarball/freetype/src/autofit/afmodule.c:498:13
>  #4 in FT_Load_Glyph at workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1055:19
>  #5  at <null> (/lib64/libcairo.so.2 +0x9be4b)
>  #6  at <null> (/lib64/libcairo.so.2 +0xa0df1)
>  #7  at <null> (/lib64/libcairo.so.2 +0x528b6)
>  #8  at <null> (/lib64/libcairo.so.2 +0x57184)
>  #9  at <null> (/lib64/libcairo.so.2 +0x179f6)
>  #10  at <null> (/lib64/libcairo.so.2 +0x1a5f7)
>  #11  at <null> (/lib64/libcairo.so.2 +0x27459)
>  #12  at <null> (/lib64/libcairo.so.2 +0x701c8)
>  #13  at <null> (/lib64/libcairo.so.2 +0x22a8b)
>  #14 in cairo_show_glyphs at <null> (/lib64/libcairo.so.2 +0x78a7d)
>  #15 in CairoTextRender::ImplDrawTextLayout(_cairo*, Color const&, GenericSalLayout const&, CairoCommon*, bool) at vcl/unx/generic/gdi/cairotextrender.cxx:517:9
>  #16 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:292:5
>  #17 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:74:23
>  #18 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:314:18
>  #19 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:311:16
>  #20 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:464:9
>  #21 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, std::span<double const, 18446744073709551615ul>, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:750:9
>  #22 in ScOutputData::LayoutStringsImpl(bool, RowInfo*, short, int, unsigned long, std::optional<short>&, std::optional<short>&, short, std::__debug::vector<std::unique_ptr<ScPatternAttr, std::default_delete<ScPatternAttr>>, std::allocator<std::unique_ptr<ScPatternAttr, std::default_delete<ScPatternAttr>>>>&, ScPatternAttr const*&, SfxItemSet const*&, SvtScriptType&, ScDrawStringsVars&, bool&, long, long, bool, bool&, vcl::PDFExtOutDevData*, long, std::__debug::vector<double, std::allocator<double>>&) at sc/source/ui/view/output2.cxx:2248:28
>  #23 in ScOutputData::LayoutStrings(bool) at sc/source/ui/view/output2.cxx:1565:17
>  #24 in ScOutputData::DrawStrings(bool) at sc/source/ui/view/output2.cxx:1487:5
>  #25 in ScPrintFunc::DrawToDev(ScDocument&, OutputDevice*, double, tools::Rectangle const&, ScViewData&, bool) at sc/source/ui/view/printfun.cxx:604:17
>  #26 in ScDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sc/source/ui/docshell/docsh4.cxx:2656:9
>  #27 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5
>  #28 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9
>  #29 in SfxObjectShell::CreatePreview_Impl(bool, bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:201:40
>  #30 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:113:9
>  #31 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:4157:29
>  #32 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:4112:33
>  #33 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1839:19
>  #34 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3421:39
>  #35 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:3212:9
>  #36 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:323:19
>  #37 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:3253:42
>  #38 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1834:13
>  #39 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:194:16
>  #40 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5
>  #41 in UnoApiTest::saveAndReload(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:199:5
>  #42 in PivotChartTest::testRoundtrip() at chart2/qa/extras/PivotChartTest.cxx:354:5

Change-Id: I6bb42532fce1291b4208108ab1898b94dda02e68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191043
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
(cherry picked from commit a8133d2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191064
Reviewed-by: Xisco Fauli <[email protected]>
(cherry picked from commit fb9337d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191096
tdf-gerrit pushed a commit that referenced this pull request Oct 6, 2025
After

    commit 94442bd94e504b067efd0b992525b53fc660f114
    Author: Michael Weghorn <[email protected]>
    Date:   Tue Aug 5 11:07:25 2025 +0200

        tdf#163802 a11y: Fully initialize SpellDialog before showing

, triggering the spell check dialog in Impress
for an empty presentation would result in infinite
recursion e.g. with the gtk3 or gen VCL plugins
on Linux, because the initialization of the
svx::SpellDialogChildWindow triggers a message dialog
asking whether to start spell check from the beginning
(s. frame #252 in below backtrace).
For gtk3 and gen, that dialog triggers processing
of pending events, which triggers an update of the
child windows (s. frame #230), which triggers the logic to
create the spell check child window again (as it isn't
shown yet).

(For qt6, that problem wasn't seen, because synchronously
showing the message dialog doesn't trigger processing
of pending events.)

Fix the problem by detecting cases where a child
window is already in the process of being created,
and return early in that case.

Change SfxWorkWindow::CreateChildWin_Impl to return
a bool result indicating whether the child window
was created or not, and evaluate that in the callers.

Sample backtrace for the gtk3 VCL plugin:

    #0  0x00007fffe94490c0 in memcmp@plt () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
    #1  0x00007fffe955c206 in ??? () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
    #2  0x00007fffe955c97f in ??? () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
    #3  0x00007fffe955a4a3 in ??? () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
    #4  0x00007fffe94db449 in ??? () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
    #5  0x00007fffe6b6e484 in ??? () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
    #6  0x00007fffe6b716e9 in ??? () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
    #7  0x00007fffe6b71b6d in gdk_pixbuf_loader_close () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
    #8  0x00007fffe5be2fe0 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #9  0x00007fffe5be40b1 in gtk_image_set_from_file () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #10 0x00007fffe5be41fd in gtk_image_new_from_file () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #11 0x00007fffe6498cf9 in (anonymous namespace)::image_new_from_xgraphic (rIcon=uno::Reference to (unographic::Graphic *) 0x55555ef17750, bMirror=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:4973
    #12 0x00007fffe6504ec8 in (anonymous namespace)::GtkInstanceToolbar::set_item_image (pItem=0x55555ef42d20, rIcon=uno::Reference to (unographic::Graphic *) 0x55555ef17750, bMirror=false)
        at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:11838
    #13 0x00007fffe64ffb31 in (anonymous namespace)::GtkInstanceToolbar::set_item_image (this=0x55555e956af0, rIdent="toggle", rIcon=uno::Reference to (unographic::Graphic *) 0x55555ef17750)
        at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:12214
    #14 0x00007ffff4137ba1 in sfx2::sidebar::TabBar::UpdateButtonIcons (this=0x5555597c0230) at /home/michi/development/git/libreoffice/sfx2/source/sidebar/TabBar.cxx:159
    #15 0x00007ffff4137634 in sfx2::sidebar::TabBar::SetDecks (this=0x5555597c0230, rDecks=std::__debug::vector of length 8, capacity 8 = {...}) at /home/michi/development/git/libreoffice/sfx2/source/sidebar/TabBar.cxx:148
    #16 0x00007ffff40b0f0b in sfx2::sidebar::SidebarController::UpdateConfigurations (this=0x555558960ae0) at /home/michi/development/git/libreoffice/sfx2/source/sidebar/SidebarController.cxx:604
    #17 0x00007ffff40b0a49 in sfx2::sidebar::SidebarController::notifyContextChangeEvent (this=0x555558960ae0, rEvent=...) at /home/michi/development/git/libreoffice/sfx2/source/sidebar/SidebarController.cxx:371
    #18 0x00007ffff4dcba91 in (anonymous namespace)::ContextChangeEventMultiplexer::BroadcastEventToSingleContainer (this=0x5555590d95c0, rEventObject=..., rxEventFocus=uno::Reference to (sd::DrawController *) 0x55555830b5e8)
        at /home/michi/development/git/libreoffice/framework/source/services/ContextChangeEventMultiplexer.cxx:252
    #19 0x00007ffff4dca942 in (anonymous namespace)::ContextChangeEventMultiplexer::broadcastContextChangeEvent (this=0x5555590d95c0, rEventObject=..., rxEventFocus=uno::Reference to (sd::DrawController *) 0x55555830b5e8)
        at /home/michi/development/git/libreoffice/framework/source/services/ContextChangeEventMultiplexer.cxx:235
    #20 0x00007ffff2948f8f in ContextChangeEventMultiplexer::NotifyContextChange (rxController=uno::Reference to (sd::DrawController *) 0x55555830b5e8, eContext=vcl::EnumContext::Context::DrawPage)
        at /home/michi/development/git/libreoffice/svx/source/sidebar/ContextChangeEventMultiplexer.cxx:51
    #21 0x00007ffff295e246 in svx::sidebar::SelectionChangeHandler::selectionChanged (this=0x55555edcd3f0) at /home/michi/development/git/libreoffice/svx/source/sidebar/SelectionChangeHandler.cxx:56
    #22 0x00007fff9dc6b3cf in sd::DrawController::FireSelectionChangeListener (this=0x55555830b5c0) at /home/michi/development/git/libreoffice/sd/source/ui/unoidl/DrawController.cxx:396
    #23 0x00007fff9dc6b2dc in sd::DrawController::SetSubController (this=0x55555830b5c0, rxSubController=empty uno::Reference) at /home/michi/development/git/libreoffice/sd/source/ui/unoidl/DrawController.cxx:99
    #24 0x00007fff9d99a936 in sd::framework::BasicViewFactory::releaseResource (this=0x55555894ad50, rxView=rtl::Reference to 0x55555ef81a80)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/factories/BasicViewFactory.cxx:219
    #25 0x00007fff9d97161c in sd::framework::ConfigurationControllerResourceManager::DeactivateResource (this=0x55555894c0f0, rxResourceId=rtl::Reference to 0x55555edb5110, rxConfiguration=rtl::Reference to 0x55555894eb00)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:203
    #26 0x00007fff9d971fb4 in sd::framework::ConfigurationControllerResourceManager::DeactivateResources(std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > const&, rtl::Reference<sd::framework::Configuration> const&)::$_0::operator()(rtl::Reference<sd::framework::ResourceId> const&) const (this=0x7ffffffe7950, xResource=rtl::Reference to 0x55555edb5110)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:90
    #27 0x00007fff9d9712cb in std::for_each<std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<rtl::Reference<sd::framework::ResourceId> const*, std::__cxx1998::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > >, std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > >, std::random_access_iterator_tag> >, sd::framework::ConfigurationControllerResourceManager::DeactivateResources(std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > const&, rtl::Reference<sd::framework::Configuration> const&)::$_0>(std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<rtl::Reference<sd::framework::ResourceId> const*, std::__cxx1998::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > >, std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > >, std::random_access_iterator_tag> >, std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<rtl::Reference<sd::framework::ResourceId> const*, std::__cxx1998::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > >, std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > >, std::random_access_iterator_tag> >, sd::framework::ConfigurationControllerResourceManager::DeactivateResources(std::__debug::vector<rtl::Reference<sd::framework::ResourceId>, std::allocator<rtl::Reference<sd::framework::ResourceId> > > const&, rtl::Reference<sd::framework::Configuration> const&)::$_0) (__first=..., __last=..., __f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/stl_algo.h:3798
    #28 0x00007fff9d971074 in sd::framework::ConfigurationControllerResourceManager::DeactivateResources
        (this=0x55555894c0f0, rResources=std::__debug::vector of length 1, capacity 1 = {...}, rxConfiguration=rtl::Reference to 0x55555894eb00)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:86
    #29 0x00007fff9d978cae in sd::framework::ConfigurationUpdater::UpdateCore (this=0x55555894dd00, rClassifier=...) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:250
    #30 0x00007fff9d97829c in sd::framework::ConfigurationUpdater::UpdateConfiguration (this=0x55555894dd00) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:161
    #31 0x00007fff9d977d1b in sd::framework::ConfigurationUpdater::RequestUpdate (this=0x55555894dd00, rxRequestedConfiguration=rtl::Reference to 0x55555894cf50)
        at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:108
    #32 0x00007fff9d94c5b2 in sd::framework::ChangeRequestQueueProcessor::ProcessOneEvent (this=0x55555894eba0) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:163
    #33 0x00007fff9d94c6fe in sd::framework::ChangeRequestQueueProcessor::ProcessUntilEmpty (this=0x55555894eba0) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:175
    #34 0x00007fff9d95e8ef in sd::framework::ConfigurationController::RequestSynchronousUpdate (this=0x55555894a210) at /home/michi/development/git/libreoffice/sd/source/ui/framework/configuration/ConfigurationController.cxx:167
    #35 0x00007fff9d9c69d8 in sd::framework::FrameworkHelper::RequestSynchronousUpdate (this=0x555558959cb0) at /home/michi/development/git/libreoffice/sd/source/ui/framework/tools/FrameworkHelper.cxx:643
    #36 0x00007fff9dd53f6c in SdOutliner::SetViewMode (this=0x55555ee0e070, ePageKind=PageKind::Standard) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1652
    #37 0x00007fff9dd55071 in SdOutliner::SetObject (this=0x55555ee0e070, rPosition=...) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1851
    #38 0x00007fff9dd4e830 in SdOutliner::EndOfSearch (this=0x55555ee0e070) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1418
    #39 0x00007fff9dd4f9e2 in SdOutliner::ProvideNextTextObject (this=0x55555ee0e070) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1399
    #40 0x00007fff9dd4e68b in SdOutliner::SpellNextDocument (this=0x55555ee0e070) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:393
    #41 0x00007fff9dd4fbc0 in SdOutliner::GetNextSpellSentence (this=0x55555ee0e070) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:436
    #42 0x00007fff9d8f4ee0 in sd::SpellDialogChildWindow::GetNextWrongSentence (this=0x55555e56afa0) at /home/michi/development/git/libreoffice/sd/source/ui/dlg/SpellDialogChildWindow.cxx:72
    #43 0x00007fff9480ddaa in svx::SpellDialog::GetNextSentence_Impl (this=0x55555eca57c0, pGuard=0x0, bUseSavedSentence=false, bRecheck=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:1050
    #44 0x00007fff9480caa4 in svx::SpellDialog::SpellContinue_Impl (this=0x55555eca57c0, pGuard=0x0, bUseSavedSentence=false, bIgnoreCurrentError=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:402
    #45 0x00007fff9480f0dd in svx::SpellDialog::Initialize (this=0x55555eca57c0) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:432
    #46 0x00007fff9485d131 in (anonymous namespace)::AbstractSpellDialog_Impl::Initialize (this=0x55555edb1bc0) at /home/michi/development/git/libreoffice/cui/source/factory/dlgfact.cxx:452
    #47 0x00007ffff27ef522 in svx::SpellDialogChildWindow::Initialize (this=0x55555e56afa0) at /home/michi/development/git/libreoffice/svx/source/dialog/SpellDialogChildWindow.cxx:49
    #48 0x00007ffff3aa0d49 in SfxChildWindow::CreateChildWindow (nId=10243, pParent=0x5555589410f0, pBindings=0x555556a7ef20, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:244
    #49 0x00007ffff3b3be5d in SfxWorkWindow::CreateChildWin_Impl (this=0x7fff980287c0, pCW=0x5555598d22b0, bSetFocus=false) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #50 0x00007ffff3b3bbc6 in SfxWorkWindow::UpdateChildWindows_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1299
    #51 0x00007ffff3b3b205 in SfxWorkWindow::UpdateObjectBars_Impl2 (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1247
    #52 0x00007ffff3b3a831 in SfxWorkWindow::UpdateObjectBars_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1095
    #53 0x00007ffff3ba83b3 in SfxDispatcher::Update_Impl (this=0x555556877340, bForce=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1124
    #54 0x00007ffff3bfebbe in DispatcherUpdate_Impl (pArg=0x555556877340) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:681
    #55 0x00007ffff0889f71 in Link<void*, void>::Call (this=0x55555e3c7c40, data=0x555556877340) at include/tools/link.hxx:105
    #56 0x00007ffff08df2c8 in svtools::AsynchronLink::HandleCall_PostUserEvent (this=0x55555e3c7c40) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:66
    #57 0x00007ffff08df21d in svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent (instance=0x55555e3c7c40, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:58
    #58 0x00007fffee4622d1 in Link<void*, void>::Call (this=0x55555e86e7e8, data=0x0) at include/tools/link.hxx:105
    #59 0x00007fffee45dbf1 in ImplHandleUserEvent (pSVEvent=0x55555e86e7e0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2312
    #60 0x00007fffee45ab1f in ImplWindowFrameProc (_pWindow=0x555556a70090, nEvent=SalEvent::UserEvent, pEvent=0x55555e86e7e0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2869
    #61 0x00007fffef031fec in SalFrame::CallCallback (this=0x5555569484e0, nEvent=SalEvent::UserEvent, pEvent=0x55555e86e7e0) at vcl/inc/salframe.hxx:310
    #62 0x00007fffef0584df in SalGenericDisplay::ProcessEvent (this=0x5555569f26e0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #63 0x00007fffeea32ced in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffffffebc20) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #64 0x00007fffeea32bbb in SalUserEventList::DispatchUserEvents (this=0x5555569f26e0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #65 0x00007fffef058435 in SalGenericDisplay::DispatchInternalEvent (this=0x5555569f26e0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #66 0x00007fffe647995f in call_userEventFn (data=0x5555555b3760) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:825
    #67 0x00007fffe9d04385 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #68 0x00007fffe9d065b7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #69 0x00007fffe9d0701f in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #70 0x00007fffe652062a in main_loop_run (pLoop=0x55555edb57d0) at vcl/inc/unx/gtk/gtkdata.hxx:59
    #71 0x00007fffe64964ad in (anonymous namespace)::DialogRunner::run (this=0x55555ed86530) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:6768
    #72 0x00007fffe6491af0 in (anonymous namespace)::GtkInstanceDialog::run (this=0x55555ed863d0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:10190
    #73 0x00007fff9dd55d03 in SdOutliner::ShowWrapAroundDialog (this=0x55555ed78a80) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1526
    #74 0x00007fff9dd4e88f in SdOutliner::EndOfSearch (this=0x55555ed78a80) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1432
    #75 0x00007fff9dd4f9e2 in SdOutliner::ProvideNextTextObject (this=0x55555ed78a80) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1399
    #76 0x00007fff9dd4e68b in SdOutliner::SpellNextDocument (this=0x55555ed78a80) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:393
    #77 0x00007fff9dd4fbc0 in SdOutliner::GetNextSpellSentence (this=0x55555ed78a80) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:436
    #78 0x00007fff9d8f4ee0 in sd::SpellDialogChildWindow::GetNextWrongSentence (this=0x55555eaeead0) at /home/michi/development/git/libreoffice/sd/source/ui/dlg/SpellDialogChildWindow.cxx:72
    #79 0x00007fff9480ddaa in svx::SpellDialog::GetNextSentence_Impl (this=0x55555eb6ef60, pGuard=0x0, bUseSavedSentence=false, bRecheck=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:1050
    #80 0x00007fff9480caa4 in svx::SpellDialog::SpellContinue_Impl (this=0x55555eb6ef60, pGuard=0x0, bUseSavedSentence=false, bIgnoreCurrentError=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:402
    #81 0x00007fff9480f0dd in svx::SpellDialog::Initialize (this=0x55555eb6ef60) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:432
    #82 0x00007fff9485d131 in (anonymous namespace)::AbstractSpellDialog_Impl::Initialize (this=0x5555599c5060) at /home/michi/development/git/libreoffice/cui/source/factory/dlgfact.cxx:452
    #83 0x00007ffff27ef522 in svx::SpellDialogChildWindow::Initialize (this=0x55555eaeead0) at /home/michi/development/git/libreoffice/svx/source/dialog/SpellDialogChildWindow.cxx:49
    #84 0x00007ffff3aa0d49 in SfxChildWindow::CreateChildWindow (nId=10243, pParent=0x5555589410f0, pBindings=0x555556a7ef20, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:244
    #85 0x00007ffff3b3be5d in SfxWorkWindow::CreateChildWin_Impl (this=0x7fff980287c0, pCW=0x5555598d22b0, bSetFocus=false) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #86 0x00007ffff3b3bbc6 in SfxWorkWindow::UpdateChildWindows_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1299
    #87 0x00007ffff3b3b205 in SfxWorkWindow::UpdateObjectBars_Impl2 (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1247
    #88 0x00007ffff3b3a831 in SfxWorkWindow::UpdateObjectBars_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1095
    #89 0x00007ffff3ba83b3 in SfxDispatcher::Update_Impl (this=0x555556877340, bForce=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1124
    #90 0x00007ffff3bfebbe in DispatcherUpdate_Impl (pArg=0x555556877340) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:681
    #91 0x00007ffff0889f71 in Link<void*, void>::Call (this=0x55555e38cad0, data=0x555556877340) at include/tools/link.hxx:105
    #92 0x00007ffff08df2c8 in svtools::AsynchronLink::HandleCall_PostUserEvent (this=0x55555e38cad0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:66
    #93 0x00007ffff08df21d in svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent (instance=0x55555e38cad0, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:58
    #94 0x00007fffee4622d1 in Link<void*, void>::Call (this=0x55555e780b88, data=0x0) at include/tools/link.hxx:105
    #95 0x00007fffee45dbf1 in ImplHandleUserEvent (pSVEvent=0x55555e780b80) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2312
    #96 0x00007fffee45ab1f in ImplWindowFrameProc (_pWindow=0x555556a70090, nEvent=SalEvent::UserEvent, pEvent=0x55555e780b80) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2869
    #97 0x00007fffef031fec in SalFrame::CallCallback (this=0x5555569484e0, nEvent=SalEvent::UserEvent, pEvent=0x55555e780b80) at vcl/inc/salframe.hxx:310
    #98 0x00007fffef0584df in SalGenericDisplay::ProcessEvent (this=0x5555569f26e0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #99 0x00007fffeea32ced in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffffffee430) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #100 0x00007fffeea32bbb in SalUserEventList::DispatchUserEvents (this=0x5555569f26e0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #101 0x00007fffef058435 in SalGenericDisplay::DispatchInternalEvent (this=0x5555569f26e0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #102 0x00007fffe647995f in call_userEventFn (data=0x5555555b3760) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:825
    #103 0x00007fffe9d04385 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #104 0x00007fffe9d065b7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #105 0x00007fffe9d0701f in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #106 0x00007fffe652062a in main_loop_run (pLoop=0x55555eb90ac0) at vcl/inc/unx/gtk/gtkdata.hxx:59
    #107 0x00007fffe64964ad in (anonymous namespace)::DialogRunner::run (this=0x55555eb76cc0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:6768
    #108 0x00007fffe6491af0 in (anonymous namespace)::GtkInstanceDialog::run (this=0x55555eb76b60) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:10190
    #109 0x00007fff9dd55d03 in SdOutliner::ShowWrapAroundDialog (this=0x55555eb6a760) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1526
    #110 0x00007fff9dd4e88f in SdOutliner::EndOfSearch (this=0x55555eb6a760) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1432
    #111 0x00007fff9dd4f9e2 in SdOutliner::ProvideNextTextObject (this=0x55555eb6a760) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1399
    #112 0x00007fff9dd4e68b in SdOutliner::SpellNextDocument (this=0x55555eb6a760) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:393
    #113 0x00007fff9dd4fbc0 in SdOutliner::GetNextSpellSentence (this=0x55555eb6a760) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:436
    #114 0x00007fff9d8f4ee0 in sd::SpellDialogChildWindow::GetNextWrongSentence (this=0x55555e92cf20) at /home/michi/development/git/libreoffice/sd/source/ui/dlg/SpellDialogChildWindow.cxx:72
    #115 0x00007fff9480ddaa in svx::SpellDialog::GetNextSentence_Impl (this=0x55555e7bc0e0, pGuard=0x0, bUseSavedSentence=false, bRecheck=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:1050
    #116 0x00007fff9480caa4 in svx::SpellDialog::SpellContinue_Impl (this=0x55555e7bc0e0, pGuard=0x0, bUseSavedSentence=false, bIgnoreCurrentError=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:402
    #117 0x00007fff9480f0dd in svx::SpellDialog::Initialize (this=0x55555e7bc0e0) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:432
    #118 0x00007fff9485d131 in (anonymous namespace)::AbstractSpellDialog_Impl::Initialize (this=0x55555e75e580) at /home/michi/development/git/libreoffice/cui/source/factory/dlgfact.cxx:452
    #119 0x00007ffff27ef522 in svx::SpellDialogChildWindow::Initialize (this=0x55555e92cf20) at /home/michi/development/git/libreoffice/svx/source/dialog/SpellDialogChildWindow.cxx:49
    #120 0x00007ffff3aa0d49 in SfxChildWindow::CreateChildWindow (nId=10243, pParent=0x5555589410f0, pBindings=0x555556a7ef20, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:244
    #121 0x00007ffff3b3be5d in SfxWorkWindow::CreateChildWin_Impl (this=0x7fff980287c0, pCW=0x5555598d22b0, bSetFocus=false) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #122 0x00007ffff3b3bbc6 in SfxWorkWindow::UpdateChildWindows_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1299
    #123 0x00007ffff3b3b205 in SfxWorkWindow::UpdateObjectBars_Impl2 (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1247
    #124 0x00007ffff3b3a831 in SfxWorkWindow::UpdateObjectBars_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1095
    #125 0x00007ffff3ba83b3 in SfxDispatcher::Update_Impl (this=0x555556877340, bForce=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1124
    #126 0x00007ffff3bfebbe in DispatcherUpdate_Impl (pArg=0x555556877340) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:681
    #127 0x00007ffff0889f71 in Link<void*, void>::Call (this=0x55555a823ba0, data=0x555556877340) at include/tools/link.hxx:105
    #128 0x00007ffff08df2c8 in svtools::AsynchronLink::HandleCall_PostUserEvent (this=0x55555a823ba0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:66
    #129 0x00007ffff08df21d in svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent (instance=0x55555a823ba0, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:58
    #130 0x00007fffee4622d1 in Link<void*, void>::Call (this=0x55555e6ff308, data=0x0) at include/tools/link.hxx:105
    #131 0x00007fffee45dbf1 in ImplHandleUserEvent (pSVEvent=0x55555e6ff300) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2312
    #132 0x00007fffee45ab1f in ImplWindowFrameProc (_pWindow=0x555556a70090, nEvent=SalEvent::UserEvent, pEvent=0x55555e6ff300) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2869
    #133 0x00007fffef031fec in SalFrame::CallCallback (this=0x5555569484e0, nEvent=SalEvent::UserEvent, pEvent=0x55555e6ff300) at vcl/inc/salframe.hxx:310
    #134 0x00007fffef0584df in SalGenericDisplay::ProcessEvent (this=0x5555569f26e0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #135 0x00007fffeea32ced in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffff0c40) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #136 0x00007fffeea32bbb in SalUserEventList::DispatchUserEvents (this=0x5555569f26e0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #137 0x00007fffef058435 in SalGenericDisplay::DispatchInternalEvent (this=0x5555569f26e0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #138 0x00007fffe647995f in call_userEventFn (data=0x5555555b3760) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:825
    #139 0x00007fffe9d04385 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #140 0x00007fffe9d065b7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #141 0x00007fffe9d0701f in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #142 0x00007fffe652062a in main_loop_run (pLoop=0x55555e92fb70) at vcl/inc/unx/gtk/gtkdata.hxx:59
    #143 0x00007fffe64964ad in (anonymous namespace)::DialogRunner::run (this=0x55555e950a20) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:6768
    #144 0x00007fffe6491af0 in (anonymous namespace)::GtkInstanceDialog::run (this=0x55555e9508c0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:10190
    #145 0x00007fff9dd55d03 in SdOutliner::ShowWrapAroundDialog (this=0x55555e8e0e30) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1526
    #146 0x00007fff9dd4e88f in SdOutliner::EndOfSearch (this=0x55555e8e0e30) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1432
    #147 0x00007fff9dd4f9e2 in SdOutliner::ProvideNextTextObject (this=0x55555e8e0e30) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1399
    #148 0x00007fff9dd4e68b in SdOutliner::SpellNextDocument (this=0x55555e8e0e30) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:393
    #149 0x00007fff9dd4fbc0 in SdOutliner::GetNextSpellSentence (this=0x55555e8e0e30) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:436
    #150 0x00007fff9d8f4ee0 in sd::SpellDialogChildWindow::GetNextWrongSentence (this=0x55555e8f0390) at /home/michi/development/git/libreoffice/sd/source/ui/dlg/SpellDialogChildWindow.cxx:72
    #151 0x00007fff9480ddaa in svx::SpellDialog::GetNextSentence_Impl (this=0x55555e9c6ac0, pGuard=0x0, bUseSavedSentence=false, bRecheck=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:1050
    #152 0x00007fff9480caa4 in svx::SpellDialog::SpellContinue_Impl (this=0x55555e9c6ac0, pGuard=0x0, bUseSavedSentence=false, bIgnoreCurrentError=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:402
    #153 0x00007fff9480f0dd in svx::SpellDialog::Initialize (this=0x55555e9c6ac0) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:432
    #154 0x00007fff9485d131 in (anonymous namespace)::AbstractSpellDialog_Impl::Initialize (this=0x55555e319180) at /home/michi/development/git/libreoffice/cui/source/factory/dlgfact.cxx:452
    #155 0x00007ffff27ef522 in svx::SpellDialogChildWindow::Initialize (this=0x55555e8f0390) at /home/michi/development/git/libreoffice/svx/source/dialog/SpellDialogChildWindow.cxx:49
    #156 0x00007ffff3aa0d49 in SfxChildWindow::CreateChildWindow (nId=10243, pParent=0x5555589410f0, pBindings=0x555556a7ef20, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:244
    #157 0x00007ffff3b3be5d in SfxWorkWindow::CreateChildWin_Impl (this=0x7fff980287c0, pCW=0x5555598d22b0, bSetFocus=false) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #158 0x00007ffff3b3bbc6 in SfxWorkWindow::UpdateChildWindows_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1299
    #159 0x00007ffff3b3b205 in SfxWorkWindow::UpdateObjectBars_Impl2 (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1247
    #160 0x00007ffff3b3a831 in SfxWorkWindow::UpdateObjectBars_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1095
    #161 0x00007ffff3ba83b3 in SfxDispatcher::Update_Impl (this=0x555556877340, bForce=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1124
    #162 0x00007ffff3bfebbe in DispatcherUpdate_Impl (pArg=0x555556877340) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:681
    #163 0x00007ffff0889f71 in Link<void*, void>::Call (this=0x55555e3f61c0, data=0x555556877340) at include/tools/link.hxx:105
    #164 0x00007ffff08df2c8 in svtools::AsynchronLink::HandleCall_PostUserEvent (this=0x55555e3f61c0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:66
    #165 0x00007ffff08df21d in svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent (instance=0x55555e3f61c0, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:58
    #166 0x00007fffee4622d1 in Link<void*, void>::Call (this=0x55555e58c6e8, data=0x0) at include/tools/link.hxx:105
    #167 0x00007fffee45dbf1 in ImplHandleUserEvent (pSVEvent=0x55555e58c6e0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2312
    #168 0x00007fffee45ab1f in ImplWindowFrameProc (_pWindow=0x555556a70090, nEvent=SalEvent::UserEvent, pEvent=0x55555e58c6e0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2869
    #169 0x00007fffef031fec in SalFrame::CallCallback (this=0x5555569484e0, nEvent=SalEvent::UserEvent, pEvent=0x55555e58c6e0) at vcl/inc/salframe.hxx:310
    #170 0x00007fffef0584df in SalGenericDisplay::ProcessEvent (this=0x5555569f26e0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #171 0x00007fffeea32ced in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffff3450) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #172 0x00007fffeea32bbb in SalUserEventList::DispatchUserEvents (this=0x5555569f26e0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #173 0x00007fffef058435 in SalGenericDisplay::DispatchInternalEvent (this=0x5555569f26e0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #174 0x00007fffe647995f in call_userEventFn (data=0x5555555b3760) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:825
    #175 0x00007fffe9d04385 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #176 0x00007fffe9d065b7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #177 0x00007fffe9d0701f in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #178 0x00007fffe652062a in main_loop_run (pLoop=0x55555e8ec500) at vcl/inc/unx/gtk/gtkdata.hxx:59
    #179 0x00007fffe64964ad in (anonymous namespace)::DialogRunner::run (this=0x55555e867400) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:6768
    #180 0x00007fffe6491af0 in (anonymous namespace)::GtkInstanceDialog::run (this=0x55555e8672a0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:10190
    #181 0x00007fff9dd55d03 in SdOutliner::ShowWrapAroundDialog (this=0x55555e859950) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1526
    #182 0x00007fff9dd4e88f in SdOutliner::EndOfSearch (this=0x55555e859950) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1432
    #183 0x00007fff9dd4f9e2 in SdOutliner::ProvideNextTextObject (this=0x55555e859950) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1399
    #184 0x00007fff9dd4e68b in SdOutliner::SpellNextDocument (this=0x55555e859950) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:393
    #185 0x00007fff9dd4fbc0 in SdOutliner::GetNextSpellSentence (this=0x55555e859950) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:436
    #186 0x00007fff9d8f4ee0 in sd::SpellDialogChildWindow::GetNextWrongSentence (this=0x55555e7623d0) at /home/michi/development/git/libreoffice/sd/source/ui/dlg/SpellDialogChildWindow.cxx:72
    #187 0x00007fff9480ddaa in svx::SpellDialog::GetNextSentence_Impl (this=0x55555e4fc700, pGuard=0x0, bUseSavedSentence=false, bRecheck=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:1050
    #188 0x00007fff9480caa4 in svx::SpellDialog::SpellContinue_Impl (this=0x55555e4fc700, pGuard=0x0, bUseSavedSentence=false, bIgnoreCurrentError=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:402
    #189 0x00007fff9480f0dd in svx::SpellDialog::Initialize (this=0x55555e4fc700) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:432
    #190 0x00007fff9485d131 in (anonymous namespace)::AbstractSpellDialog_Impl::Initialize (this=0x555558f1e9c0) at /home/michi/development/git/libreoffice/cui/source/factory/dlgfact.cxx:452
    #191 0x00007ffff27ef522 in svx::SpellDialogChildWindow::Initialize (this=0x55555e7623d0) at /home/michi/development/git/libreoffice/svx/source/dialog/SpellDialogChildWindow.cxx:49
    #192 0x00007ffff3aa0d49 in SfxChildWindow::CreateChildWindow (nId=10243, pParent=0x5555589410f0, pBindings=0x555556a7ef20, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:244
    #193 0x00007ffff3b3be5d in SfxWorkWindow::CreateChildWin_Impl (this=0x7fff980287c0, pCW=0x5555598d22b0, bSetFocus=false) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #194 0x00007ffff3b3bbc6 in SfxWorkWindow::UpdateChildWindows_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1299
    #195 0x00007ffff3b3b205 in SfxWorkWindow::UpdateObjectBars_Impl2 (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1247
    #196 0x00007ffff3b3a831 in SfxWorkWindow::UpdateObjectBars_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1095
    #197 0x00007ffff3ba83b3 in SfxDispatcher::Update_Impl (this=0x555556877340, bForce=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1124
    #198 0x00007ffff3bfebbe in DispatcherUpdate_Impl (pArg=0x555556877340) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:681
    #199 0x00007ffff0889f71 in Link<void*, void>::Call (this=0x55555e45d520, data=0x555556877340) at include/tools/link.hxx:105
    #200 0x00007ffff08df2c8 in svtools::AsynchronLink::HandleCall_PostUserEvent (this=0x55555e45d520) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:66
    #201 0x00007ffff08df21d in svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent (instance=0x55555e45d520, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:58
    #202 0x00007fffee4622d1 in Link<void*, void>::Call (this=0x555559999828, data=0x0) at include/tools/link.hxx:105
    #203 0x00007fffee45dbf1 in ImplHandleUserEvent (pSVEvent=0x555559999820) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2312
    #204 0x00007fffee45ab1f in ImplWindowFrameProc (_pWindow=0x555556a70090, nEvent=SalEvent::UserEvent, pEvent=0x555559999820) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2869
    #205 0x00007fffef031fec in SalFrame::CallCallback (this=0x5555569484e0, nEvent=SalEvent::UserEvent, pEvent=0x555559999820) at vcl/inc/salframe.hxx:310
    #206 0x00007fffef0584df in SalGenericDisplay::ProcessEvent (this=0x5555569f26e0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #207 0x00007fffeea32ced in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffff5c60) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #208 0x00007fffeea32bbb in SalUserEventList::DispatchUserEvents (this=0x5555569f26e0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #209 0x00007fffef058435 in SalGenericDisplay::DispatchInternalEvent (this=0x5555569f26e0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #210 0x00007fffe647995f in call_userEventFn (data=0x5555555b3760) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:825
    #211 0x00007fffe9d04385 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #212 0x00007fffe9d065b7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #213 0x00007fffe9d0701f in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #214 0x00007fffe652062a in main_loop_run (pLoop=0x55555e75b650) at vcl/inc/unx/gtk/gtkdata.hxx:59
    #215 0x00007fffe64964ad in (anonymous namespace)::DialogRunner::run (this=0x55555e6e17e0) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:6768
    #216 0x00007fffe6491af0 in (anonymous namespace)::GtkInstanceDialog::run (this=0x55555e6e1680) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:10190
    #217 0x00007fff9dd55d03 in SdOutliner::ShowWrapAroundDialog (this=0x55555e6be710) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1526
    #218 0x00007fff9dd4e88f in SdOutliner::EndOfSearch (this=0x55555e6be710) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1432
    #219 0x00007fff9dd4f9e2 in SdOutliner::ProvideNextTextObject (this=0x55555e6be710) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1399
    #220 0x00007fff9dd4e68b in SdOutliner::SpellNextDocument (this=0x55555e6be710) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:393
    #221 0x00007fff9dd4fbc0 in SdOutliner::GetNextSpellSentence (this=0x55555e6be710) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:436
    #222 0x00007fff9d8f4ee0 in sd::SpellDialogChildWindow::GetNextWrongSentence (this=0x555558b3fbc0) at /home/michi/development/git/libreoffice/sd/source/ui/dlg/SpellDialogChildWindow.cxx:72
    #223 0x00007fff9480ddaa in svx::SpellDialog::GetNextSentence_Impl (this=0x55555e586600, pGuard=0x0, bUseSavedSentence=false, bRecheck=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:1050
    #224 0x00007fff9480caa4 in svx::SpellDialog::SpellContinue_Impl (this=0x55555e586600, pGuard=0x0, bUseSavedSentence=false, bIgnoreCurrentError=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:402
    #225 0x00007fff9480f0dd in svx::SpellDialog::Initialize (this=0x55555e586600) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:432
    #226 0x00007fff9485d131 in (anonymous namespace)::AbstractSpellDialog_Impl::Initialize (this=0x55555e52b360) at /home/michi/development/git/libreoffice/cui/source/factory/dlgfact.cxx:452
    #227 0x00007ffff27ef522 in svx::SpellDialogChildWindow::Initialize (this=0x555558b3fbc0) at /home/michi/development/git/libreoffice/svx/source/dialog/SpellDialogChildWindow.cxx:49
    #228 0x00007ffff3aa0d49 in SfxChildWindow::CreateChildWindow (nId=10243, pParent=0x5555589410f0, pBindings=0x555556a7ef20, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:244
    #229 0x00007ffff3b3be5d in SfxWorkWindow::CreateChildWin_Impl (this=0x7fff980287c0, pCW=0x5555598d22b0, bSetFocus=false) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #230 0x00007ffff3b3bbc6 in SfxWorkWindow::UpdateChildWindows_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1299
    #231 0x00007ffff3b3b205 in SfxWorkWindow::UpdateObjectBars_Impl2 (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1247
    #232 0x00007ffff3b3a831 in SfxWorkWindow::UpdateObjectBars_Impl (this=0x7fff980287c0) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1095
    #233 0x00007ffff3ba83b3 in SfxDispatcher::Update_Impl (this=0x555556877340, bForce=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:1124
    #234 0x00007ffff3bfebbe in DispatcherUpdate_Impl (pArg=0x555556877340) at /home/michi/development/git/libreoffice/sfx2/source/control/shell.cxx:681
    #235 0x00007ffff0889f71 in Link<void*, void>::Call (this=0x55555e50f300, data=0x555556877340) at include/tools/link.hxx:105
    #236 0x00007ffff08df2c8 in svtools::AsynchronLink::HandleCall_PostUserEvent (this=0x55555e50f300) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:66
    #237 0x00007ffff08df21d in svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent (instance=0x55555e50f300, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/control/asynclink.cxx:58
    #238 0x00007fffee4622d1 in Link<void*, void>::Call (this=0x555559c0e478, data=0x0) at include/tools/link.hxx:105
    #239 0x00007fffee45dbf1 in ImplHandleUserEvent (pSVEvent=0x555559c0e470) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2312
    #240 0x00007fffee45ab1f in ImplWindowFrameProc (_pWindow=0x555556a70090, nEvent=SalEvent::UserEvent, pEvent=0x555559c0e470) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2869
    #241 0x00007fffef031fec in SalFrame::CallCallback (this=0x5555569484e0, nEvent=SalEvent::UserEvent, pEvent=0x555559c0e470) at vcl/inc/salframe.hxx:310
    #242 0x00007fffef0584df in SalGenericDisplay::ProcessEvent (this=0x5555569f26e0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #243 0x00007fffeea32ced in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffff8470) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #244 0x00007fffeea32bbb in SalUserEventList::DispatchUserEvents (this=0x5555569f26e0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #245 0x00007fffef058435 in SalGenericDisplay::DispatchInternalEvent (this=0x5555569f26e0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #246 0x00007fffe647995f in call_userEventFn (data=0x5555555b3760) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:825
    #247 0x00007fffe9d04385 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #248 0x00007fffe9d065b7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #249 0x00007fffe9d0701f in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #250 0x00007fffe652062a in main_loop_run (pLoop=0x55555e56d830) at vcl/inc/unx/gtk/gtkdata.hxx:59
    #251 0x00007fffe64964ad in (anonymous namespace)::DialogRunner::run (this=0x555558b52070) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:6768
    #252 0x00007fffe6491af0 in (anonymous namespace)::GtkInstanceDialog::run (this=0x555558b51f10) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:10190
    #253 0x00007fff9dd55d03 in SdOutliner::ShowWrapAroundDialog (this=0x555559646c20) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1526
    #254 0x00007fff9dd4e88f in SdOutliner::EndOfSearch (this=0x555559646c20) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1432
    #255 0x00007fff9dd4f9e2 in SdOutliner::ProvideNextTextObject (this=0x555559646c20) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:1399
    #256 0x00007fff9dd4e68b in SdOutliner::SpellNextDocument (this=0x555559646c20) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:393
    #257 0x00007fff9dd4fbc0 in SdOutliner::GetNextSpellSentence (this=0x555559646c20) at /home/michi/development/git/libreoffice/sd/source/ui/view/Outliner.cxx:436
    #258 0x00007fff9d8f4ee0 in sd::SpellDialogChildWindow::GetNextWrongSentence (this=0x55555e44ba10) at /home/michi/development/git/libreoffice/sd/source/ui/dlg/SpellDialogChildWindow.cxx:72
    #259 0x00007fff9480ddaa in svx::SpellDialog::GetNextSentence_Impl (this=0x55555e445f10, pGuard=0x0, bUseSavedSentence=false, bRecheck=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:1050
    #260 0x00007fff9480caa4 in svx::SpellDialog::SpellContinue_Impl (this=0x55555e445f10, pGuard=0x0, bUseSavedSentence=false, bIgnoreCurrentError=false) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:402
    #261 0x00007fff9480f0dd in svx::SpellDialog::Initialize (this=0x55555e445f10) at /home/michi/development/git/libreoffice/cui/source/dialogs/SpellDialog.cxx:432
    #262 0x00007fff9485d131 in (anonymous namespace)::AbstractSpellDialog_Impl::Initialize (this=0x55555e3212b0) at /home/michi/development/git/libreoffice/cui/source/factory/dlgfact.cxx:452
    #263 0x00007ffff27ef522 in svx::SpellDialogChildWindow::Initialize (this=0x55555e44ba10) at /home/michi/development/git/libreoffice/svx/source/dialog/SpellDialogChildWindow.cxx:49
    #264 0x00007ffff3aa0d49 in SfxChildWindow::CreateChildWindow (nId=10243, pParent=0x5555589410f0, pBindings=0x555556a7ef20, rInfo=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/childwin.cxx:244
    #265 0x00007ffff3b3be5d in SfxWorkWindow::CreateChildWin_Impl (this=0x7fff980287c0, pCW=0x5555598d22b0, bSetFocus=true) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1350
    #266 0x00007ffff3b3e0f3 in SfxWorkWindow::ToggleChildWindow_Impl (this=0x7fff980287c0, nId=10243, bSetFocus=true) at /home/michi/development/git/libreoffice/sfx2/source/appl/workwin.cxx:1835
    #267 0x00007ffff42110c9 in SfxViewFrame::ToggleChildWindow (this=0x555556819530, nId=10243) at /home/michi/development/git/libreoffice/sfx2/source/view/viewfrm.cxx:3703
    #268 0x00007fff9de38d3c in sd::DrawViewShell::Execute (this=0x555556b4b610, rReq=...) at /home/michi/development/git/libreoffice/sd/source/ui/view/drviews7.cxx:1976
    #269 0x00007fff9de64075 in SfxStubDrawViewShellExecute (pShell=0x555556b4b610, rReq=...) at workdir/SdiTarget/sd/sdi/sdslots.hxx:1575
    #270 0x00007ffff3ba6bfe in SfxDispatcher::Call_Impl (this=0x555556877340, rShell=..., rSlot=..., rReq=..., bRecord=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:256
    #271 0x00007ffff3bab4a6 in SfxDispatcher::Execute_ (this=0x555556877340, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:755
    #272 0x00007ffff3b9302e in SfxBindings::Execute_Impl (this=0x555556a7ef20, aReq=..., pSlot=0x7fff9df8d038 <aDrawViewShellSlots_Impl+10728>, pShell=0x555556b4b610)
        at /home/michi/development/git/libreoffice/sfx2/source/control/bindings.cxx:1045
    #273 0x00007ffff3c720cd in SfxDispatchController_Impl::dispatch (this=0x55555915d2e0, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:736
    #274 0x00007ffff3c70b84 in SfxOfficeDispatch::dispatch (this=0x55555915cfa0, aURL=..., aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:255
    #275 0x00007ffff09d3792 in svt::(anonymous namespace)::AsyncAccelExec::impl_ts_asyncCallback (this=0x55555e321fc0) at /home/michi/development/git/libreoffice/svtools/source/misc/acceleratorexecute.cxx:509
    #276 0x00007ffff09d34cd in svt::(anonymous namespace)::AsyncAccelExec::LinkStubimpl_ts_asyncCallback (instance=0x55555e321fc0, data=0x0) at /home/michi/development/git/libreoffice/svtools/source/misc/acceleratorexecute.cxx:501
    #277 0x00007fffee18f511 in Link<LinkParamNone*, void>::Call (this=0x55555e322060, data=0x0) at include/tools/link.hxx:105
    #278 0x00007fffeea21eea in vcl::EventPoster::DoEvent_Impl (this=0x55555e322058) at /home/michi/development/git/libreoffice/vcl/source/helper/evntpost.cxx:52
    #279 0x00007fffeea21e9d in vcl::EventPoster::LinkStubDoEvent_Impl (instance=0x55555e322058, data=0x0) at /home/michi/development/git/libreoffice/vcl/source/helper/evntpost.cxx:48
    #280 0x00007fffee4622d1 in Link<void*, void>::Call (this=0x55555e3148c8, data=0x0) at include/tools/link.hxx:105
    #281 0x00007fffee45dbf1 in ImplHandleUserEvent (pSVEvent=0x55555e3148c0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2312
    #282 0x00007fffee45ab1f in ImplWindowFrameProc (_pWindow=0x555556a70090, nEvent=SalEvent::UserEvent, pEvent=0x55555e3148c0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2869
    #283 0x00007fffef031fec in SalFrame::CallCallback (this=0x5555569484e0, nEvent=SalEvent::UserEvent, pEvent=0x55555e3148c0) at vcl/inc/salframe.hxx:310
    #284 0x00007fffef0584df in SalGenericDisplay::ProcessEvent (this=0x5555569f26e0, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #285 0x00007fffeea32ced in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffffb850) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #286 0x00007fffeea32bbb in SalUserEventList::DispatchUserEvents (this=0x5555569f26e0, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #287 0x00007fffef058435 in SalGenericDisplay::DispatchInternalEvent (this=0x5555569f26e0, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #288 0x00007fffe647995f in call_userEventFn (data=0x5555555b3760) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:825
    #289 0x00007fffe9d04385 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #290 0x00007fffe9d065b7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #291 0x00007fffe9d06d20 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #292 0x00007fffe64785dc in GtkSalData::Yield (this=0x5555555b3760, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:403
    #293 0x00007fffe647d613 in GtkInstance::DoYield (this=0x5555555b3610, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:440
    #294 0x00007fffeeafec46 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:389
    #295 0x00007fffeeafe55f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:492
    #296 0x00007fffeeafe340 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:364
    #297 0x00007ffff7b21d05 in desktop::Desktop::Main (this=0x7fffffffd590) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1682
    #298 0x00007fffeeb2b356 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #299 0x00007fffeeb2ce79 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #300 0x00007ffff7b9ba3a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #301 0x00005555555559fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #302 0x00005555555559d7 in main (argc=2, argv=0x7fffffffd798) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Ic2e12a1ef163bb4ece04d631c92cc926bcbd0d5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191950
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Oct 6, 2025
When the TreeView has special checkboxes enabled,
block signals while calling QStandardItem::setCheckable
for the item in the first column. This prevents triggering
the QAbstractItemModel::dataChanged signal which would trigger
weld::TreeView::signal_toggled from
QtInstanceTreeView::handleDataChanged for the newly
inserted row.
Since the row is new, there is no logical change
from a previous value from the weld API perspective.

This fixes a crash otherwise seen with upcoming
commit

    Change-Id: I6262b0e9d235f9efc6cde81614d42ba28025989d
    Author: Michael Weghorn <[email protected]>
    Date:   Mon Oct 6 11:28:33 2025 +0200

        tdf#130857 qt weld: Support Writer "Caption" dialog

 when triggering the then newly supported dialog.

Backtrace:

    Thread 1 received signal SIGSEGV, Segmentation fault.
    rtl::OUString::isEmpty (this=0x18) at include/rtl/ustring.hxx:839
    839             return pData->length == 0;
    (rr) bt
    #0  rtl::OUString::isEmpty (this=0x18) at include/rtl/ustring.hxx:839
    #1  0x00007fd750a9fb07 in SwCaptionOptPage::UpdateEntry (this=0x55d1ea326dc0, nSelEntry=0) at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:1235
    #2  0x00007fd750aa4e42 in SwCaptionOptPage::ToggleEntryHdl (this=0x55d1ea326dc0, rRowCol={...}) at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:1344
    #3  0x00007fd750a9ce4d in SwCaptionOptPage::LinkStubToggleEntryHdl (instance=0x55d1ea326dc0, data={...}) at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:1342
    #4  0x00007fd78ef17411 in Link<std::pair<weld::TreeIter const&, int> const&, void>::Call (this=0x55d1ea332d70, data={...}) at include/tools/link.hxx:105
    #5  0x00007fd78ef112f1 in weld::TreeView::signal_toggled (this=0x55d1ea332d00, rIterCol={...}) at include/vcl/weld.hxx:1011
    #6  0x00007fd78eef8507 in QtInstanceTreeView::handleDataChanged (this=0x55d1ea332b50, rTopLeft=..., rBottomRight=..., rRoles=...) at vcl/qt6/../qt5/QtInstanceTreeView.cxx:1214
    #7  0x00007fd78ef17f4a in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtInstanceTreeView*, void**)::{lambda()#1}::operator()() const (this=0x7ffe16a0ef90)
            at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #8  0x00007fd78ef17eb9 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtInstanceTreeView*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtInstanceTreeView*, void**)::{lambda()#1}&&) (args=0x7ffe16a0f360, fn=...)
            at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #9  0x00007fd78ef17e83 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call
            (f=(void (QtInstanceTreeView::*)(QtInstanceTreeView * const, const QModelIndex &, const QModelIndex &, const QList<int> &)) 0x7fd78eef83b0 <QtInstanceTreeView::handleDataChanged(QModelIndex const&, QModelIndex const&, QList<int> const&)>, o=0x55d1ea332b50, arg=0x7ffe16a0f360) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #10 0x00007fd78ef17dfd in QtPrivate::FunctionPointer<void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call<QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void>
            (f=(void (QtInstanceTreeView::*)(QtInstanceTreeView * const, const QModelIndex &, const QModelIndex &, const QList<int> &)) 0x7fd78eef83b0 <QtInstanceTreeView::handleDataChanged(QModelIndex const&, QModelIndex const&, QList<int> const&)>, o=0x55d1ea332b50, arg=0x7ffe16a0f360) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #11 0x00007fd78ef17d26 in QtPrivate::QCallableObject<void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void>::impl
            (which=1, this_=0x55d1ea270ae0, r=0x55d1ea332b50, a=0x7ffe16a0f360, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:545
    #12 0x00007fd78dce95e2 in QtPrivate::QSlotObjectBase::call (this=0x55d1ea270ae0, r=0x55d1ea332b50, a=0x7ffe16a0f360) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #13 0x00007fd78df1400f in doActivate<false> (sender=0x55d1ea25a160, signal_index=3, argv=0x7ffe16a0f360) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4342
    #14 0x00007fd78df0a353 in QMetaObject::activate (sender=0x55d1ea25a160, m=0x7fd78e85ee68 <QAbstractItemModel::staticMetaObject>, local_signal_index=0, argv=0x7ffe16a0f360)
            at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4402
    #15 0x00007fd78e36b5ce in QMetaObject::activate<void, QModelIndex, QModelIndex, QList<int> > (sender=0x55d1ea25a160, mo=0x7fd78e85ee68 <QAbstractItemModel::staticMetaObject>, local_signal_index=0, ret=0x0, args=..., args=..., args=...)
            at qtbase/src/corelib/kernel/qobjectdefs.h:319
    #16 0x00007fd78e3667f0 in QAbstractItemModel::dataChanged (this=0x55d1ea25a160, _t1=..., _t2=..., _t3=...) at qtbase/src/corelib/Core_autogen/include/moc_qabstractitemmodel.cpp:658
    #17 0x00007fd78e3f83c4 in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=0x55d1e2894d60, source_top_left=..., source_bottom_right=..., roles=...)
            at /home/michi/development/git/qt5/qtbase/src/corelib/itemmodels/qsortfilterproxymodel.cpp:1528
    #18 0x00007fd78e43c83e in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QSortFilterProxyModelPrivate*, void**)::{lambda()#1}::operator()() const
            (this=0x7ffe16a0f8a0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #19 0x00007fd78e43c79d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QSortFilterProxyModelPrivate*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QSortFilterProxyModelPrivate*, void**)::{lambda()#1}&&)
            (args=0x7ffe16a0fc80, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:65
    #20 0x00007fd78e43c757 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call
            (f=(void (QSortFilterProxyModelPrivate::*)(QSortFilterProxyModelPrivate * const, const QModelIndex &, const QModelIndex &, const QList<int> &)) 0x7fd78e3f74a0 <QSortFilterProxyModelPrivate::_q_sourceDataChanged(QModelIndex const&, QModelIndex const&, QList<int> const&)>, o=0x55d1e2894d60, arg=0x7ffe16a0fc80) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:126
    #21 0x00007fd78e43c6c1 in QtPrivate::FunctionPointer<void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call<QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void>
            (f=(void (QSortFilterProxyModelPrivate::*)(QSortFilterProxyModelPrivate * const, const QModelIndex &, const QModelIndex &, const QList<int> &)) 0x7fd78e3f74a0 <QSortFilterProxyModelPrivate::_q_sourceDataChanged(QModelIndex const&, QModelIndex const&, QList<int> const&)>, o=0x55d1e2894d60, arg=0x7ffe16a0fc80) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:174
    #22 0x00007fd78e43c5f0 in QtPrivate::QPrivateSlotObject<void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void>::impl (which=1, this_=0x55d1ea25a960, r=0x55d1ea25a160, a=0x7ffe16a0fc80, ret=0x0) at qtbase/src/corelib/kernel/qobject_p.h:272
    #23 0x00007fd78dce95e2 in QtPrivate::QSlotObjectBase::call (this=0x55d1ea25a960, r=0x55d1ea25a160, a=0x7ffe16a0fc80) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
    #24 0x00007fd78df1400f in doActivate<false> (sender=0x55d1ea259540, signal_index=3, argv=0x7ffe16a0fc80) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4342
    #25 0x00007fd78df0a353 in QMetaObject::activate (sender=0x55d1ea259540, m=0x7fd78e85ee68 <QAbstractItemModel::staticMetaObject>, local_signal_index=0, argv=0x7ffe16a0fc80)
            at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4402
    #26 0x00007fd78e36b5ce in QMetaObject::activate<void, QModelIndex, QModelIndex, QList<int> > (sender=0x55d1ea259540, mo=0x7fd78e85ee68 <QAbstractItemModel::staticMetaObject>, local_signal_index=0, ret=0x0, args=..., args=..., args=...)
            at qtbase/src/corelib/kernel/qobjectdefs.h:319
    #27 0x00007fd78e3667f0 in QAbstractItemModel::dataChanged (this=0x55d1ea259540, _t1=..., _t2=..., _t3=...) at qtbase/src/corelib/Core_autogen/include/moc_qabstractitemmodel.cpp:658
    #28 0x00007fd78d23d7cd in QStandardItemModelPrivate::itemChanged (this=0x55d1ea259fb0, item=0x55d1ea28adf0, roles=...) at /home/michi/development/git/qt5/qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:568
    #29 0x00007fd78d240701 in QStandardItem::setData (this=0x55d1ea28adf0, value=..., role=10) at /home/michi/development/git/qt5/qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:909
    #30 0x00007fd78d240ccd in QStandardItem::setCheckable (this=0x55d1ea28adf0, checkable=true) at /home/michi/development/git/qt5/qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:1345
    #31 0x00007fd78ef0387f in QtInstanceTreeView::insert(weld::TreeIter const*, int, rtl::OUString const*, rtl::OUString const*, rtl::OUString const*, VirtualDevice*, bool, weld::TreeIter*)::$_0::operator()() const (this=0x55d1ea28a600)
            at vcl/qt6/../qt5/QtInstanceTreeView.cxx:88
    #32 0x00007fd78ef03355 in std::__invoke_impl<void, QtInstanceTreeView::insert(weld::TreeIter const*, int, rtl::OUString const*, rtl::OUString const*, rtl::OUString const*, VirtualDevice*, bool, weld::TreeIter*)::$_0&>(std::__invoke_other, QtInstanceTreeView::insert(weld::TreeIter const*, int, rtl::OUString const*, rtl::OUString const*, rtl::OUString const*, VirtualDevice*, bool, weld::TreeIter*)::$_0&) (__f=...)
            at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:63
    #33 0x00007fd78ef03315 in std::__invoke_r<void, QtInstanceTreeView::insert(weld::TreeIter const*, int, rtl::OUString const*, rtl::OUString const*, rtl::OUString const*, VirtualDevice*, bool, weld::TreeIter*)::$_0&>(QtInstanceTreeView::insert(weld::TreeIter const*, int, rtl::OUString const*, rtl::OUString const*, rtl::OUString const*, VirtualDevice*, bool, weld::TreeIter*)::$_0&) (__fn=...)
            at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:113
    #34 0x00007fd78ef031fd in std::_Function_handler<void(), QtInstanceTreeView::insert(weld::TreeIter const*, int, rtl::OUString const*, rtl::OUString const*, rtl::OUString const*, VirtualDevice*, bool, weld::TreeIter*)::$_0>::_M_invoke
            (__functor=...) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:292
    #35 0x00007fd78ee2adde in std::function<void()>::operator() (this=0x7ffe16a10278) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:593
    #36 0x00007fd78ee2200f in QtInstance::RunInMainThread (this=0x55d1e1053a60, func=...) at vcl/qt6/../qt5/QtInstance.cxx:205
    #37 0x00007fd78eef9580 in QtInstanceTreeView::insert (this=0x55d1ea332b50, pParent=0x0, nPos=0, pStr=0x0, pId=0x0, pIconName=0x0, pImageSurface=0x0, bChildrenOnDemand=false, pRet=0x0) at vcl/qt6/../qt5/QtInstanceTreeView.cxx:62
    #38 0x00007fd78eef9735 in virtual thunk to QtInstanceTreeView::insert(weld::TreeIter const*, int, rtl::OUString const*, rtl::OUString const*, rtl::OUString const*, VirtualDevice*, bool, weld::TreeIter*) ()
            at /home/michi/development/git/libreoffice/instdir/program/libvclplug_qt6lo.so
    #39 0x00007fd750a91799 in weld::TreeView::insert (this=0x55d1ea332d00, nRow=-1, pRet=0x0) at include/vcl/weld.hxx:1053
    #40 0x00007fd750a90c92 in weld::TreeView::append (this=0x55d1ea332d00, pRet=0x0) at include/vcl/weld.hxx:1056
    #41 0x00007fd750a9e2e9 in SwCaptionOptPage::Reset (this=0x55d1ea326dc0, rSet=0x7ffe16a10990) at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:1096
    #42 0x00007fd79c8bdd00 in SfxSingleTabDialogController::SetTabPage (this=0x7ffe16a10938, xTabPage=std::unique_ptr<SfxTabPage> = {...}) at /home/michi/development/git/libreoffice/sfx2/source/dialog/basedlgs.cxx:273
    #43 0x00007fd750a99f2d in SwCaptionOptDlg::SwCaptionOptDlg (this=0x7ffe16a10938, pParent=0x55d1e7e35f78, rSet=SfxItemSet of pool 0x55d1e2a38060 with parent 0x0 and Which ranges: [(1, 160), (1000, 1252), (4021, 4078)])
            at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:854
    #44 0x00007fd750c21914 in SwCaptionDialog::CaptionHdl (this=0x7fd77c003ea0) at /home/michi/development/git/libreoffice/sw/source/ui/frmdlg/cption.cxx:374
    #45 0x00007fd750c2006d in SwCaptionDialog::LinkStubCaptionHdl (instance=0x7fd77c003ea0, data=...) at /home/michi/development/git/libreoffice/sw/source/ui/frmdlg/cption.cxx:371
    #46 0x00007fd7976aa801 in Link<weld::Button&, void>::Call (this=0x55d1e7e35748, data=...) at include/tools/link.hxx:105
    #47 0x00007fd79768582c in weld::Button::signal_clicked (this=0x55d1e7e35740) at include/vcl/weld.hxx:1563
    [...]

Change-Id: I7ced40096c5d8cf840db3a185688017e0fdae692
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191954
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Oct 8, 2025
in headless vclplug too. Same deadlock can happen in that
mode as seen originally as:

commit d193d65
Date:   Thu Sep 8 17:30:38 2022 +0200

    tdf#151894 Pre-init NSSpellCHecker to avoid SolarMutex deadlock

current example bts are main on thread 1, vcl launched to run on
its event loop on 'lo_startmain' side thread.

(lldb) thread backtrace 1
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00000001966f489c libsystem_kernel.dylib`__psynch_mutexwait + 8
    frame #1: 0x0000000196730e58 libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_wait + 84
    frame #2: 0x000000019672e840 libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_slow + 220
    frame #3: 0x0000000105ad554c libuno_sal.dylib.3`osl_acquireMutex(pMutex=<unavailable>) at mutex.cxx:99:20
    frame #4: 0x000000015a6e8370 libmergedlo.dylib`SvpSalYieldMutex::doAcquire(unsigned int) [inlined] osl::Mutex::acquire(this=0x00000001497e7ec8) at mutex.hxx:63:20
    frame #5: 0x000000015a6e8368 libmergedlo.dylib`SvpSalYieldMutex::doAcquire(this=0x00000001497e7ec0, nLockCount=1) at svpinst.cxx:357:18
    frame #6: 0x000000015952fda8 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] comphelper::SolarMutex::acquire(this=0x00000001497e7ec0, nLockCount=1) at solarmutex.hxx:86:5
    frame #7: 0x000000015952fd98 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] osl::Guard<comphelper::SolarMutex>::Guard(this=<unavailable>, t=0x00000001497e7ec0) at mutex.hxx:144:17
    frame #8: 0x000000015952fd98 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] SolarMutexGuard::SolarMutexGuard(this=<unavailable>) at svapp.hxx:1344:11
    frame #9: 0x000000015952fd90 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] SolarMutexGuard::SolarMutexGuard(this=<unavailable>) at svapp.hxx:1344:78
    frame #10: 0x000000015952fd90 libmergedlo.dylib`doc_saveAs(pThis=0x000060000124a9a0, sUrl="/tmp/ErrareHumanumEst.fodg", pFormat="fodg", pFilterOptions="{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}") at init.cxx:3698:21
    ...
    frame #32: 0x0000000102965334 main + 228
(lldb) thread backtrace 11
  thread #11, name = 'lo_startmain'
    frame #0: 0x00000001966f53cc libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001967340e0 libsystem_pthread.dylib`_pthread_cond_wait + 984
    frame #2: 0x0000000197ddefd0 Foundation`-[NSOperation waitUntilFinished] + 488
    frame #3: 0x00000001967e28f8 CoreFoundation`_CFXNotificationPost + 804
    frame #4: 0x0000000197d9c680 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 88
    frame #5: 0x000000019a737554 AppKit`-[NSMenu insertItem:atIndex:] + 892
    frame #6: 0x000000019a8f1e00 AppKit`-[NSApplication(NSServicesMenuPrivate) _fillSpellCheckerPopupButton:] + 1380
    frame #7: 0x000000019a8f1550 AppKit`-[NSSpellChecker _fillSpellCheckerPopupButton:] + 76
    frame #8: 0x000000019a8f0688 AppKit`-[NSSpellChecker init] + 248
    frame #9: 0x000000019a8f0580 AppKit`__36+[NSSpellChecker sharedSpellChecker]_block_invoke + 20
    frame #10: 0x000000019659585c libdispatch.dylib`_dispatch_client_callout + 16
    frame #11: 0x000000019657ea28 libdispatch.dylib`_dispatch_once_callout + 32
    frame #12: 0x000000019a8f0568 AppKit`+[NSSpellChecker sharedSpellChecker] + 140
    frame #13: 0x0000000158dbb054 libmergedlo.dylib`MacSpellChecker::getLocales(this=0x00006000006fc500) at macspellimp.mm:118:42
    frame #14: 0x0000000158da1e94 libmergedlo.dylib`LngSvcMgr::GetAvailableSpellSvcs_Impl(this=0x000000014966e020) at lngsvcmgr.cxx:975:63
    frame #15: 0x0000000158da46f8 libmergedlo.dylib`LngSvcMgr::getAvailableServices(this=0x000000014966e020, rServiceName=0x000000015c044600, rLocale=0x000000016e3ae1d0) at lngsvcmgr.cxx:1369:9
    frame #16: 0x0000000158d9c434 libmergedlo.dylib`LngSvcMgr::UpdateAll(this=0x000000014966e020) at lngsvcmgr.cxx:655:46
    frame #17: 0x0000000158d9bd38 libmergedlo.dylib`LngSvcMgr::LngSvcMgr(this=0x000000014966e020) at lngsvcmgr.cxx:414:5
    frame #18: 0x0000000158da7a70 libmergedlo.dylib`::linguistic_LngSvcMgr_get_implementation(com::sun::star::uno::XComponentContext *, const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &) [inlined] LngSvcMgr::LngSvcMgr(this=0x000000014966e020) at lngsvcmgr.cxx:402:1
    frame #19: 0x0000000158da7a6c libmergedlo.dylib`linguistic_LngSvcMgr_get_implementation((null)=<unavailable>, (null)=<unavailable>) at lngsvcmgr.cxx:1816:30
    frame #20: 0x000000012dc30ee0 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] std::__1::__function::__value_func<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()[abi:ne190102](this=0x0000000149747c90, __args=0x000000016e3ae310, __args=0x000000016e3ae308) const at function.h:430:12
    frame #21: 0x000000012dc30ec4 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] std::__1::function<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()(this= Function = linguistic_LngSvcMgr_get_implementation , __arg=0x0000600000cc86b8, __arg=0x000000016e3ae308) const at function.h:989:10
    frame #22: 0x000000012dc30ec4 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(this=0x0000000149747c18, context=0x000000015c487110) at servicemanager.cxx:701:13
    frame #23: 0x000000012dc30d4c libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::createInstance(this=0x0000000149747c18, context=0x000000015c487110, singletonRequest=false) at servicemanager.cxx:666:30
    frame #24: 0x000000012dc34ed8 libuno_cppuhelpergcc3.dylib.3`non-virtual thunk to cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] cppuhelper::ServiceManager::createInstanceWithContext(this=<unavailable>, aServiceSpecifier=<unavailable>, Context=0x000000015c487110) at servicemanager.cxx:1002:36
    frame #25: 0x000000012dc34eb4 libuno_cppuhelpergcc3.dylib.3`non-virtual thunk to cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) at servicemanager.cxx:0
    frame #26: 0x00000001588b29c8 libmergedlo.dylib`com::sun::star::linguistic2::LinguServiceManager::create(the_context=0x000000015c487110) at LinguServiceManager.hpp:38:129
    frame #27: 0x00000001588b3444 libmergedlo.dylib`(anonymous namespace)::SpellDummy_Impl::GetSpell_Impl() [inlined] GetLngSvcMgr_Impl() at unolingu.cxx:60:52
    frame #28: 0x00000001588b3438 libmergedlo.dylib`(anonymous namespace)::SpellDummy_Impl::GetSpell_Impl(this=0x0000600002df4300) at unolingu.cxx:216:61
    frame #29: 0x00000001588b3314 libmergedlo.dylib`non-virtual thunk to (anonymous namespace)::SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) [inlined] (anonymous namespace)::SpellDummy_Impl::isValid(this=<unavailable>, rWord=<unavailable>, nLanguage=<unavailable>, rProperties=<unavailable>) at unolingu.cxx:248:5
    frame #30: 0x00000001588b3310 libmergedlo.dylib`non-virtual thunk to (anonymous namespace)::SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unolingu.cxx:0
    frame #31: 0x00000001588405ec libmergedlo.dylib`ImpEditEngine::DoOnlineSpelling(this=0x0000000149859800, pThisNodeOnly=<unavailable>, bSpellAtCursorPos=<unavailable>, bInterruptible=<unavailable>) at impedit4.cxx:2480:37
    frame #32: 0x0000000134059498 libsdlo.dylib`SdDrawDocument::SpellObject(this=0x000000014961cb20, pObj=0x0000000149646150) at drawdoc4.cxx:885:16
    frame #33: 0x00000001340591b0 libsdlo.dylib`SdDrawDocument::OnlineSpellingHdl(this=0x000000014961cb20, (null)=<unavailable>) at drawdoc4.cxx:823:17
    frame #34: 0x000000015a52b9b0 libmergedlo.dylib`Scheduler::CallbackTaskScheduling() at scheduler.cxx:584:20
    frame #35: 0x000000015a6e7bf8 libmergedlo.dylib`SvpSalInstance::CheckTimeout(bool) [inlined] SalTimer::CallCallback(this=<unavailable>) at saltimer.hxx:53:13
    frame #36: 0x000000015a6e7bec libmergedlo.dylib`SvpSalInstance::CheckTimeout(this=<unavailable>, bExecuteTimers=true) at svpinst.cxx:167:53
    frame #37: 0x000000015a6e863c libmergedlo.dylib`SvpSalInstance::ImplYield(this=0x00006000008c50e0, bWait=true, bHandleAllCurrentEvents=false) at svpinst.cxx:430:17
    frame #38: 0x000000015a6e8950 libmergedlo.dylib`SvpSalInstance::DoYield(this=0x00006000008c50e0, bWait=true, bHandleAllCurrentEvents=false) at svpinst.cxx:504:21
    frame #39: 0x000000015a53d920 libmergedlo.dylib`ImplYield(i_bWait=true, i_bAllEvents=false) at svapp.cxx:389:48
    frame #40: 0x000000015a53d328 libmergedlo.dylib`Application::Yield() at svapp.cxx:492:5 [artificial]
    frame #41: 0x000000015a53d210 libmergedlo.dylib`Application::Execute() at svapp.cxx:364:13
    frame #42: 0x00000001594ffeb4 libmergedlo.dylib`desktop::Desktop::Main(this=0x000000016e3aeed0) at app.cxx:1680:13
    frame #43: 0x000000015a5475d0 libmergedlo.dylib`ImplSVMain() at svmain.cxx:228:35
    frame #44: 0xffffffffffffffff libmergedlo.dylib`SVMain()
    frame #45: 0x000000015951e5e4 libmergedlo.dylib`soffice_main at sofficemain.cxx:121:12
    frame #46: 0x00000001595669bc libmergedlo.dylib`lo_startmain((null)=<unavailable>) at init.cxx:7860:5
    frame #47: 0x0000000105ae59d8 libuno_sal.dylib.3`osl_thread_start_Impl(pData=0x00006000005cb330) at thread.cxx:240:9
    frame #48: 0x0000000196733c0c libsystem_pthread.dylib`_pthread_start + 136

Change-Id: I8d25ed364f131434ce4f738604ddcf3f586cf6d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192052
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Miklos Vajna <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Oct 8, 2025
in headless vclplug too. Same deadlock can happen in that
mode as seen originally as:

commit d193d65
Date:   Thu Sep 8 17:30:38 2022 +0200

    tdf#151894 Pre-init NSSpellCHecker to avoid SolarMutex deadlock

current example bts are main on thread 1, vcl launched to run on
its event loop on 'lo_startmain' side thread.

(lldb) thread backtrace 1
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00000001966f489c libsystem_kernel.dylib`__psynch_mutexwait + 8
    frame #1: 0x0000000196730e58 libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_wait + 84
    frame #2: 0x000000019672e840 libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_slow + 220
    frame #3: 0x0000000105ad554c libuno_sal.dylib.3`osl_acquireMutex(pMutex=<unavailable>) at mutex.cxx:99:20
    frame #4: 0x000000015a6e8370 libmergedlo.dylib`SvpSalYieldMutex::doAcquire(unsigned int) [inlined] osl::Mutex::acquire(this=0x00000001497e7ec8) at mutex.hxx:63:20
    frame #5: 0x000000015a6e8368 libmergedlo.dylib`SvpSalYieldMutex::doAcquire(this=0x00000001497e7ec0, nLockCount=1) at svpinst.cxx:357:18
    frame #6: 0x000000015952fda8 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] comphelper::SolarMutex::acquire(this=0x00000001497e7ec0, nLockCount=1) at solarmutex.hxx:86:5
    frame #7: 0x000000015952fd98 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] osl::Guard<comphelper::SolarMutex>::Guard(this=<unavailable>, t=0x00000001497e7ec0) at mutex.hxx:144:17
    frame #8: 0x000000015952fd98 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] SolarMutexGuard::SolarMutexGuard(this=<unavailable>) at svapp.hxx:1344:11
    frame #9: 0x000000015952fd90 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] SolarMutexGuard::SolarMutexGuard(this=<unavailable>) at svapp.hxx:1344:78
    frame #10: 0x000000015952fd90 libmergedlo.dylib`doc_saveAs(pThis=0x000060000124a9a0, sUrl="/tmp/ErrareHumanumEst.fodg", pFormat="fodg", pFilterOptions="{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}") at init.cxx:3698:21
    ...
    frame #32: 0x0000000102965334 main + 228
(lldb) thread backtrace 11
  thread #11, name = 'lo_startmain'
    frame #0: 0x00000001966f53cc libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001967340e0 libsystem_pthread.dylib`_pthread_cond_wait + 984
    frame #2: 0x0000000197ddefd0 Foundation`-[NSOperation waitUntilFinished] + 488
    frame #3: 0x00000001967e28f8 CoreFoundation`_CFXNotificationPost + 804
    frame #4: 0x0000000197d9c680 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 88
    frame #5: 0x000000019a737554 AppKit`-[NSMenu insertItem:atIndex:] + 892
    frame #6: 0x000000019a8f1e00 AppKit`-[NSApplication(NSServicesMenuPrivate) _fillSpellCheckerPopupButton:] + 1380
    frame #7: 0x000000019a8f1550 AppKit`-[NSSpellChecker _fillSpellCheckerPopupButton:] + 76
    frame #8: 0x000000019a8f0688 AppKit`-[NSSpellChecker init] + 248
    frame #9: 0x000000019a8f0580 AppKit`__36+[NSSpellChecker sharedSpellChecker]_block_invoke + 20
    frame #10: 0x000000019659585c libdispatch.dylib`_dispatch_client_callout + 16
    frame #11: 0x000000019657ea28 libdispatch.dylib`_dispatch_once_callout + 32
    frame #12: 0x000000019a8f0568 AppKit`+[NSSpellChecker sharedSpellChecker] + 140
    frame #13: 0x0000000158dbb054 libmergedlo.dylib`MacSpellChecker::getLocales(this=0x00006000006fc500) at macspellimp.mm:118:42
    frame #14: 0x0000000158da1e94 libmergedlo.dylib`LngSvcMgr::GetAvailableSpellSvcs_Impl(this=0x000000014966e020) at lngsvcmgr.cxx:975:63
    frame #15: 0x0000000158da46f8 libmergedlo.dylib`LngSvcMgr::getAvailableServices(this=0x000000014966e020, rServiceName=0x000000015c044600, rLocale=0x000000016e3ae1d0) at lngsvcmgr.cxx:1369:9
    frame #16: 0x0000000158d9c434 libmergedlo.dylib`LngSvcMgr::UpdateAll(this=0x000000014966e020) at lngsvcmgr.cxx:655:46
    frame #17: 0x0000000158d9bd38 libmergedlo.dylib`LngSvcMgr::LngSvcMgr(this=0x000000014966e020) at lngsvcmgr.cxx:414:5
    frame #18: 0x0000000158da7a70 libmergedlo.dylib`::linguistic_LngSvcMgr_get_implementation(com::sun::star::uno::XComponentContext *, const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &) [inlined] LngSvcMgr::LngSvcMgr(this=0x000000014966e020) at lngsvcmgr.cxx:402:1
    frame #19: 0x0000000158da7a6c libmergedlo.dylib`linguistic_LngSvcMgr_get_implementation((null)=<unavailable>, (null)=<unavailable>) at lngsvcmgr.cxx:1816:30
    frame #20: 0x000000012dc30ee0 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] std::__1::__function::__value_func<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()[abi:ne190102](this=0x0000000149747c90, __args=0x000000016e3ae310, __args=0x000000016e3ae308) const at function.h:430:12
    frame #21: 0x000000012dc30ec4 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] std::__1::function<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()(this= Function = linguistic_LngSvcMgr_get_implementation , __arg=0x0000600000cc86b8, __arg=0x000000016e3ae308) const at function.h:989:10
    frame #22: 0x000000012dc30ec4 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(this=0x0000000149747c18, context=0x000000015c487110) at servicemanager.cxx:701:13
    frame #23: 0x000000012dc30d4c libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::createInstance(this=0x0000000149747c18, context=0x000000015c487110, singletonRequest=false) at servicemanager.cxx:666:30
    frame #24: 0x000000012dc34ed8 libuno_cppuhelpergcc3.dylib.3`non-virtual thunk to cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] cppuhelper::ServiceManager::createInstanceWithContext(this=<unavailable>, aServiceSpecifier=<unavailable>, Context=0x000000015c487110) at servicemanager.cxx:1002:36
    frame #25: 0x000000012dc34eb4 libuno_cppuhelpergcc3.dylib.3`non-virtual thunk to cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) at servicemanager.cxx:0
    frame #26: 0x00000001588b29c8 libmergedlo.dylib`com::sun::star::linguistic2::LinguServiceManager::create(the_context=0x000000015c487110) at LinguServiceManager.hpp:38:129
    frame #27: 0x00000001588b3444 libmergedlo.dylib`(anonymous namespace)::SpellDummy_Impl::GetSpell_Impl() [inlined] GetLngSvcMgr_Impl() at unolingu.cxx:60:52
    frame #28: 0x00000001588b3438 libmergedlo.dylib`(anonymous namespace)::SpellDummy_Impl::GetSpell_Impl(this=0x0000600002df4300) at unolingu.cxx:216:61
    frame #29: 0x00000001588b3314 libmergedlo.dylib`non-virtual thunk to (anonymous namespace)::SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) [inlined] (anonymous namespace)::SpellDummy_Impl::isValid(this=<unavailable>, rWord=<unavailable>, nLanguage=<unavailable>, rProperties=<unavailable>) at unolingu.cxx:248:5
    frame #30: 0x00000001588b3310 libmergedlo.dylib`non-virtual thunk to (anonymous namespace)::SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unolingu.cxx:0
    frame #31: 0x00000001588405ec libmergedlo.dylib`ImpEditEngine::DoOnlineSpelling(this=0x0000000149859800, pThisNodeOnly=<unavailable>, bSpellAtCursorPos=<unavailable>, bInterruptible=<unavailable>) at impedit4.cxx:2480:37
    frame #32: 0x0000000134059498 libsdlo.dylib`SdDrawDocument::SpellObject(this=0x000000014961cb20, pObj=0x0000000149646150) at drawdoc4.cxx:885:16
    frame #33: 0x00000001340591b0 libsdlo.dylib`SdDrawDocument::OnlineSpellingHdl(this=0x000000014961cb20, (null)=<unavailable>) at drawdoc4.cxx:823:17
    frame #34: 0x000000015a52b9b0 libmergedlo.dylib`Scheduler::CallbackTaskScheduling() at scheduler.cxx:584:20
    frame #35: 0x000000015a6e7bf8 libmergedlo.dylib`SvpSalInstance::CheckTimeout(bool) [inlined] SalTimer::CallCallback(this=<unavailable>) at saltimer.hxx:53:13
    frame #36: 0x000000015a6e7bec libmergedlo.dylib`SvpSalInstance::CheckTimeout(this=<unavailable>, bExecuteTimers=true) at svpinst.cxx:167:53
    frame #37: 0x000000015a6e863c libmergedlo.dylib`SvpSalInstance::ImplYield(this=0x00006000008c50e0, bWait=true, bHandleAllCurrentEvents=false) at svpinst.cxx:430:17
    frame #38: 0x000000015a6e8950 libmergedlo.dylib`SvpSalInstance::DoYield(this=0x00006000008c50e0, bWait=true, bHandleAllCurrentEvents=false) at svpinst.cxx:504:21
    frame #39: 0x000000015a53d920 libmergedlo.dylib`ImplYield(i_bWait=true, i_bAllEvents=false) at svapp.cxx:389:48
    frame #40: 0x000000015a53d328 libmergedlo.dylib`Application::Yield() at svapp.cxx:492:5 [artificial]
    frame #41: 0x000000015a53d210 libmergedlo.dylib`Application::Execute() at svapp.cxx:364:13
    frame #42: 0x00000001594ffeb4 libmergedlo.dylib`desktop::Desktop::Main(this=0x000000016e3aeed0) at app.cxx:1680:13
    frame #43: 0x000000015a5475d0 libmergedlo.dylib`ImplSVMain() at svmain.cxx:228:35
    frame #44: 0xffffffffffffffff libmergedlo.dylib`SVMain()
    frame #45: 0x000000015951e5e4 libmergedlo.dylib`soffice_main at sofficemain.cxx:121:12
    frame #46: 0x00000001595669bc libmergedlo.dylib`lo_startmain((null)=<unavailable>) at init.cxx:7860:5
    frame #47: 0x0000000105ae59d8 libuno_sal.dylib.3`osl_thread_start_Impl(pData=0x00006000005cb330) at thread.cxx:240:9
    frame #48: 0x0000000196733c0c libsystem_pthread.dylib`_pthread_start + 136

Change-Id: I8d25ed364f131434ce4f738604ddcf3f586cf6d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192060
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
tdf-gerrit pushed a commit that referenced this pull request Oct 15, 2025
in headless vclplug too. Same deadlock can happen in that
mode as seen originally as:

commit d193d65
Date:   Thu Sep 8 17:30:38 2022 +0200

    tdf#151894 Pre-init NSSpellCHecker to avoid SolarMutex deadlock

current example bts are main on thread 1, vcl launched to run on
its event loop on 'lo_startmain' side thread.

(lldb) thread backtrace 1
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00000001966f489c libsystem_kernel.dylib`__psynch_mutexwait + 8
    frame #1: 0x0000000196730e58 libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_wait + 84
    frame #2: 0x000000019672e840 libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_slow + 220
    frame #3: 0x0000000105ad554c libuno_sal.dylib.3`osl_acquireMutex(pMutex=<unavailable>) at mutex.cxx:99:20
    frame #4: 0x000000015a6e8370 libmergedlo.dylib`SvpSalYieldMutex::doAcquire(unsigned int) [inlined] osl::Mutex::acquire(this=0x00000001497e7ec8) at mutex.hxx:63:20
    frame #5: 0x000000015a6e8368 libmergedlo.dylib`SvpSalYieldMutex::doAcquire(this=0x00000001497e7ec0, nLockCount=1) at svpinst.cxx:357:18
    frame #6: 0x000000015952fda8 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] comphelper::SolarMutex::acquire(this=0x00000001497e7ec0, nLockCount=1) at solarmutex.hxx:86:5
    frame #7: 0x000000015952fd98 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] osl::Guard<comphelper::SolarMutex>::Guard(this=<unavailable>, t=0x00000001497e7ec0) at mutex.hxx:144:17
    frame #8: 0x000000015952fd98 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] SolarMutexGuard::SolarMutexGuard(this=<unavailable>) at svapp.hxx:1344:11
    frame #9: 0x000000015952fd90 libmergedlo.dylib`doc_saveAs(_LibreOfficeKitDocument*, char const*, char const*, char const*) [inlined] SolarMutexGuard::SolarMutexGuard(this=<unavailable>) at svapp.hxx:1344:78
    frame #10: 0x000000015952fd90 libmergedlo.dylib`doc_saveAs(pThis=0x000060000124a9a0, sUrl="/tmp/ErrareHumanumEst.fodg", pFormat="fodg", pFilterOptions="{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}") at init.cxx:3698:21
    ...
    frame #32: 0x0000000102965334 main + 228
(lldb) thread backtrace 11
  thread #11, name = 'lo_startmain'
    frame #0: 0x00000001966f53cc libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001967340e0 libsystem_pthread.dylib`_pthread_cond_wait + 984
    frame #2: 0x0000000197ddefd0 Foundation`-[NSOperation waitUntilFinished] + 488
    frame #3: 0x00000001967e28f8 CoreFoundation`_CFXNotificationPost + 804
    frame #4: 0x0000000197d9c680 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 88
    frame #5: 0x000000019a737554 AppKit`-[NSMenu insertItem:atIndex:] + 892
    frame #6: 0x000000019a8f1e00 AppKit`-[NSApplication(NSServicesMenuPrivate) _fillSpellCheckerPopupButton:] + 1380
    frame #7: 0x000000019a8f1550 AppKit`-[NSSpellChecker _fillSpellCheckerPopupButton:] + 76
    frame #8: 0x000000019a8f0688 AppKit`-[NSSpellChecker init] + 248
    frame #9: 0x000000019a8f0580 AppKit`__36+[NSSpellChecker sharedSpellChecker]_block_invoke + 20
    frame #10: 0x000000019659585c libdispatch.dylib`_dispatch_client_callout + 16
    frame #11: 0x000000019657ea28 libdispatch.dylib`_dispatch_once_callout + 32
    frame #12: 0x000000019a8f0568 AppKit`+[NSSpellChecker sharedSpellChecker] + 140
    frame #13: 0x0000000158dbb054 libmergedlo.dylib`MacSpellChecker::getLocales(this=0x00006000006fc500) at macspellimp.mm:118:42
    frame #14: 0x0000000158da1e94 libmergedlo.dylib`LngSvcMgr::GetAvailableSpellSvcs_Impl(this=0x000000014966e020) at lngsvcmgr.cxx:975:63
    frame #15: 0x0000000158da46f8 libmergedlo.dylib`LngSvcMgr::getAvailableServices(this=0x000000014966e020, rServiceName=0x000000015c044600, rLocale=0x000000016e3ae1d0) at lngsvcmgr.cxx:1369:9
    frame #16: 0x0000000158d9c434 libmergedlo.dylib`LngSvcMgr::UpdateAll(this=0x000000014966e020) at lngsvcmgr.cxx:655:46
    frame #17: 0x0000000158d9bd38 libmergedlo.dylib`LngSvcMgr::LngSvcMgr(this=0x000000014966e020) at lngsvcmgr.cxx:414:5
    frame #18: 0x0000000158da7a70 libmergedlo.dylib`::linguistic_LngSvcMgr_get_implementation(com::sun::star::uno::XComponentContext *, const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &) [inlined] LngSvcMgr::LngSvcMgr(this=0x000000014966e020) at lngsvcmgr.cxx:402:1
    frame #19: 0x0000000158da7a6c libmergedlo.dylib`linguistic_LngSvcMgr_get_implementation((null)=<unavailable>, (null)=<unavailable>) at lngsvcmgr.cxx:1816:30
    frame #20: 0x000000012dc30ee0 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] std::__1::__function::__value_func<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()[abi:ne190102](this=0x0000000149747c90, __args=0x000000016e3ae310, __args=0x000000016e3ae308) const at function.h:430:12
    frame #21: 0x000000012dc30ec4 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] std::__1::function<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()(this= Function = linguistic_LngSvcMgr_get_implementation , __arg=0x0000600000cc86b8, __arg=0x000000016e3ae308) const at function.h:989:10
    frame #22: 0x000000012dc30ec4 libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(this=0x0000000149747c18, context=0x000000015c487110) at servicemanager.cxx:701:13
    frame #23: 0x000000012dc30d4c libuno_cppuhelpergcc3.dylib.3`cppuhelper::ServiceManager::Data::Implementation::createInstance(this=0x0000000149747c18, context=0x000000015c487110, singletonRequest=false) at servicemanager.cxx:666:30
    frame #24: 0x000000012dc34ed8 libuno_cppuhelpergcc3.dylib.3`non-virtual thunk to cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) [inlined] cppuhelper::ServiceManager::createInstanceWithContext(this=<unavailable>, aServiceSpecifier=<unavailable>, Context=0x000000015c487110) at servicemanager.cxx:1002:36
    frame #25: 0x000000012dc34eb4 libuno_cppuhelpergcc3.dylib.3`non-virtual thunk to cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) at servicemanager.cxx:0
    frame #26: 0x00000001588b29c8 libmergedlo.dylib`com::sun::star::linguistic2::LinguServiceManager::create(the_context=0x000000015c487110) at LinguServiceManager.hpp:38:129
    frame #27: 0x00000001588b3444 libmergedlo.dylib`(anonymous namespace)::SpellDummy_Impl::GetSpell_Impl() [inlined] GetLngSvcMgr_Impl() at unolingu.cxx:60:52
    frame #28: 0x00000001588b3438 libmergedlo.dylib`(anonymous namespace)::SpellDummy_Impl::GetSpell_Impl(this=0x0000600002df4300) at unolingu.cxx:216:61
    frame #29: 0x00000001588b3314 libmergedlo.dylib`non-virtual thunk to (anonymous namespace)::SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) [inlined] (anonymous namespace)::SpellDummy_Impl::isValid(this=<unavailable>, rWord=<unavailable>, nLanguage=<unavailable>, rProperties=<unavailable>) at unolingu.cxx:248:5
    frame #30: 0x00000001588b3310 libmergedlo.dylib`non-virtual thunk to (anonymous namespace)::SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unolingu.cxx:0
    frame #31: 0x00000001588405ec libmergedlo.dylib`ImpEditEngine::DoOnlineSpelling(this=0x0000000149859800, pThisNodeOnly=<unavailable>, bSpellAtCursorPos=<unavailable>, bInterruptible=<unavailable>) at impedit4.cxx:2480:37
    frame #32: 0x0000000134059498 libsdlo.dylib`SdDrawDocument::SpellObject(this=0x000000014961cb20, pObj=0x0000000149646150) at drawdoc4.cxx:885:16
    frame #33: 0x00000001340591b0 libsdlo.dylib`SdDrawDocument::OnlineSpellingHdl(this=0x000000014961cb20, (null)=<unavailable>) at drawdoc4.cxx:823:17
    frame #34: 0x000000015a52b9b0 libmergedlo.dylib`Scheduler::CallbackTaskScheduling() at scheduler.cxx:584:20
    frame #35: 0x000000015a6e7bf8 libmergedlo.dylib`SvpSalInstance::CheckTimeout(bool) [inlined] SalTimer::CallCallback(this=<unavailable>) at saltimer.hxx:53:13
    frame #36: 0x000000015a6e7bec libmergedlo.dylib`SvpSalInstance::CheckTimeout(this=<unavailable>, bExecuteTimers=true) at svpinst.cxx:167:53
    frame #37: 0x000000015a6e863c libmergedlo.dylib`SvpSalInstance::ImplYield(this=0x00006000008c50e0, bWait=true, bHandleAllCurrentEvents=false) at svpinst.cxx:430:17
    frame #38: 0x000000015a6e8950 libmergedlo.dylib`SvpSalInstance::DoYield(this=0x00006000008c50e0, bWait=true, bHandleAllCurrentEvents=false) at svpinst.cxx:504:21
    frame #39: 0x000000015a53d920 libmergedlo.dylib`ImplYield(i_bWait=true, i_bAllEvents=false) at svapp.cxx:389:48
    frame #40: 0x000000015a53d328 libmergedlo.dylib`Application::Yield() at svapp.cxx:492:5 [artificial]
    frame #41: 0x000000015a53d210 libmergedlo.dylib`Application::Execute() at svapp.cxx:364:13
    frame #42: 0x00000001594ffeb4 libmergedlo.dylib`desktop::Desktop::Main(this=0x000000016e3aeed0) at app.cxx:1680:13
    frame #43: 0x000000015a5475d0 libmergedlo.dylib`ImplSVMain() at svmain.cxx:228:35
    frame #44: 0xffffffffffffffff libmergedlo.dylib`SVMain()
    frame #45: 0x000000015951e5e4 libmergedlo.dylib`soffice_main at sofficemain.cxx:121:12
    frame #46: 0x00000001595669bc libmergedlo.dylib`lo_startmain((null)=<unavailable>) at init.cxx:7860:5
    frame #47: 0x0000000105ae59d8 libuno_sal.dylib.3`osl_thread_start_Impl(pData=0x00006000005cb330) at thread.cxx:240:9
    frame #48: 0x0000000196733c0c libsystem_pthread.dylib`_pthread_start + 136

Change-Id: I8d25ed364f131434ce4f738604ddcf3f586cf6d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192052
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Miklos Vajna <[email protected]>
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.

1 participant