Skip to content

tdf#103033 Enable tab scrolling in notebook bar#55

Closed
cadivus wants to merge 1 commit intoLibreOffice:masterfrom
cadivus:cadivus/feat/tab-scrolling
Closed

tdf#103033 Enable tab scrolling in notebook bar#55
cadivus wants to merge 1 commit intoLibreOffice:masterfrom
cadivus:cadivus/feat/tab-scrolling

Conversation

@cadivus
Copy link
Contributor

@cadivus cadivus commented Mar 6, 2026

Also requires 100ms between switches to reduce sensitivity. Before that, it was unusable with touchpads.

Change-Id: I42e60d9fb88766b133c56fa677ad907a5182e862

Also requires 100ms between switches to reduce sensitivity.
Before that, it was unusable with touchpads.

Change-Id: I42e60d9fb88766b133c56fa677ad907a5182e862
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

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 Mar 6, 2026
tdf-gerrit pushed a commit that referenced this pull request Mar 11, 2026
As has been done almost everywhere else already, switch
from defining (skeleton) tab pages in the .ui file for the
database "Advanced Settings" dialog and adding the actual
content only later.

Instead, completely have the logic to add them (including
the tab label to use) in C++ code, as is done elsewhere.

This prevents the situation where trying to remove
the tab page that was defined in the UI file but
isn't known to the SfxTabDialogController yet
would result in an assert getting triggered when using
the qt6 VCL plugin with SAL_VCL_QT_USE_WELDED_WIDGETS=1
when triggering the dialog for a case where the
"Generated Values" tab page isn't meant to be shown.

Seen with upcoming commit

    Change-Id: I2eab17ed0aff12aa3c650f35c8a1b7d737091842
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Mar 9 21:00:01 2026 +0100

        tdf#130857 qt weld: Support DB "Advanced Settings" dialog

(See the commit message of that commit for more details,
but don't apply the extra local change mentioned in there
so that the "Generated Values" tab page will not be added.)

Backtrace how the

    assert(!m_pImpl->aData.empty() && "no Pages registered");

at the beginning of SfxTabDialogController::DeactivatePage
would be triggered otherwise:

    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  0x00007f0bdc8a147f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
    #2  0x00007f0bdc84a942 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f0bdc8324ac in __GI_abort () at ./stdlib/abort.c:77
    #4  0x00007f0bdc832420 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=0x7f0bd847b283 "bool SfxTabDialogController::DeactivatePage(std::u16string_view)")
        at ./assert/assert.c:118
    #5  0x00007f0bd8bc655d in SfxTabDialogController::DeactivatePage (this=0x55f6d18af070, aPage=u"generated") at /home/michi/development/git/libreoffice/sfx2/source/dialog/tabdlg.cxx:372
    #6  0x00007f0bd8bc64aa in SfxTabDialogController::DeactivatePageHdl (this=0x55f6d18af070, rPage="generated") at /home/michi/development/git/libreoffice/sfx2/source/dialog/tabdlg.cxx:358
    #7  0x00007f0bd8bc474d in SfxTabDialogController::LinkStubDeactivatePageHdl (instance=0x55f6d18af070, data="generated") at /home/michi/development/git/libreoffice/sfx2/source/dialog/tabdlg.cxx:356
    #8  0x00007f0bca4f6ee6 in Link<rtl::OUString const&, bool>::Call (this=0x55f6d18aebd8, data="generated") at include/tools/link.hxx:105
    #9  0x00007f0bca4f135e in QtInstanceNotebook::currentTabChanged (this=0x55f6d18ae9e0) at vcl/qt6/../qt5/QtInstanceNotebook.cxx:191
    #10 0x00007f0bca4f7a91 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceNotebook::*)()>::call(void (QtInstanceNotebook::*)(), QtInstanceNotebook*, void**)::{lambda()#1}::operator()() const (this=0x7ffecd74f740) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:128
    #11 0x00007f0bca4f79c9 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceNotebook::*)()>::call(void (QtInstanceNotebook::*)(), QtInstanceNotebook*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceNotebook::*)()>::call(void (QtInstanceNotebook::*)(), QtInstanceNotebook*, void**)::{lambda()#1}&&) (args=0x7ffecd74fb20, fn=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:66
    #12 0x00007f0bca4f78fb in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceNotebook::*)()>::call(void (QtInstanceNotebook::*)(), QtInstanceNotebook*, void**)
        (f=(void (QtInstanceNotebook::*)(class QtInstanceNotebook * const)) 0x7f0bca4f1300 <QtInstanceNotebook::currentTabChanged()>, o=0x55f6d18ae9e0, arg=0x7ffecd74fb20)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #13 0x00007f0bca4f787d in QtPrivate::FunctionPointer<void (QtInstanceNotebook::*)()>::call<QtPrivate::List<>, void>(void (QtInstanceNotebook::*)(), QtInstanceNotebook*, void**)
        (f=(void (QtInstanceNotebook::*)(class QtInstanceNotebook * const)) 0x7f0bca4f1300 <QtInstanceNotebook::currentTabChanged()>, o=0x55f6d18ae9e0, arg=0x7ffecd74fb20)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:175
    #14 0x00007f0bca4f77a6 in QtPrivate::QCallableObject<void (QtInstanceNotebook::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x55f6d1899530, r=0x55f6d18ae9e0, a=0x7ffecd74fb20, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:546
    #15 0x00007f0bc92e95f2 in QtPrivate::QSlotObjectBase::call (this=0x55f6d1899530, r=0x55f6d18ae9e0, a=0x7ffecd74fb20) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:462
    #16 0x00007f0bc951c112 in doActivate<false> (sender=0x55f6d1e562e0, signal_index=7, argv=0x7ffecd74fb20) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4372
    #17 0x00007f0bc95124b3 in QMetaObject::activate (sender=0x55f6d1e562e0, m=0x7f0bc7f7bcb0 <QTabWidget::staticMetaObject>, local_signal_index=0, argv=0x7ffecd74fb20)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4432
    #18 0x00007f0bc73a69fb in QMetaObject::activate<void, int> (sender=0x55f6d1e562e0, mo=0x7f0bc7f7bcb0 <QTabWidget::staticMetaObject>, local_signal_index=0, ret=0x0, args=@0x7ffecd74fb64: 0) at qtbase/src/corelib/kernel/qobjectdefs.h:320
    #19 0x00007f0bc77fde78 in QTabWidget::currentChanged (this=0x55f6d1e562e0, _t1=0) at qtbase/src/widgets/Widgets_autogen/include/moc_qtabwidget.cpp:263
    #20 0x00007f0bc77fdc4b in QTabWidgetPrivate::showTab (this=0x55f6d1889c50, index=0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qtabwidget.cpp:761
    #21 0x00007f0bc780118a in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QTabWidgetPrivate::*)(int)>::call(void (QTabWidgetPrivate::*)(int), QTabWidgetPrivate*, void**)::{lambda()#1}::operator()() const (this=0x7ffecd74fc30) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:128
    #22 0x00007f0bc7800ffd in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QTabWidgetPrivate::*)(int)>::call(void (QTabWidgetPrivate::*)(int), QTabWidgetPrivate*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QTabWidgetPrivate::*)(int)>::call(void (QTabWidgetPrivate::*)(int), QTabWidgetPrivate*, void**)::{lambda()#1}&&) (args=0x7ffecd750030, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:66
    #23 0x00007f0bc7800f87 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QTabWidgetPrivate::*)(int)>::call
        (f=(void (QTabWidgetPrivate::*)(class QTabWidgetPrivate * const, int)) 0x7f0bc77fdbe0 <QTabWidgetPrivate::showTab(int)>, o=0x55f6d1889c50, arg=0x7ffecd750030) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #24 0x00007f0bc7800ef1 in QtPrivate::FunctionPointer<void (QTabWidgetPrivate::*)(int)>::call<QtPrivate::List<int>, void>
        (f=(void (QTabWidgetPrivate::*)(class QTabWidgetPrivate * const, int)) 0x7f0bc77fdbe0 <QTabWidgetPrivate::showTab(int)>, o=0x55f6d1889c50, arg=0x7ffecd750030) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:175
    #25 0x00007f0bc7800e20 in QtPrivate::QPrivateSlotObject<void (QTabWidgetPrivate::*)(int), QtPrivate::List<int>, void>::impl (which=1, this_=0x55f6d1d6ecb0, r=0x55f6d1e562e0, a=0x7ffecd750030, ret=0x0)
        at qtbase/src/corelib/kernel/qobject_p.h:273
    #26 0x00007f0bc92e95f2 in QtPrivate::QSlotObjectBase::call (this=0x55f6d1d6ecb0, r=0x55f6d1e562e0, a=0x7ffecd750030) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:462
    #27 0x00007f0bc951c112 in doActivate<false> (sender=0x55f6d0aa9aa0, signal_index=7, argv=0x7ffecd750030) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4372
    #28 0x00007f0bc95124b3 in QMetaObject::activate (sender=0x55f6d0aa9aa0, m=0x7f0bc7f7a098 <QTabBar::staticMetaObject>, local_signal_index=0, argv=0x7ffecd750030)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4432
    #29 0x00007f0bc73a69fb in QMetaObject::activate<void, int> (sender=0x55f6d0aa9aa0, mo=0x7f0bc7f7a098 <QTabBar::staticMetaObject>, local_signal_index=0, ret=0x0, args=@0x7ffecd750074: 0) at qtbase/src/corelib/kernel/qobjectdefs.h:320
    #30 0x00007f0bc77c3308 in QTabBar::currentChanged (this=0x55f6d0aa9aa0, _t1=0) at qtbase/src/widgets/Widgets_autogen/include/moc_qtabbar.cpp:269
    #31 0x00007f0bc77c27af in QTabBar::setCurrentIndex (this=0x55f6d0aa9aa0, index=0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qtabbar.cpp:1469
    #32 0x00007f0bc77c2f07 in QTabBar::removeTab (this=0x55f6d0aa9aa0, index=0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qtabbar.cpp:1096
    #33 0x00007f0bc77fc3ea in QTabWidgetPrivate::removeTab (this=0x55f6d1889c50, index=0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qtabwidget.cpp:767
    #34 0x00007f0bc780118a in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QTabWidgetPrivate::*)(int)>::call(void (QTabWidgetPrivate::*)(int), QTabWidgetPrivate*, void**)::{lambda()#1}::operator()() const (this=0x7ffecd7502b0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:128
    #35 0x00007f0bc7800ffd in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QTabWidgetPrivate::*)(int)>::call(void (QTabWidgetPrivate::*)(int), QTabWidgetPrivate*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QTabWidgetPrivate::*)(int)>::call(void (QTabWidgetPrivate::*)(int), QTabWidgetPrivate*, void**)::{lambda()#1}&&) (args=0x7ffecd7506b0, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:66
    #36 0x00007f0bc7800f87 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QTabWidgetPrivate::*)(int)>::call
        (f=(void (QTabWidgetPrivate::*)(class QTabWidgetPrivate * const, int)) 0x7f0bc77fc3b0 <QTabWidgetPrivate::removeTab(int)>, o=0x55f6d1889c50, arg=0x7ffecd7506b0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #37 0x00007f0bc7800ef1 in QtPrivate::FunctionPointer<void (QTabWidgetPrivate::*)(int)>::call<QtPrivate::List<int>, void>
        (f=(void (QTabWidgetPrivate::*)(class QTabWidgetPrivate * const, int)) 0x7f0bc77fc3b0 <QTabWidgetPrivate::removeTab(int)>, o=0x55f6d1889c50, arg=0x7ffecd7506b0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:175
    #38 0x00007f0bc7800e20 in QtPrivate::QPrivateSlotObject<void (QTabWidgetPrivate::*)(int), QtPrivate::List<int>, void>::impl (which=1, this_=0x55f6d1d73e10, r=0x55f6d1e562e0, a=0x7ffecd7506b0, ret=0x0)
        at qtbase/src/corelib/kernel/qobject_p.h:273
    #39 0x00007f0bc92e95f2 in QtPrivate::QSlotObjectBase::call (this=0x55f6d1d73e10, r=0x55f6d1e562e0, a=0x7ffecd7506b0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:462
    #40 0x00007f0bc951c112 in doActivate<false> (sender=0x55f6d1e56310, signal_index=8, argv=0x7ffecd7506b0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4372
    #41 0x00007f0bc95124b3 in QMetaObject::activate (sender=0x55f6d1e56310, m=0x7f0bc7f796e0 <QStackedWidget::staticMetaObject>, local_signal_index=1, argv=0x7ffecd7506b0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4432
    #42 0x00007f0bc73a69fb in QMetaObject::activate<void, int> (sender=0x55f6d1e56310, mo=0x7f0bc7f796e0 <QStackedWidget::staticMetaObject>, local_signal_index=1, ret=0x0, args=@0x7ffecd7506f4: 0)
        at qtbase/src/corelib/kernel/qobjectdefs.h:320
    #43 0x00007f0bc77b6c5d in QStackedWidget::widgetRemoved (this=0x55f6d1e56310, _t1=0) at qtbase/src/widgets/Widgets_autogen/include/moc_qstackedwidget.cpp:194
    #44 0x00007f0bc77b7dda in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QStackedWidget::*)(int)>::call(void (QStackedWidget::*)(int), QStackedWidget*, void**)::{lambda()#1}::operator()() const (this=0x7ffecd750780) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:128
    #45 0x00007f0bc77b7ced in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QStackedWidget::*)(int)>::call(void (QStackedWidget::*)(int), QStackedWidget*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QStackedWidget::*)(int)>::call(void (QStackedWidget::*)(int), QStackedWidget*, void**)::{lambda()#1}&&) (args=0x7ffecd750b70, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:66
    #46 0x00007f0bc77b7c07 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QStackedWidget::*)(int)>::call
        (f=(void (QStackedWidget::*)(class QStackedWidget * const, int)) 0x7f0bc77b6c20 <QStackedWidget::widgetRemoved(int)>, o=0x55f6d1e56310, arg=0x7ffecd750b70) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #47 0x00007f0bc77b7b71 in QtPrivate::FunctionPointer<void (QStackedWidget::*)(int)>::call<QtPrivate::List<int>, void>
        (f=(void (QStackedWidget::*)(class QStackedWidget * const, int)) 0x7f0bc77b6c20 <QStackedWidget::widgetRemoved(int)>, o=0x55f6d1e56310, arg=0x7ffecd750b70) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:175
    #48 0x00007f0bc77b7a9b in QtPrivate::QCallableObject<void (QStackedWidget::*)(int), QtPrivate::List<int>, void>::impl (which=1, this_=0x55f6d18a6a70, r=0x55f6d1e56310, a=0x7ffecd750b70, ret=0x0)
        at qtbase/src/corelib/kernel/qobjectdefs_impl.h:546
    #49 0x00007f0bc92e95f2 in QtPrivate::QSlotObjectBase::call (this=0x55f6d18a6a70, r=0x55f6d1e56310, a=0x7ffecd750b70) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:462
    #50 0x00007f0bc951c112 in doActivate<false> (sender=0x55f6d1d94df0, signal_index=3, argv=0x7ffecd750b70) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4372
    #51 0x00007f0bc95124b3 in QMetaObject::activate (sender=0x55f6d1d94df0, m=0x7f0bc7f64618 <QStackedLayout::staticMetaObject>, local_signal_index=0, argv=0x7ffecd750b70)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4432
    #52 0x00007f0bc73a69fb in QMetaObject::activate<void, int> (sender=0x55f6d1d94df0, mo=0x7f0bc7f64618 <QStackedLayout::staticMetaObject>, local_signal_index=0, ret=0x0, args=@0x7ffecd750bb4: 0)
        at qtbase/src/corelib/kernel/qobjectdefs.h:320
    #53 0x00007f0bc7445098 in QStackedLayout::widgetRemoved (this=0x55f6d1d94df0, _t1=0) at qtbase/src/widgets/Widgets_autogen/include/moc_qstackedlayout.cpp:185
    #54 0x00007f0bc7444faf in QStackedLayout::takeAt (this=0x55f6d1d94df0, index=0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qstackedlayout.cpp:261
    #55 0x00007f0bc743414c in QLayout::removeWidget (this=0x55f6d1d94df0, widget=0x55f6cfb71cb0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qlayout.cpp:1479
    #56 0x00007f0bc77b6e8d in QStackedWidget::removeWidget (this=0x55f6d1e56310, widget=0x55f6cfb71cb0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qstackedwidget.cpp:177
    #57 0x00007f0bc77fda72 in QTabWidget::removeTab (this=0x55f6d1e562e0, index=0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qtabwidget.cpp:632
    #58 0x00007f0bca4f4a63 in QtInstanceNotebook::remove_page(rtl::OUString const&)::$_0::operator()() const (this=0x7ffecd750e60) at vcl/qt6/../qt5/QtInstanceNotebook.cxx:104
    #59 0x00007f0bca4f4a25 in std::__invoke_impl<void, QtInstanceNotebook::remove_page(rtl::OUString const&)::$_0&>(std::__invoke_other, QtInstanceNotebook::remove_page(rtl::OUString const&)::$_0&) (__f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:63
    #60 0x00007f0bca4f49d5 in std::__invoke_r<void, QtInstanceNotebook::remove_page(rtl::OUString const&)::$_0&>(QtInstanceNotebook::remove_page(rtl::OUString const&)::$_0&) (__fn=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:113
    #61 0x00007f0bca4f48ed in std::_Function_handler<void(), QtInstanceNotebook::remove_page(rtl::OUString const&)::$_0>::_M_invoke (__functor=...) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:292
    #62 0x00007f0bca44a4de in std::function<void()>::operator() (this=0x7ffecd750e60) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:593
    #63 0x00007f0bca44102f in QtInstance::RunInMainThread (this=0x55f6ce948eb0, func=...) at vcl/qt6/../qt5/QtInstance.cxx:209
    #64 0x00007f0bca4f24fa in QtInstanceNotebook::remove_page (this=0x55f6d18ae9e0, rIdent="generated") at vcl/qt6/../qt5/QtInstanceNotebook.cxx:104
    #65 0x00007f0bd8bc99ad in SfxTabDialogController::RemoveTabPage (this=0x55f6d18af070, rId="generated") at /home/michi/development/git/libreoffice/sfx2/source/dialog/tabdlg.cxx:827
    #66 0x00007f0b8f42863d in dbaui::AdvancedSettingsDialog::AdvancedSettingsDialog
        (this=0x55f6d18af070, pParent=0x55f6d158ae20, _pItems=0x55f6d15af940, _rxContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x55f6ce92c458, _aDataSourceName=uno::Any("string": "file:///home/michi/Documents/New%20Database90.odb")) at /home/michi/development/git/libreoffice/dbaccess/source/ui/dlg/advancedsettings.cxx:381
    #67 0x00007f0b8f6da456 in std::make_unique<dbaui::AdvancedSettingsDialog, weld::Window*, SfxItemSet*, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>&, com::sun::star::uno::Any&>
        (__args=@0x7ffecd751248: 0x55f6d158ae20, __args=@0x7ffecd751240: 0x55f6d15af940, __args=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x55f6ce92c458, __args=uno::Any("string": "file:///home/michi/Documents/New%20Database90.odb")) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/unique_ptr.h:1084
    #68 0x00007f0b8f6d9e1f in dbaui::(anonymous namespace)::OAdvancedSettingsDialog::createDialog (this=0x55f6d15971d0, rParent=uno::Reference to (VCLXTopWindow *) 0x55f6d01bc780)
        at /home/michi/development/git/libreoffice/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx:103
    #69 0x00007f0bd586da5e in svt::OGenericUnoDialog::impl_ensureDialog_lck (this=0x55f6d15971d0) at /home/michi/development/git/libreoffice/svtools/source/uno/genericunodialog.cxx:169
    #70 0x00007f0bd586dcec in svt::OGenericUnoDialog::execute (this=0x55f6d15971d0) at /home/michi/development/git/libreoffice/svtools/source/uno/genericunodialog.cxx:200
    #71 0x00007f0b8f23e1a9 in dbaui::OApplicationController::openDialog (this=0x55f6d01db510, _sServiceName="com.sun.star.sdb.AdvancedDatabaseSettingsDialog")
        at /home/michi/development/git/libreoffice/dbaccess/source/ui/app/AppControllerGen.cxx:205
    #72 0x00007f0b8f1ea90a in dbaui::OApplicationController::Execute (this=0x55f6d01db510, _nId=12256, aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/dbaccess/source/ui/app/AppController.cxx:1294
    #73 0x00007f0b8f3363a3 in dbaui::OGenericUnoController::executeChecked (this=0x55f6d01db510, _rCommand=..., aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/dbaccess/source/ui/browser/genericcontroller.cxx:974
    #74 0x00007f0b8f3331da in dbaui::OGenericUnoController::dispatch (this=0x55f6d01db510, _aURL=..., aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/dbaccess/source/ui/browser/genericcontroller.cxx:586
    #75 0x00007f0bd9d06c74 in framework::(anonymous namespace)::AsyncMenuExecute (data=0x55f6d1e5cae0) at /home/michi/development/git/libreoffice/framework/source/uielement/menubarmanager.cxx:793
    #76 0x00007f0bd2d7b301 in Link<void*, void>::Call (this=0x55f6d1e5bba8, data=0x55f6d1e5cae0) at include/tools/link.hxx:105
    #77 0x00007f0bd2d76c21 in ImplHandleUserEvent (pSVEvent=0x55f6d1e5bba0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2314
    #78 0x00007f0bd2d73b4f in ImplWindowFrameProc (_pWindow=0x55f6cfb62b50, nEvent=SalEvent::UserEvent, pEvent=0x55f6d1e5bba0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2871
    #79 0x00007f0bca42228c in SalFrame::CallCallback (this=0x55f6cfc41890, nEvent=SalEvent::UserEvent, pEvent=0x55f6d1e5bba0) at vcl/inc/salframe.hxx:310
    #80 0x00007f0bca4441cf in QtInstance::ProcessEvent (this=0x55f6ce948eb0, aEvent=...) at vcl/qt6/../qt5/QtInstance.cxx:614
    #81 0x00007f0bd3350b9d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffecd752cd0) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #82 0x00007f0bd3350a6b in SalUserEventList::DispatchUserEvents (this=0x55f6ce948f18, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #83 0x00007f0bca4407d1 in QtInstance::ImplYield (this=0x55f6ce948eb0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:510
    #84 0x00007f0bca443d91 in QtInstance::DoYield (this=0x55f6ce948eb0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:532
    #85 0x00007f0bd3419006 in InnerYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:390
    #86 0x00007f0bd341888f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:503
    #87 0x00007f0bd3418670 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:365
    #88 0x00007f0bdcb22c05 in desktop::Desktop::Main (this=0x7ffecd754880) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1680
    #89 0x00007f0bd3441d56 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:231
    #90 0x00007f0bd3443889 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:249
    #91 0x00007f0bdcb9cc6a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #92 0x000055f6b5a4b9fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #93 0x000055f6b5a4b9d7 in main (argc=2, argv=0x7ffecd754a88) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: I3dc605a965589abf4dbcdf289460aa31507df30a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201362
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf-gerrit pushed a commit that referenced this pull request Mar 12, 2026
Don't first create a Bitmap, write that to a stream
and then load the QPixmap from that stream, but
directly get the stream and load the QPixmap from it.

This should not only be more efficient, but not
trying to create the intermediate Bitmap object also avoids
triggering an infinite recursion when done (too)
early on startup, which was seen when using
loadQPixmapIcon in QtFrame::SetIcon.

(getPixbuf in the gtk vcl plugin implementation
in vcl/unx/gtk3/gtkinst.cxx also does similarly.)

Sample local change to trigger the infinite recursion
previously:

    diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
    index 6d0c0ac..b646fd7694dd 100644
    --- a/vcl/qt5/QtFrame.cxx
    +++ b/vcl/qt5/QtFrame.cxx
    @@ -344,6 +344,8 @@ void QtFrame::SetIcon(sal_uInt16 nIcon)
             || !isWindow())
             return;

    +    loadQPixmapIcon(u"res/writer128.png"_ustr);
    +
         const QString sAppIcon = toQString(IconHelper::GetAppIconName(nIcon));
         QIcon aIcon = QIcon::fromTheme(sAppIcon);
         m_pQWidget->window()->setWindowIcon(aIcon);

Then, starting e.g. Writer would previosuly trigger an
infinite recursion. Partial backtrace:

    Thread 1 received signal SIGSEGV, Segmentation fault.
    0x00007f1c8790834f in QObject::event (this=0x5593589a5a80, e=0x7ffe98d56258) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1452
    1452        switch (e->type()) {
    (rr) bt 100
    #0  0x00007f1c8790834f in QObject::event (this=0x5593589a5a80, e=0x7ffe98d56258) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1452
    #1  0x00007f1c85872cbd in QWidget::event (this=0x5593589a5a80, event=0x7ffe98d56258) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:9467
    #2  0x00007f1c85af8b85 in QMainWindow::event (this=0x5593589a5a80, event=0x7ffe98d56258) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmainwindow.cpp:1272
    #3  0x00007f1c857b1a20 in QApplicationPrivate::notify_helper (this=0x559356428970, receiver=0x5593589a5a80, e=0x7ffe98d56258) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3276
    #4  0x00007f1c857b58fb in QApplication::notify (this=0x5593563ce910, receiver=0x5593589a5a80, e=0x7ffe98d56258) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3222
    #5  0x00007f1c87838739 in QCoreApplication::notifyInternal2 (receiver=0x5593589a5a80, event=0x7ffe98d56258) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1113
    #6  0x00007f1c878393a9 in QCoreApplication::sendEvent (receiver=0x5593589a5a80, event=0x7ffe98d56258) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1553
    #7  0x00007f1c85854857 in QWidget::setParent (this=0x5593589a5cb0, parent=0x5593589a5a80, f=...) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:10901
    #8  0x00007f1c858746e9 in QWidget::setParent (this=0x5593589a5cb0, parent=0x5593589a5a80) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:10742
    #9  0x00007f1c8583080f in QLayout::addChildWidget (this=0x5593589a75a0, w=0x5593589a5cb0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qlayout.cpp:856
    #10 0x00007f1c85b0a1b0 in QMainWindowLayout::setCentralWidget (this=0x5593589a75a0, widget=0x5593589a5cb0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmainwindowlayout.cpp:2860
    #11 0x00007f1c85af7299 in QMainWindow::setCentralWidget (this=0x5593589a5a80, widget=0x5593589a5cb0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmainwindow.cpp:555
    #12 0x00007f1c8880d74b in QtFrame::QtFrame (this=0x5593589a6e80, pParent=0x0, nStyle=SalFrameStyleFlags::NOICON, bUseCairo=true) at vcl/qt6/../qt5/QtFrame.cxx:143
    #13 0x00007f1c8884480d in QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0::operator()() const (this=0x5593589a6e60) at vcl/qt6/../qt5/QtInstance.cxx:396
    #14 0x00007f1c88844785 in std::__invoke_impl<void, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&>(std::__invoke_other, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&) (__f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:63
    #15 0x00007f1c88844745 in std::__invoke_r<void, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&>(QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&) (__fn=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:113
    #16 0x00007f1c8884462d in std::_Function_handler<void(), QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0>::_M_invoke (__functor=...) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:292
    #17 0x00007f1c8884674e in std::function<void()>::operator() (this=0x7ffe98d567e8) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:593
    #18 0x00007f1c8883d46f in QtInstance::RunInMainThread (this=0x559356428580, func=...) at vcl/qt6/../qt5/QtInstance.cxx:210
    #19 0x00007f1c8883f91b in QtInstance::CreateFrame (this=0x559356428580, pParent=0x0, nStyle=SalFrameStyleFlags::NOICON) at vcl/qt6/../qt5/QtInstance.cxx:395
    #20 0x00007f1c911468d6 in vcl::Window::ImplInit (this=0x5593589a6620, pParent=0x0, nStyle=274877906944, pSystemParentData=0x0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:1059
    #21 0x00007f1c90ee2de7 in ImplBorderWindow::ImplInit (this=0x5593589a6620, pParent=0x0, nStyle=274877906944, nTypeStyle=BorderWindowStyle::Frame, pSystemParentData=0x0)
        at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1568
    #22 0x00007f1c90ee3368 in ImplBorderWindow::ImplBorderWindow (this=0x5593589a6620, pParent=0x0, pSystemParentData=0x0, nStyle=274877906944, nTypeStyle=BorderWindowStyle::Frame)
        at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1597
    #23 0x00007f1c9117cb19 in VclPtrInstance<ImplBorderWindow>::VclPtrInstance<vcl::Window*&, SystemParentData*&, long&, BorderWindowStyle&>
        (this=0x7ffe98d56da0, arg=@0x7ffe98d56dc0: 0x0, arg=@0x7ffe98d56db0: 0x0, arg=@0x7ffe98d56db8: 274877906944, arg=@0x7ffe98d56dac: BorderWindowStyle::Frame) at include/vcl/vclptr.hxx:274
    #24 0x00007f1c9117b405 in WorkWindow::ImplInit (this=0x5593589a5d30, pParent=0x0, nStyle=274877906944, pSystemParentData=0x0) at /home/michi/development/git/libreoffice/vcl/source/window/wrkwin.cxx:51
    #25 0x00007f1c9117bc67 in WorkWindow::WorkWindow (this=0x5593589a5d30, pParent=0x0, nStyle=274877906944) at /home/michi/development/git/libreoffice/vcl/source/window/wrkwin.cxx:95
    #26 0x00007f1c9182e653 in VclPtr<WorkWindow>::Create<decltype(nullptr), long const&>(decltype(nullptr)&&, long const&) (arg=<error reading variable: Attempt to dereference a generic pointer.>, arg=@0x7f1c90505ea8: 274877906944)
        at include/vcl/vclptr.hxx:153
    #27 0x00007f1c9182b1bd in ImplGetDefaultContextWindow () at /home/michi/development/git/libreoffice/vcl/source/app/svdata.cxx:283
    #28 0x00007f1c9182af8a in ImplGetDefaultWindow () at /home/michi/development/git/libreoffice/vcl/source/app/svdata.cxx:264
    #29 0x00007f1c9181c62d in Application::GetDefaultDevice () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:1111
    #30 0x00007f1c916fc79d in ImageRequestParameters::scalePercentage (this=0x7ffe98d57970) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:79
    #31 0x00007f1c916ffc08 in (anonymous namespace)::createVariant (rParameters=...) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:382
    #32 0x00007f1c916ff343 in ImplImageTree::doLoadImage (this=0x559357ba6d30, rParameters=...) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:428
    #33 0x00007f1c916ff0d4 in ImplImageTree::loadImage (this=0x559357ba6d30, rName="res/writer128.png", rStyle="breeze", rBitmap=..., localized=true, eFlags=ImageLoadFlags::NONE, nScalePercentage=-1)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:365
    #34 0x00007f1c916faa21 in ImageTree::loadImage (this=0x7f1c929bc3f0 <ImageTree::get()::s_ImageTree>, rName="res/writer128.png", rStyle="breeze", rBitmap=..., bLocalized=true, nScalePercentage=-1, eFlags=ImageLoadFlags::NONE)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImageTree.cxx:47
    #35 0x00007f1c916faaac in ImageTree::loadImage (this=0x7f1c929bc3f0 <ImageTree::get()::s_ImageTree>, rName="res/writer128.png", rStyle="breeze", rBitmap=..., bLocalized=true, eFlags=ImageLoadFlags::NONE)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImageTree.cxx:54
    #36 0x00007f1c91671656 in Bitmap::loadFromIconTheme (this=0x7ffe98d57ed0, rIconName="res/writer128.png") at /home/michi/development/git/libreoffice/vcl/source/bitmap/bitmap.cxx:228
    #37 0x00007f1c91671543 in Bitmap::Bitmap (this=0x7ffe98d57ed0, rIconName="res/writer128.png") at /home/michi/development/git/libreoffice/vcl/source/bitmap/bitmap.cxx:217
    #38 0x00007f1c887bf2a2 in loadQPixmapIcon (rIconName="res/writer128.png") at include/vcl/qt/QtUtils.hxx:80
    #39 0x00007f1c8880e04d in QtFrame::SetIcon (this=0x5593589a4420, nIcon=1) at vcl/qt6/../qt5/QtFrame.cxx:347
    #40 0x00007f1c8880d88c in QtFrame::QtFrame (this=0x5593589a4420, pParent=0x0, nStyle=SalFrameStyleFlags::NOICON, bUseCairo=true) at vcl/qt6/../qt5/QtFrame.cxx:156
    #41 0x00007f1c8884480d in QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0::operator()() const (this=0x5593589a4400) at vcl/qt6/../qt5/QtInstance.cxx:396
    #42 0x00007f1c88844785 in std::__invoke_impl<void, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&>(std::__invoke_other, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&) (__f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:63
    #43 0x00007f1c88844745 in std::__invoke_r<void, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&>(QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&) (__fn=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:113
    #44 0x00007f1c8884462d in std::_Function_handler<void(), QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0>::_M_invoke (__functor=...) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:292
    #45 0x00007f1c8884674e in std::function<void()>::operator() (this=0x7ffe98d583a8) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:593
    #46 0x00007f1c8883d46f in QtInstance::RunInMainThread (this=0x559356428580, func=...) at vcl/qt6/../qt5/QtInstance.cxx:210
    #47 0x00007f1c8883f91b in QtInstance::CreateFrame (this=0x559356428580, pParent=0x0, nStyle=SalFrameStyleFlags::NOICON) at vcl/qt6/../qt5/QtInstance.cxx:395
    #48 0x00007f1c911468d6 in vcl::Window::ImplInit (this=0x5593589a3bc0, pParent=0x0, nStyle=274877906944, pSystemParentData=0x0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:1059
    #49 0x00007f1c90ee2de7 in ImplBorderWindow::ImplInit (this=0x5593589a3bc0, pParent=0x0, nStyle=274877906944, nTypeStyle=BorderWindowStyle::Frame, pSystemParentData=0x0)
        at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1568
    #50 0x00007f1c90ee3368 in ImplBorderWindow::ImplBorderWindow (this=0x5593589a3bc0, pParent=0x0, pSystemParentData=0x0, nStyle=274877906944, nTypeStyle=BorderWindowStyle::Frame)
        at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1597
    #51 0x00007f1c9117cb19 in VclPtrInstance<ImplBorderWindow>::VclPtrInstance<vcl::Window*&, SystemParentData*&, long&, BorderWindowStyle&>
        (this=0x7ffe98d58960, arg=@0x7ffe98d58980: 0x0, arg=@0x7ffe98d58970: 0x0, arg=@0x7ffe98d58978: 274877906944, arg=@0x7ffe98d5896c: BorderWindowStyle::Frame) at include/vcl/vclptr.hxx:274
    #52 0x00007f1c9117b405 in WorkWindow::ImplInit (this=0x5593589a32d0, pParent=0x0, nStyle=274877906944, pSystemParentData=0x0) at /home/michi/development/git/libreoffice/vcl/source/window/wrkwin.cxx:51
    #53 0x00007f1c9117bc67 in WorkWindow::WorkWindow (this=0x5593589a32d0, pParent=0x0, nStyle=274877906944) at /home/michi/development/git/libreoffice/vcl/source/window/wrkwin.cxx:95
    #54 0x00007f1c9182e653 in VclPtr<WorkWindow>::Create<decltype(nullptr), long const&>(decltype(nullptr)&&, long const&) (arg=<error reading variable: Attempt to dereference a generic pointer.>, arg=@0x7f1c90505ea8: 274877906944)
        at include/vcl/vclptr.hxx:153
    #55 0x00007f1c9182b1bd in ImplGetDefaultContextWindow () at /home/michi/development/git/libreoffice/vcl/source/app/svdata.cxx:283
    #56 0x00007f1c9182af8a in ImplGetDefaultWindow () at /home/michi/development/git/libreoffice/vcl/source/app/svdata.cxx:264
    #57 0x00007f1c9181c62d in Application::GetDefaultDevice () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:1111
    #58 0x00007f1c916fc79d in ImageRequestParameters::scalePercentage (this=0x7ffe98d59530) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:79
    #59 0x00007f1c916ffc08 in (anonymous namespace)::createVariant (rParameters=...) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:382
    #60 0x00007f1c916ff343 in ImplImageTree::doLoadImage (this=0x559357ba6d30, rParameters=...) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:428
    #61 0x00007f1c916ff0d4 in ImplImageTree::loadImage (this=0x559357ba6d30, rName="res/writer128.png", rStyle="breeze", rBitmap=..., localized=true, eFlags=ImageLoadFlags::NONE, nScalePercentage=-1)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:365
    #62 0x00007f1c916faa21 in ImageTree::loadImage (this=0x7f1c929bc3f0 <ImageTree::get()::s_ImageTree>, rName="res/writer128.png", rStyle="breeze", rBitmap=..., bLocalized=true, nScalePercentage=-1, eFlags=ImageLoadFlags::NONE)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImageTree.cxx:47
    #63 0x00007f1c916faaac in ImageTree::loadImage (this=0x7f1c929bc3f0 <ImageTree::get()::s_ImageTree>, rName="res/writer128.png", rStyle="breeze", rBitmap=..., bLocalized=true, eFlags=ImageLoadFlags::NONE)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImageTree.cxx:54
    #64 0x00007f1c91671656 in Bitmap::loadFromIconTheme (this=0x7ffe98d59a90, rIconName="res/writer128.png") at /home/michi/development/git/libreoffice/vcl/source/bitmap/bitmap.cxx:228
    #65 0x00007f1c91671543 in Bitmap::Bitmap (this=0x7ffe98d59a90, rIconName="res/writer128.png") at /home/michi/development/git/libreoffice/vcl/source/bitmap/bitmap.cxx:217
    #66 0x00007f1c887bf2a2 in loadQPixmapIcon (rIconName="res/writer128.png") at include/vcl/qt/QtUtils.hxx:80
    #67 0x00007f1c8880e04d in QtFrame::SetIcon (this=0x5593589a19c0, nIcon=1) at vcl/qt6/../qt5/QtFrame.cxx:347
    #68 0x00007f1c8880d88c in QtFrame::QtFrame (this=0x5593589a19c0, pParent=0x0, nStyle=SalFrameStyleFlags::NOICON, bUseCairo=true) at vcl/qt6/../qt5/QtFrame.cxx:156
    #69 0x00007f1c8884480d in QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0::operator()() const (this=0x5593589a19a0) at vcl/qt6/../qt5/QtInstance.cxx:396
    #70 0x00007f1c88844785 in std::__invoke_impl<void, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&>(std::__invoke_other, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&) (__f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:63
    #71 0x00007f1c88844745 in std::__invoke_r<void, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&>(QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&) (__fn=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:113
    #72 0x00007f1c8884462d in std::_Function_handler<void(), QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0>::_M_invoke (__functor=...) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:292
    #73 0x00007f1c8884674e in std::function<void()>::operator() (this=0x7ffe98d59f68) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:593
    #74 0x00007f1c8883d46f in QtInstance::RunInMainThread (this=0x559356428580, func=...) at vcl/qt6/../qt5/QtInstance.cxx:210
    #75 0x00007f1c8883f91b in QtInstance::CreateFrame (this=0x559356428580, pParent=0x0, nStyle=SalFrameStyleFlags::NOICON) at vcl/qt6/../qt5/QtInstance.cxx:395
    #76 0x00007f1c911468d6 in vcl::Window::ImplInit (this=0x5593589a1160, pParent=0x0, nStyle=274877906944, pSystemParentData=0x0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:1059
    #77 0x00007f1c90ee2de7 in ImplBorderWindow::ImplInit (this=0x5593589a1160, pParent=0x0, nStyle=274877906944, nTypeStyle=BorderWindowStyle::Frame, pSystemParentData=0x0)
        at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1568
    #78 0x00007f1c90ee3368 in ImplBorderWindow::ImplBorderWindow (this=0x5593589a1160, pParent=0x0, pSystemParentData=0x0, nStyle=274877906944, nTypeStyle=BorderWindowStyle::Frame)
        at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1597
    #79 0x00007f1c9117cb19 in VclPtrInstance<ImplBorderWindow>::VclPtrInstance<vcl::Window*&, SystemParentData*&, long&, BorderWindowStyle&>
        (this=0x7ffe98d5a520, arg=@0x7ffe98d5a540: 0x0, arg=@0x7ffe98d5a530: 0x0, arg=@0x7ffe98d5a538: 274877906944, arg=@0x7ffe98d5a52c: BorderWindowStyle::Frame) at include/vcl/vclptr.hxx:274
    #80 0x00007f1c9117b405 in WorkWindow::ImplInit (this=0x5593589a0870, pParent=0x0, nStyle=274877906944, pSystemParentData=0x0) at /home/michi/development/git/libreoffice/vcl/source/window/wrkwin.cxx:51
    #81 0x00007f1c9117bc67 in WorkWindow::WorkWindow (this=0x5593589a0870, pParent=0x0, nStyle=274877906944) at /home/michi/development/git/libreoffice/vcl/source/window/wrkwin.cxx:95
    #82 0x00007f1c9182e653 in VclPtr<WorkWindow>::Create<decltype(nullptr), long const&>(decltype(nullptr)&&, long const&) (arg=<error reading variable: Attempt to dereference a generic pointer.>, arg=@0x7f1c90505ea8: 274877906944)
        at include/vcl/vclptr.hxx:153
    #83 0x00007f1c9182b1bd in ImplGetDefaultContextWindow () at /home/michi/development/git/libreoffice/vcl/source/app/svdata.cxx:283
    #84 0x00007f1c9182af8a in ImplGetDefaultWindow () at /home/michi/development/git/libreoffice/vcl/source/app/svdata.cxx:264
    #85 0x00007f1c9181c62d in Application::GetDefaultDevice () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:1111
    #86 0x00007f1c916fc79d in ImageRequestParameters::scalePercentage (this=0x7ffe98d5b0f0) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:79
    #87 0x00007f1c916ffc08 in (anonymous namespace)::createVariant (rParameters=...) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:382
    #88 0x00007f1c916ff343 in ImplImageTree::doLoadImage (this=0x559357ba6d30, rParameters=...) at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:428
    #89 0x00007f1c916ff0d4 in ImplImageTree::loadImage (this=0x559357ba6d30, rName="res/writer128.png", rStyle="breeze", rBitmap=..., localized=true, eFlags=ImageLoadFlags::NONE, nScalePercentage=-1)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImplImageTree.cxx:365
    #90 0x00007f1c916faa21 in ImageTree::loadImage (this=0x7f1c929bc3f0 <ImageTree::get()::s_ImageTree>, rName="res/writer128.png", rStyle="breeze", rBitmap=..., bLocalized=true, nScalePercentage=-1, eFlags=ImageLoadFlags::NONE)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImageTree.cxx:47
    #91 0x00007f1c916faaac in ImageTree::loadImage (this=0x7f1c929bc3f0 <ImageTree::get()::s_ImageTree>, rName="res/writer128.png", rStyle="breeze", rBitmap=..., bLocalized=true, eFlags=ImageLoadFlags::NONE)
        at /home/michi/development/git/libreoffice/vcl/source/image/ImageTree.cxx:54
    #92 0x00007f1c91671656 in Bitmap::loadFromIconTheme (this=0x7ffe98d5b650, rIconName="res/writer128.png") at /home/michi/development/git/libreoffice/vcl/source/bitmap/bitmap.cxx:228
    #93 0x00007f1c91671543 in Bitmap::Bitmap (this=0x7ffe98d5b650, rIconName="res/writer128.png") at /home/michi/development/git/libreoffice/vcl/source/bitmap/bitmap.cxx:217
    #94 0x00007f1c887bf2a2 in loadQPixmapIcon (rIconName="res/writer128.png") at include/vcl/qt/QtUtils.hxx:80
    #95 0x00007f1c8880e04d in QtFrame::SetIcon (this=0x55935899ef60, nIcon=1) at vcl/qt6/../qt5/QtFrame.cxx:347
    #96 0x00007f1c8880d88c in QtFrame::QtFrame (this=0x55935899ef60, pParent=0x0, nStyle=SalFrameStyleFlags::NOICON, bUseCairo=true) at vcl/qt6/../qt5/QtFrame.cxx:156
    #97 0x00007f1c8884480d in QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0::operator()() const (this=0x55935899ef40) at vcl/qt6/../qt5/QtInstance.cxx:396
    #98 0x00007f1c88844785 in std::__invoke_impl<void, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&>(std::__invoke_other, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&) (__f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:63
    #99 0x00007f1c88844745 in std::__invoke_r<void, QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&>(QtInstance::CreateFrame(SalFrame*, SalFrameStyleFlags)::$_0&) (__fn=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:113
    (More stack frames follow...)

Change-Id: I86af1c1d55aa3cbbcc708ccbefbff3556030819d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201486
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
foolfitz pushed a commit to foolfitz/lo-core that referenced this pull request Mar 13, 2026
for soffice --headless --convert-to pdf tdf103059-2.odt

==2656459==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c994604b938 at pc 0x7b2929cd73cd bp 0x7ffc818cc110 sp 0x7ffc818cc108
READ of size 8 at 0x7c994604b938 thread T0
    #0 0x7b2929cd73cc in SwTextFormatter::NewFlyCntPortion(SwTextFormatInfo&, SwTextAttr*) const core-asan/sw/source/core/text/itrform2.cxx:3220
    LibreOffice#1 0x7b2929e02267 in SwTextFormatter::NewExtraPortion(SwTextFormatInfo&) core-asan/sw/source/core/text/txtfld.cxx:285
    LibreOffice#2 0x7b2929cccd9d in SwTextFormatter::NewPortion(SwTextFormatInfo&, std::optional<o3tl::strong_int<int, Tag_TextFrameIndex> >) core-asan/sw/source/core/text/itrform2.cxx:1886
    LibreOffice#3 0x7b2929cbf0a3 in SwTextFormatter::BuildPortions(SwTextFormatInfo&) core-asan/sw/source/core/text/itrform2.cxx:440
    LibreOffice#4 0x7b2929ccec48 in SwTextFormatter::FormatLine(o3tl::strong_int<int, Tag_TextFrameIndex>) core-asan/sw/source/core/text/itrform2.cxx:2102
    LibreOffice#5 0x7b2929c10fac in SwTextFrame::FormatLine(SwTextFormatter&, bool) core-asan/sw/source/core/text/frmform.cxx:1458
    LibreOffice#6 0x7b2929c14223 in SwTextFrame::Format_(SwTextFormatter&, SwTextFormatInfo&, bool) core-asan/sw/source/core/text/frmform.cxx:1822
    LibreOffice#7 0x7b2929e4755c in SwTestFormat::SwTestFormat(SwTextFrame*, SwFrame const*, long) core-asan/sw/source/core/text/txtfrm.cxx:3453
    LibreOffice#8 0x7b2929e47e1d in SwTextFrame::TestFormat(SwFrame const*, long&, bool&) core-asan/sw/source/core/text/txtfrm.cxx:3483
    LibreOffice#9 0x7b29297645a7 in SwContentFrame::WouldFit_(long, SwLayoutFrame*, bool, bool) core-asan/sw/source/core/layout/calcmove.cxx:2192
    LibreOffice#10 0x7b2929756a65 in SwContentFrame::ShouldBwdMoved(SwLayoutFrame*, bool&) core-asan/sw/source/core/layout/calcmove.cxx:199
    LibreOffice#11 0x7b292979f8bd in SwFlowFrame::MoveBwd(bool&) core-asan/sw/source/core/layout/flowfrm.cxx:2669
    LibreOffice#12 0x7b2929761592 in SwContentFrame::MakeAll(OutputDevice*) core-asan/sw/source/core/layout/calcmove.cxx:1654
    LibreOffice#13 0x7b29297578e2 in SwFrame::PrepareMake(OutputDevice*) core-asan/sw/source/core/layout/calcmove.cxx:396
    LibreOffice#14 0x7b2929a082af in SwFrame::Calc(OutputDevice*) const core-asan/sw/source/core/layout/trvlfrm.cxx:1858
    LibreOffice#15 0x7b29298c2bd0 in lcl_FormatContentOfLayoutFrame core-asan/sw/source/core/layout/objectformattertxtfrm.cxx:688
    LibreOffice#16 0x7b29298c2b26 in lcl_FormatContentOfLayoutFrame core-asan/sw/source/core/layout/objectformattertxtfrm.cxx:684
    LibreOffice#17 0x7b29298c2b26 in lcl_FormatContentOfLayoutFrame core-asan/sw/source/core/layout/objectformattertxtfrm.cxx:684
    LibreOffice#18 0x7b29298c33a4 in SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs(SwTextFrame&) core-asan/sw/source/core/layout/objectformattertxtfrm.cxx:774
    LibreOffice#19 0x7b29297c06dd in SwFlyAtContentFrame::MakeAll(OutputDevice*) core-asan/sw/source/core/layout/flycnt.cxx:440
    LibreOffice#20 0x7b29297578e2 in SwFrame::PrepareMake(OutputDevice*) core-asan/sw/source/core/layout/calcmove.cxx:396
    LibreOffice#21 0x7b2929a082af in SwFrame::Calc(OutputDevice*) const core-asan/sw/source/core/layout/trvlfrm.cxx:1858
    LibreOffice#22 0x7b29297bc028 in SwFlyFrame::Calc(OutputDevice*) const core-asan/sw/source/core/layout/fly.cxx:3436
    LibreOffice#23 0x7b292984693b in SwLayAction::FormatLayoutFly(SwFlyFrame*) core-asan/sw/source/core/layout/layact.cxx:1553
    LibreOffice#24 0x7b29298ba5f3 in SwObjectFormatter::FormatObj_(SwAnchoredObject&) core-asan/sw/source/core/layout/objectformatter.cxx:287
    LibreOffice#25 0x7b29298c05fb in SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool) core-asan/sw/source/core/layout/objectformattertxtfrm.cxx:132
    LibreOffice#26 0x7b29298ba207 in SwObjectFormatter::FormatObj(SwAnchoredObject&, SwFrame*, SwPageFrame const*, SwLayAction*) core-asan/sw/source/core/layout/objectformatter.cxx:191
    LibreOffice#27 0x7b29297b0cc5 in CalcContent(SwLayoutFrame*, bool) core-asan/sw/source/core/layout/fly.cxx:1852
    LibreOffice#28 0x7b2929a2c3f0 in SwLayoutFrame::FormatWidthCols(SwBorderAttrs const&, long, long) core-asan/sw/source/core/layout/wsfrm.cxx:4024
    LibreOffice#29 0x7b292998a2b2 in SwSectionFrame::Format(OutputDevice*, SwBorderAttrs const*) core-asan/sw/source/core/layout/sectfrm.cxx:1563
    LibreOffice#30 0x7b292975d1b7 in SwLayoutFrame::MakeAll(OutputDevice*) core-asan/sw/source/core/layout/calcmove.cxx:1073
    LibreOffice#31 0x7b292998618a in SwSectionFrame::MakeAll(OutputDevice*) core-asan/sw/source/core/layout/sectfrm.cxx:932
    LibreOffice#32 0x7b29297578e2 in SwFrame::PrepareMake(OutputDevice*) core-asan/sw/source/core/layout/calcmove.cxx:396
    LibreOffice#33 0x7b2929a082af in SwFrame::Calc(OutputDevice*) const core-asan/sw/source/core/layout/trvlfrm.cxx:1858
    LibreOffice#34 0x7b2929844913 in SwLayAction::FormatLayout(OutputDevice*, SwLayoutFrame*, bool) core-asan/sw/source/core/layout/layact.cxx:1315
    LibreOffice#35 0x7b292984617e in SwLayAction::FormatLayout(OutputDevice*, SwLayoutFrame*, bool) core-asan/sw/source/core/layout/layact.cxx:1511
    LibreOffice#36 0x7b292984617e in SwLayAction::FormatLayout(OutputDevice*, SwLayoutFrame*, bool) core-asan/sw/source/core/layout/layact.cxx:1511
    LibreOffice#37 0x7b292983f951 in SwLayAction::InternalAction(OutputDevice*) core-asan/sw/source/core/layout/layact.cxx:629
    LibreOffice#38 0x7b292983d4b7 in SwLayAction::Action(OutputDevice*) core-asan/sw/source/core/layout/layact.cxx:404
    LibreOffice#39 0x7b292a7e2aad in SwViewShell::CalcLayout() core-asan/sw/source/core/view/viewsh.cxx:1248
    LibreOffice#40 0x7b2929504fd1 in SwEditShell::CalcLayout() core-asan/sw/source/core/edit/edws.cxx:89
    LibreOffice#41 0x7b292b84944f in SwXTextDocument::getRendererCount(com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) core-asan/sw/source/uibase/uno/unotxdoc.cxx:2766
    LibreOffice#42 0x7b2918f8118b in PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (core-asan/instdir/program/../program/libpdffilterlo.so+0x16a18b) (BuildId: 3e1e7d533e1cda134f16230425f07ece7cda2894)
    LibreOffice#43 0x7b2918fb7781 in PDFFilter::implExport(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (core-asan/instdir/program/../program/libpdffilterlo.so+0x1a0781) (BuildId: 3e1e7d533e1cda134f16230425f07ece7cda2894)
    LibreOffice#44 0x7b2918fb8c26 in PDFFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (core-asan/instdir/program/../program/libpdffilterlo.so+0x1a1c26) (BuildId: 3e1e7d533e1cda134f16230425f07ece7cda2894)
    LibreOffice#45 0x7f2966849fa0 in SfxObjectShell::ExportTo(SfxMedium&) (core-asan/instdir/program/libsfxlo.so+0x2649fa0) (BuildId: f20a99320ed1b1e19cb532dd5771162fe9df25d6)
    LibreOffice#46 0x7f296683c239 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) (core-asan/instdir/program/libsfxlo.so+0x263c239) (BuildId: f20a99320ed1b1e19cb532dd5771162fe9df25d6)
    LibreOffice#47 0x7f2966851353 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (core-asan/instdir/program/libsfxlo.so+0x2651353) (BuildId: f20a99320ed1b1e19cb532dd5771162fe9df25d6)
    LibreOffice#48 0x7f296684e6e2 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (core-asan/instdir/program/libsfxlo.so+0x264e6e2) (BuildId: f20a99320ed1b1e19cb532dd5771162fe9df25d6)
    LibreOffice#49 0x7f29667f24ab 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&) (core-asan/instdir/program/libsfxlo.so+0x25f24ab) (BuildId: f20a99320ed1b1e19cb532dd5771162fe9df25d6)
    LibreOffice#50 0x7f29669353f9 in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) (core-asan/instdir/program/libsfxlo.so+0x27353f9) (BuildId: f20a99320ed1b1e19cb532dd5771162fe9df25d6)
    LibreOffice#51 0x7f29669237ad in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (core-asan/instdir/program/libsfxlo.so+0x27237ad) (BuildId: f20a99320ed1b1e19cb532dd5771162fe9df25d6)
    LibreOffice#52 0x7f296e59ea3d in desktop::DispatchWatcher::executeDispatchRequests(std::__debug::vector<desktop::DispatchWatcher::DispatchRequest, std::allocator<desktop::DispatchWatcher::DispatchRequest> > const&, bool, desktop::DispatchRequestFlags*) (core-asan/instdir/program/libsofficeapp.so+0x39ea3d) (BuildId: 0d1c41096bed89bed335fa78947804c0924ce8ea)
    LibreOffice#53 0x7f296e5d9fae in desktop::RequestHandler::ExecuteCmdLineRequests(desktop::ProcessDocumentsRequest&, bool) (core-asan/instdir/program/libsofficeapp.so+0x3d9fae) (BuildId: 0d1c41096bed89bed335fa78947804c0924ce8ea)
    LibreOffice#54 0x7f296e503193 in desktop::Desktop::OpenClients() (core-asan/instdir/program/libsofficeapp.so+0x303193) (BuildId: 0d1c41096bed89bed335fa78947804c0924ce8ea)
    LibreOffice#55 0x7f296e50005c in desktop::Desktop::OpenClients_Impl(void*) (core-asan/instdir/program/libsofficeapp.so+0x30005c) (BuildId: 0d1c41096bed89bed335fa78947804c0924ce8ea)
    #56 0x7f296e4ffc16 in desktop::Desktop::LinkStubOpenClients_Impl(void*, void*) (core-asan/instdir/program/libsofficeapp.so+0x2ffc16) (BuildId: 0d1c41096bed89bed335fa78947804c0924ce8ea)
    #57 0x7f29552e3410 in Link<void*, void>::Call(void*) const (core-asan/instdir/program/libvcllo.so+0x42e3410) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #58 0x7f29552db964 in ImplHandleUserEvent(ImplSVEvent*) (core-asan/instdir/program/libvcllo.so+0x42db964) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #59 0x7f29552e0e3b in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (core-asan/instdir/program/libvcllo.so+0x42e0e3b) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #60 0x7f2956b44430 in SalFrame::CallCallback(SalEvent, void const*) const (core-asan/instdir/program/libvcllo.so+0x5b44430) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #61 0x7f2956b8d114 in SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) (core-asan/instdir/program/libvcllo.so+0x5b8d114) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #62 0x7f2955efea9f in SalUserEventList::DispatchUserEvents(bool)::{lambda()LibreOffice#1}::operator()() const (core-asan/instdir/program/libvcllo.so+0x4efea9f) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #63 0x7f2955eff104 in SalUserEventList::DispatchUserEvents(bool) (core-asan/instdir/program/libvcllo.so+0x4eff104) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #64 0x7f2956b8e540 in SvpSalInstance::ImplYield(bool, bool) (core-asan/instdir/program/libvcllo.so+0x5b8e540) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #65 0x7f2956b8edd2 in SvpSalInstance::DoYield(bool, bool) (core-asan/instdir/program/libvcllo.so+0x5b8edd2) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #66 0x7f2956096112 in ImplYield(bool, bool) (core-asan/instdir/program/libvcllo.so+0x5096112) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #67 0x7f2956097f83 in Application::Yield() (core-asan/instdir/program/libvcllo.so+0x5097f83) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #68 0x7f29560953b0 in Application::Execute() (core-asan/instdir/program/libvcllo.so+0x50953b0) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #69 0x7f296e4fc9e9 in desktop::Desktop::Main() (core-asan/instdir/program/libsofficeapp.so+0x2fc9e9) (BuildId: 0d1c41096bed89bed335fa78947804c0924ce8ea)
    #70 0x7f29560eb3c7 in ImplSVMain() (core-asan/instdir/program/libvcllo.so+0x50eb3c7) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #71 0x7f29560eb590 in SVMain() (core-asan/instdir/program/libvcllo.so+0x50eb590) (BuildId: 3cd155f3c9851c1c62b4d2b1959b9b1e4664c2fb)
    #72 0x7f296e5ee383 in soffice_main (core-asan/instdir/program/libsofficeapp.so+0x3ee383) (BuildId: 0d1c41096bed89bed335fa78947804c0924ce8ea)
    #73 0x000000201cc6 in sal_main (core-asan/instdir/program/soffice.bin+0x201cc6) (BuildId: 1edea05beb4bcc822dadbcc6f2b2a28fa5ad215b)
    #74 0x000000201cac in main (core-asan/instdir/program/soffice.bin+0x201cac) (BuildId: 1edea05beb4bcc822dadbcc6f2b2a28fa5ad215b)
    #75 0x7f296e011574 in __libc_start_call_main (/lib64/libc.so.6+0x3574) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
    #76 0x7f296e011627 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3627) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
    #77 0x000000201b64 in _start (core-asan/instdir/program/soffice.bin+0x201b64) (BuildId: 1edea05beb4bcc822dadbcc6f2b2a28fa5ad215b)

0x7c994604b938 is located 56 bytes inside of 696-byte region [0x7c994604b900,0x7c994604bbb8)
freed by thread T0 here:
    #0 0x7f296eae899b in operator delete(void*, unsigned long) (/lib64/libasan.so.8+0xe899b) (BuildId: 0adabddcb77130fc2ea3840d060eb4e8a9ae0c85)
    LibreOffice#1 0x7b2929df5401 in std::__new_allocator<std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> >::deallocate(std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>*, unsigned long) /usr/include/c++/15/bits/new_allocator.h:172
    LibreOffice#2 0x7b2929df4edb in std::allocator<std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> >::deallocate(std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>*, unsigned long) /usr/include/c++/15/bits/allocator.h:215
    LibreOffice#3 0x7b2929df4edb in std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> > >::deallocate(std::allocator<std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> >&, std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>*, unsigned long) /usr/include/c++/15/bits/alloc_traits.h:649
    LibreOffice#4 0x7b2929df4edb in std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> > >::~__allocated_ptr() /usr/include/c++/15/bits/allocated_ptr.h:74
    LibreOffice#5 0x7b2929df5647 in std::_Sp_counted_ptr_inplace<SwParaPortion, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_destroy() /usr/include/c++/15/bits/shared_ptr_base.h:625
    LibreOffice#6 0x7b29283b09bd in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /usr/include/c++/15/bits/shared_ptr_base.h:346
    LibreOffice#7 0x7b29283b4dd1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/include/c++/15/bits/shared_ptr_base.h:1069
    LibreOffice#8 0x7b2929c05619 in std::__shared_ptr<SwParaPortion, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/include/c++/15/bits/shared_ptr_base.h:1531
    LibreOffice#9 0x7b2929df424e in std::__shared_ptr<SwParaPortion, (__gnu_cxx::_Lock_policy)2>::reset() /usr/include/c++/15/bits/shared_ptr_base.h:1649
    LibreOffice#10 0x7b2929df3f4f in SwTextFrame::ClearPara() core-asan/sw/source/core/text/txtcache.cxx:41
    LibreOffice#11 0x7b2929e2d129 in SwTextFrame::Init() core-asan/sw/source/core/text/txtfrm.cxx:754
    LibreOffice#12 0x7b2929e45d75 in SwTextFrame::Prepare(PrepareHint, void const*, bool) core-asan/sw/source/core/text/txtfrm.cxx:3358
    LibreOffice#13 0x7b29297e0987 in SwFlyInContentFrame::NotifyBackground(SwPageFrame*, SwRect const&, PrepareHint) core-asan/sw/source/core/layout/flyincnt.cxx:230
    LibreOffice#14 0x7b2929805046 in Notify(SwFlyFrame*, SwPageFrame*, SwRect const&, SwRect const*) core-asan/sw/source/core/layout/frmtool.cxx:3301
    LibreOffice#15 0x7b29297f0a5a in SwFlyNotify::ImplDestroy() core-asan/sw/source/core/layout/frmtool.cxx:696
    LibreOffice#16 0x7b29297f1083 in SwFlyNotify::~SwFlyNotify() core-asan/sw/source/core/layout/frmtool.cxx:798
    LibreOffice#17 0x7b29297e11f0 in SwFlyInContentFrame::MakeAll(OutputDevice*) core-asan/sw/source/core/layout/flyincnt.cxx:316
    LibreOffice#18 0x7b29297578e2 in SwFrame::PrepareMake(OutputDevice*) core-asan/sw/source/core/layout/calcmove.cxx:396
    LibreOffice#19 0x7b2929a082af in SwFrame::Calc(OutputDevice*) const core-asan/sw/source/core/layout/trvlfrm.cxx:1858
    LibreOffice#20 0x7b29297bc028 in SwFlyFrame::Calc(OutputDevice*) const core-asan/sw/source/core/layout/fly.cxx:3436
    LibreOffice#21 0x7b29297e09cf in SwFlyInContentFrame::GetRelPos() const core-asan/sw/source/core/layout/flyincnt.cxx:235
    LibreOffice#22 0x7b2929cd7309 in SwTextFormatter::NewFlyCntPortion(SwTextFormatInfo&, SwTextAttr*) const core-asan/sw/source/core/text/itrform2.cxx:3213
    LibreOffice#23 0x7b2929e02267 in SwTextFormatter::NewExtraPortion(SwTextFormatInfo&) core-asan/sw/source/core/text/txtfld.cxx:285
    LibreOffice#24 0x7b2929cccd9d in SwTextFormatter::NewPortion(SwTextFormatInfo&, std::optional<o3tl::strong_int<int, Tag_TextFrameIndex> >) core-asan/sw/source/core/text/itrform2.cxx:1886
    LibreOffice#25 0x7b2929cbf0a3 in SwTextFormatter::BuildPortions(SwTextFormatInfo&) core-asan/sw/source/core/text/itrform2.cxx:440
    LibreOffice#26 0x7b2929ccec48 in SwTextFormatter::FormatLine(o3tl::strong_int<int, Tag_TextFrameIndex>) core-asan/sw/source/core/text/itrform2.cxx:2102
    LibreOffice#27 0x7b2929c10fac in SwTextFrame::FormatLine(SwTextFormatter&, bool) core-asan/sw/source/core/text/frmform.cxx:1458
    LibreOffice#28 0x7b2929c14223 in SwTextFrame::Format_(SwTextFormatter&, SwTextFormatInfo&, bool) core-asan/sw/source/core/text/frmform.cxx:1822
    LibreOffice#29 0x7b2929e4755c in SwTestFormat::SwTestFormat(SwTextFrame*, SwFrame const*, long) core-asan/sw/source/core/text/txtfrm.cxx:3453
    LibreOffice#30 0x7b2929e47e1d in SwTextFrame::TestFormat(SwFrame const*, long&, bool&) core-asan/sw/source/core/text/txtfrm.cxx:3483
    LibreOffice#31 0x7b29297645a7 in SwContentFrame::WouldFit_(long, SwLayoutFrame*, bool, bool) core-asan/sw/source/core/layout/calcmove.cxx:2192

Change-Id: I291348ddbaaf0e9e8255e2fca5842dc2d2bfe733
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196426
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196558
foolfitz pushed a commit to foolfitz/lo-core that referenced this pull request Mar 13, 2026
... and position for each document"

The changes to LoadEnv in

    commit 8ce2cf3
    Date:   Mon May 12 01:29:55 2025 +0700

        tdf#41777 Add window size and position for each document

to create new frames when loading existing documents from
the start center and close the backing window cause
crashes for the tdf#170399 scenario of starting the template manager
from the start center and then editing a template by selecting
the "Edit" entry from its context menu.

Revert the changes to that class for now, to fix the crashes.

In a quick test with the gen VCL plugin, this causes documents
opened from the start center to no longer be restored in the
position that they were in previously, while opening documents
directly (i.e. not from start center) still results in them
getting restored at the previous location. (Tested with two
different documents that were saved and closed in different
locations on the screen and both were restored at their
original location.)

This partially reverts commit 8ce2cf3.

Backtrace for the gen VCL plugin without this commit in place:

    warn:legacy.osl:835647:835647:vcl/source/window/window.cxx:307: Window ( 14VclDrawingArea()) with live SystemWindows destroyed:  18MenuFloatingWindow()
    Window ( 14VclDrawingArea()) with live SystemWindows destroyed:  18MenuFloatingWindow()

    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
    ⚠ warning: 44  ./nptl/pthread_kill.c: No such file or directory
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    LibreOffice#1  0x00007ffff769749f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
    LibreOffice#2  0x00007ffff7640942 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    LibreOffice#3  0x00007ffff76284ac in __GI_abort () at ./stdlib/abort.c:77
    LibreOffice#4  0x00007fffee2339db in SalAbort (rErrorText="Window ( 14VclDrawingArea()) with live SystemWindows destroyed:  18MenuFloatingWindow()", bDumpCore=true) at /home/michi/development/git/libreoffice/vcl/source/app/salplug.cxx:403
    LibreOffice#5  0x00007fffee2ff4b1 in Application::Abort (rErrorText="Window ( 14VclDrawingArea()) with live SystemWindows destroyed:  18MenuFloatingWindow()") at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:300
    LibreOffice#6  0x00007fffedc25c54 in vcl::Window::dispose (this=0x5555573055d0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:308
    LibreOffice#7  0x00007fffedc9e1c6 in Control::dispose (this=0x5555573055d0) at /home/michi/development/git/libreoffice/vcl/source/control/ctrl.cxx:62
    LibreOffice#8  0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x555557305890) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#9  0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7ffffffe72d0) at include/vcl/vclptr.hxx:208
    LibreOffice#10 0x00007ffff0069f57 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x555557168d30) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:250
    LibreOffice#11 0x00007fffedc24eca in vcl::Window::dispose (this=0x555557168d30) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    LibreOffice#12 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x555557168d80) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#13 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7ffffffe8798) at include/vcl/vclptr.hxx:208
    LibreOffice#14 0x00007fffefd1c382 in VCLXWindow::dispose (this=0x5555577d6d80) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxwindow.cxx:905
    LibreOffice#15 0x00007ffff0069ec2 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x5555573c4dd0) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:244
    LibreOffice#16 0x00007fffedc24eca in vcl::Window::dispose (this=0x5555573c4dd0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    LibreOffice#17 0x00007fffedafd800 in VclScrolledWindow::dispose (this=0x5555573c4dd0) at /home/michi/development/git/libreoffice/vcl/source/window/layout.cxx:1926
    LibreOffice#18 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x5555573c4e48) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#19 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7ffffffe9eb8) at include/vcl/vclptr.hxx:208
    LibreOffice#20 0x00007fffefd1c382 in VCLXWindow::dispose (this=0x55555788b020) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxwindow.cxx:905
    LibreOffice#21 0x00007ffff0069ec2 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x555557722300) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:244
    LibreOffice#22 0x00007fffedc24eca in vcl::Window::dispose (this=0x555557722300) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    LibreOffice#23 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x555557722350) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#24 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7ffffffeb5b8) at include/vcl/vclptr.hxx:208
    LibreOffice#25 0x00007fffefd1c382 in VCLXWindow::dispose (this=0x5555577a9df0) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxwindow.cxx:905
    LibreOffice#26 0x00007ffff0069ec2 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x55555772fe50) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:244
    LibreOffice#27 0x00007fffedc24eca in vcl::Window::dispose (this=0x55555772fe50) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    LibreOffice#28 0x00007fffedafb566 in VclFrame::dispose (this=0x55555772fe50) at /home/michi/development/git/libreoffice/vcl/source/window/layout.cxx:1493
    LibreOffice#29 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x55555772fea8) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#30 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7ffffffeccd8) at include/vcl/vclptr.hxx:208
    LibreOffice#31 0x00007fffefd1c382 in VCLXWindow::dispose (this=0x5555577c1ac0) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxwindow.cxx:905
    LibreOffice#32 0x00007ffff0069ec2 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x5555572db4d0) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:244
    LibreOffice#33 0x00007fffedc24eca in vcl::Window::dispose (this=0x5555572db4d0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    LibreOffice#34 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x5555572db520) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#35 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7ffffffee3d8) at include/vcl/vclptr.hxx:208
    LibreOffice#36 0x00007fffefd1c382 in VCLXWindow::dispose (this=0x5555577c5650) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxwindow.cxx:905
    LibreOffice#37 0x00007ffff0069ec2 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x5555576ebfe0) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:244
    LibreOffice#38 0x00007fffedc24eca in vcl::Window::dispose (this=0x5555576ebfe0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    LibreOffice#39 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x5555576ec030) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#40 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7ffffffefad8) at include/vcl/vclptr.hxx:208
    LibreOffice#41 0x00007fffefd1c382 in VCLXWindow::dispose (this=0x5555577c8d10) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxwindow.cxx:905
    LibreOffice#42 0x00007ffff0069ec2 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x555557806110) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:244
    LibreOffice#43 0x00007fffedc24eca in vcl::Window::dispose (this=0x555557806110) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    LibreOffice#44 0x00007fffedbc4b04 in SystemWindow::dispose (this=0x555557806110) at /home/michi/development/git/libreoffice/vcl/source/window/syswin.cxx:119
    LibreOffice#45 0x00007fffeda8e38c in Dialog::dispose (this=0x555557806110) at /home/michi/development/git/libreoffice/vcl/source/window/dialog.cxx:632
    LibreOffice#46 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x5555578061f0) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#47 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7fffffff1338) at include/vcl/vclptr.hxx:208
    LibreOffice#48 0x00007fffefd1c382 in VCLXWindow::dispose (this=0x555557897d70) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxwindow.cxx:905
    LibreOffice#49 0x00007ffff0069ec2 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x5555578924d0) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:244
    LibreOffice#50 0x00007fffedc24eca in vcl::Window::dispose (this=0x5555578924d0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    LibreOffice#51 0x00007fffed9c1dc4 in ImplBorderWindow::dispose (this=0x5555578924d0) at /home/michi/development/git/libreoffice/vcl/source/window/brdwin.cxx:1615
    LibreOffice#52 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x555557892530) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    LibreOffice#53 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7fffffff2b68) at include/vcl/vclptr.hxx:208
    LibreOffice#54 0x00007ffff006a6a7 in UnoWrapper::WindowDestroyed (this=0x5555568aaf90, pWindow=0x555556ef0dc0) at /home/michi/development/git/libreoffice/toolkit/source/helper/unowrapper.cxx:308
    LibreOffice#55 0x00007fffedc24eca in vcl::Window::dispose (this=0x555556ef0dc0) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:217
    #56 0x00007fffedbc4b04 in SystemWindow::dispose (this=0x555556ef0dc0) at /home/michi/development/git/libreoffice/vcl/source/window/syswin.cxx:119
    #57 0x00007fffedc596c1 in WorkWindow::dispose (this=0x555556ef0dc0) at /home/michi/development/git/libreoffice/vcl/source/window/wrkwin.cxx:127
    #58 0x00007fffedea0d53 in VclReferenceBase::disposeOnce (this=0x555556ef0e80) at /home/michi/development/git/libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
    #59 0x00007fffefd29a75 in VclPtr<vcl::Window>::disposeAndClear (this=0x7fffffff40e8) at include/vcl/vclptr.hxx:208
    #60 0x00007fffefd1c382 in VCLXWindow::dispose (this=0x5555570cde30) at /home/michi/development/git/libreoffice/toolkit/source/awt/vclxwindow.cxx:905
    #61 0x00007ffff49f5fd9 in (anonymous namespace)::XFrameImpl::disposing (this=0x555556dd1610) at /home/michi/development/git/libreoffice/framework/source/services/frame.cxx:2184
    #62 0x00007ffff573a1f0 in cppu::WeakComponentImplHelperBase::dispose (this=0x555556dd1610) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase.cxx:104
    #63 0x00007ffff4a02ba5 in cppu::PartialWeakComponentImplHelper<com::sun::star::lang::XServiceInfo, com::sun::star::frame::XFrame2, com::sun::star::awt::XWindowListener, com::sun::star::awt::XTopWindowListener, com::sun::star::awt::XFocusListener, com::sun::star::document::XActionLockable, com::sun::star::util::XCloseable, com::sun::star::frame::XComponentLoader, com::sun::star::frame::XTitle, com::sun::star::frame::XTitleChangeBroadcaster, com::sun::star::beans::XPropertySet, com::sun::star::beans::XPropertySetInfo>::dispose (this=0x555556dd1610) at include/cppuhelper/compbase.hxx:90
    #64 0x00007ffff49fb4d5 in (anonymous namespace)::XFrameImpl::close (this=0x555556dd1610, bDeliverOwnership=0 '\000') at /home/michi/development/git/libreoffice/framework/source/services/frame.cxx:1731
    #65 0x00007ffff4829850 in framework::pattern::frame::closeIt (xResource=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x555556dd1680) at framework/source/inc/pattern/frame.hxx:57
    #66 0x00007ffff49b92fd in framework::LoadEnv::impl_reactForLoadingState (this=0x7fffffff57b8) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:1655
    #67 0x00007ffff49b8cf6 in framework::LoadEnv::impl_setResult (this=0x7fffffff57b8, bResult=true) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:537
    #68 0x00007ffff49b8b31 in framework::LoadEnv::impl_loadContent (this=0x7fffffff57b8) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:1184
    #69 0x00007ffff49b5c85 in framework::LoadEnv::start (this=0x7fffffff57b8) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:417
    #70 0x00007ffff49b3982 in framework::LoadEnv::startLoading
        (this=0x7fffffff57b8, sURL="file:///home/michi/development/git/libreoffice/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", lMediaDescriptor=uno::Sequence of length 3 = {...}, xBaseFrame=uno::Reference to (framework::Desktop *) 0x5555568ac098, sTarget="_default", nSearchFlags=0, eFeature=LoadEnvFeatures::WorkWithUI) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:313
    #71 0x00007ffff49b2282 in framework::LoadEnv::loadComponentFromURL
        (xLoader=uno::Reference to (framework::Desktop *) 0x5555568ac0a8, xContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x55555559d808, sURL="file:///home/michi/development/git/libreoffice/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", sTarget="_default", nSearchFlags=0, lArgs=uno::Sequence of length 3 = {...}) at /home/michi/development/git/libreoffice/framework/source/loadenv/loadenv.cxx:169
    #72 0x00007ffff49e45d2 in framework::Desktop::loadComponentFromURL
        (this=0x5555568ac030, sURL="file:///home/michi/development/git/libreoffice/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", sTargetFrameName="_default", nSearchFlags=0, lArguments=uno::Sequence of length 3 = {...}) at /home/michi/development/git/libreoffice/framework/source/services/desktop.cxx:594
    #73 0x00007ffff49e4734 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 /home/michi/development/git/libreoffice/instdir/program/libfwklo.so
    #74 0x00007ffff3c6ef72 in SfxTemplateManagerDlg::EditTemplateHdl (this=0x7fffffffa218, rTemplatePath="file:///home/michi/development/git/libreoffice/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott")
        at /home/michi/development/git/libreoffice/sfx2/source/doc/templatedlg.cxx:715
    #75 0x00007ffff3c67eed in SfxTemplateManagerDlg::LinkStubEditTemplateHdl (instance=0x7fffffffa218, data="file:///home/michi/development/git/libreoffice/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott")
        at /home/michi/development/git/libreoffice/sfx2/source/doc/templatedlg.cxx:704
    #76 0x00007ffff36af081 in Link<rtl::OUString const&, void>::Call (this=0x7fffffffa520, data="file:///home/michi/development/git/libreoffice/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott")
        at include/tools/link.hxx:105
    #77 0x00007ffff382c9ab in TemplateDlgLocalView::ContextMenuSelectHdl (this=0x7fffffffa320, rIdent=u"edit") at /home/michi/development/git/libreoffice/sfx2/source/control/templatedlglocalview.cxx:154
    #78 0x00007ffff382c66a in TemplateDlgLocalView::createContextMenu (this=0x7fffffffa320, bIsDefault=false, bIsBuiltIn=true, bIsSingleSel=true, rDefaultImg="res/odt_16_8.png")
        at /home/michi/development/git/libreoffice/sfx2/source/control/templatedlglocalview.cxx:140
    #79 0x00007ffff3c6e710 in SfxTemplateManagerDlg::CreateContextMenuHdl (this=0x7fffffffa218, pItem=0x55555788ca90) at /home/michi/development/git/libreoffice/sfx2/source/doc/templatedlg.cxx:680
    #80 0x00007ffff3c67e5d in SfxTemplateManagerDlg::LinkStubCreateContextMenuHdl (instance=0x7fffffffa218, data=0x55555788ca90) at /home/michi/development/git/libreoffice/sfx2/source/doc/templatedlg.cxx:649
    #81 0x00007ffff381bce1 in Link<TemplateViewItem*, void>::Call (this=0x7fffffffa4e0, data=0x55555788ca90) at include/tools/link.hxx:105
    #82 0x00007ffff3816e34 in TemplateLocalView::Command (this=0x7fffffffa320, rCEvt=...) at /home/michi/development/git/libreoffice/sfx2/source/control/templatelocalview.cxx:718
    #83 0x00007fffee228e11 in weld::CustomWeld::DoCommand (this=0x55555779d480, rPos=...) at /home/michi/development/git/libreoffice/vcl/source/app/customweld.cxx:102
    #84 0x00007fffee228b1d in weld::CustomWeld::LinkStubDoCommand (instance=0x55555779d480, data=...) at /home/michi/development/git/libreoffice/vcl/source/app/customweld.cxx:100
    #85 0x00007fffeda99ed6 in Link<CommandEvent const&, bool>::Call (this=0x555557703ef0, data=...) at include/tools/link.hxx:105
    #86 0x00007fffee2813f1 in weld::Widget::signal_command (this=0x555557703ee0, rCEvt=...) at include/vcl/weld/weld.hxx:109
    #87 0x00007fffee247e74 in SalInstanceWidget::CommandHdl (this=0x555557703eb0, rEvent=...) at /home/michi/development/git/libreoffice/vcl/source/app/salvtables.cxx:819
    #88 0x00007fffee244ccd in SalInstanceWidget::LinkStubCommandHdl (instance=0x555557703eb0, data=...) at /home/michi/development/git/libreoffice/vcl/source/app/salvtables.cxx:817
    #89 0x00007fffeda99ed6 in Link<CommandEvent const&, bool>::Call (this=0x5555577f1080, data=...) at include/tools/link.hxx:105
    #90 0x00007fffedc2f524 in vcl::Window::Command (this=0x5555573055d0, rCEvt=...) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:1933
    #91 0x00007fffedc4df45 in ImplCallCommand (pChild=..., nEvt=CommandEventId::ContextMenu, pData=0x0, bMouse=true, pPos=0x7fffffff7950) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:258
    #92 0x00007fffedc4d68c in ImplHandleMouseEvent (xWindow=..., nSVEvent=NotifyEventType::MOUSEBUTTONDOWN, bMouseLeave=false, nX=125, nY=130, nMsgTime=71004093, nCode=4, nMode=MouseEventModifiers::NONE)
        at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:827
    #93 0x00007fffedc51581 in ImplHandleSalMouseButtonDown (pWindow=0x5555578924d0, pEvent=0x7fffffff8998) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2367
    #94 0x00007fffedc501f1 in ImplWindowFrameProc (_pWindow=0x5555578924d0, nEvent=SalEvent::MouseButtonDown, pEvent=0x7fffffff8998) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2705
    #95 0x00007fffe6215dcc in SalFrame::CallCallback (this=0x555557805e30, nEvent=SalEvent::MouseButtonDown, pEvent=0x7fffffff8998) at vcl/inc/salframe.hxx:310
    #96 0x00007fffe62be199 in X11SalFrame::HandleMouseEvent (this=0x555557805e30, pEvent=0x7fffffff8e68) at /home/michi/development/git/libreoffice/vcl/unx/generic/window/salframe.cxx:2575
    #97 0x00007fffe62c1e97 in X11SalFrame::Dispatch (this=0x555557805e30, pEvent=0x7fffffff8e68) at /home/michi/development/git/libreoffice/vcl/unx/generic/window/salframe.cxx:3642
    #98 0x00007fffe6231f7b in SalX11Display::Dispatch (this=0x555556884440, pEvent=0x7fffffff8e68) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldisp.cxx:1966
    #99 0x00007fffe6231802 in SalX11Display::Yield (this=0x555556884440) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldisp.cxx:1865
    #100 0x00007fffe62267df in DisplayYield (fd=5, data=0x555556884440) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldisp.cxx:317
    #101 0x00007fffe622235c in (anonymous namespace)::YieldEntry::HandleNextEvent (this=0x7fffe63191e8 <yieldTable+200>) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldata.cxx:559
    #102 0x00007fffe6222261 in SalXLib::Yield (this=0x5555555a3b00, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldata.cxx:751
    #103 0x00007fffe623f29d in X11SalInstance::DoYield (this=0x5555555a1ba0, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/salinst.cxx:189
    #104 0x00007fffee300306 in InnerYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:389
    #105 0x00007fffee2ffb8f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:502
    #106 0x00007fffeda927db in Dialog::Execute (this=0x555557806110) at /home/michi/development/git/libreoffice/vcl/source/window/dialog.cxx:1079
    #107 0x00007fffee2505ee in SalInstanceDialog::run (this=0x5555575f5100) at /home/michi/development/git/libreoffice/vcl/source/app/salvtables.cxx:1859
    #108 0x00007fffee6b4c6e in weld::DialogController::run (this=0x7fffffffa218) at /home/michi/development/git/libreoffice/vcl/source/weld/DialogController.cxx:16
    #109 0x00007ffff3c68a94 in SfxTemplateManagerDlg::run (this=0x7fffffffa218) at /home/michi/development/git/libreoffice/sfx2/source/doc/templatedlg.cxx:262
    #110 0x00007ffff36578af in SfxApplication::NewDocExec_Impl (this=0x555556dbccf0, rReq=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/appopen.cxx:473
    #111 0x00007ffff3650dd5 in SfxStubSfxApplicationNewDocExec_Impl (pShell=0x555556dbccf0, rReq=...) at workdir/SdiTarget/sfx2/sdi/sfxslots.hxx:1310
    #112 0x00007ffff37aa26e in SfxDispatcher::Call_Impl (this=0x555556979a30, rShell=..., rSlot=..., rReq=..., bRecord=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:256
    #113 0x00007ffff37b0156 in SfxDispatcher::PostMsgHandler (this=0x555556979a30, pReq=std::unique_ptr<SfxRequest> = {...}) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:997
    #114 0x00007ffff3ca5458 in SfxHintPoster::DoEvent_Impl (this=0x555556db3930, pPostedHint=0x5555576ed980) at /home/michi/development/git/libreoffice/sfx2/source/notify/hintpost.cxx:74
    #115 0x00007ffff3ca539d in SfxHintPoster::LinkStubDoEvent_Impl (instance=0x555556db3930, data=0x5555576ed980) at /home/michi/development/git/libreoffice/sfx2/source/notify/hintpost.cxx:54
    #116 0x00007fffedc583f1 in Link<void*, void>::Call (this=0x5555577cabb8, data=0x5555576ed980) at include/tools/link.hxx:105
    #117 0x00007fffedc53d11 in ImplHandleUserEvent (pSVEvent=0x5555577cabb0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2314
    #118 0x00007fffedc50c3f in ImplWindowFrameProc (_pWindow=0x555556db2f40, nEvent=SalEvent::UserEvent, pEvent=0x5555577cabb0) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2871
    #119 0x00007fffee830cbc in SalFrame::CallCallback (this=0x555556b048a0, nEvent=SalEvent::UserEvent, pEvent=0x5555577cabb0) at vcl/inc/salframe.hxx:310
    #120 0x00007fffee85721f in SalGenericDisplay::ProcessEvent (this=0x555556884440, aEvent=...) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:66
    #121 0x00007fffee234c9d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7fffffffb390) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
    #122 0x00007fffee234b6b in SalUserEventList::DispatchUserEvents (this=0x555556884440, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
    #123 0x00007fffee857175 in SalGenericDisplay::DispatchInternalEvent (this=0x555556884440, bHandleAllCurrentEvent=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/gendisp.cxx:51
    #124 0x00007fffe6231784 in SalX11Display::Yield (this=0x555556884440) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldisp.cxx:1856
    #125 0x00007fffe62267df in DisplayYield (fd=5, data=0x555556884440) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldisp.cxx:317
    #126 0x00007fffe622235c in (anonymous namespace)::YieldEntry::HandleNextEvent (this=0x7fffe63191e8 <yieldTable+200>) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldata.cxx:559
    #127 0x00007fffe6221bc9 in SalXLib::Yield (this=0x5555555a3b00, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/saldata.cxx:655
    #128 0x00007fffe623f29d in X11SalInstance::DoYield (this=0x5555555a1ba0, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/generic/app/salinst.cxx:189
    #129 0x00007fffee300306 in InnerYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:389
    #130 0x00007fffee2ffb8f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:502
    #131 0x00007fffee2ff970 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:364
    #132 0x00007ffff7b228b5 in desktop::Desktop::Main (this=0x7fffffffd550) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1681
    #133 0x00007fffee329376 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:230
    #134 0x00007fffee32ae99 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:248
    #135 0x00007ffff7b9c86a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #136 0x0000555555555a2d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #137 0x0000555555555a07 in main (argc=1, argv=0x7fffffffd758) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: I06da3836405b46671785824fbcee8db863048685
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197637
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit ab7a187)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197720
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
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