summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-10 19:19:02 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-11 01:49:08 +0100
commit5000c5bdfe4778e24759ee0aeb57ecb9fbb3c73a (patch)
tree3479f87fe8155c237f1f71f71e98e89da91393ff /vcl/qt5
parenta7a9acc2cef24c532279f4d5db3418af26292127 (diff)
tdf#130857 qt weld: Hold SolarMutex in QtInstanceButton::buttonClicked
Hold the SolarMutex when calling the button clicked handler. Otherwise, opening Writer's "Tools" -> "Footnote/Endnote Settings" dialog and closing with the "OK" button triggers an assert when using native Qt widgets (i.e. with env var SAL_VCL_QT_USE_WELDED_WIDGETS=1 set). Backtrace: 1 __pthread_kill_implementation pthread_kill.c 44 0x7ffff789de5c 2 __pthread_kill_internal pthread_kill.c 78 0x7ffff789debf 3 __GI_raise raise.c 26 0x7ffff7849c82 4 __GI_abort abort.c 79 0x7ffff78324f0 5 __assert_fail_base assert.c 94 0x7ffff7832418 6 __assert_fail assert.c 103 0x7ffff7842592 7 ImplDbgTestSolarMutex dbggui.cxx 35 0x7fffeec2eb1e 8 DbgTestSolarMutex debug.cxx 54 0x7ffff6d2bee0 9 SwModify::Add calbck.cxx 174 0x7fffbe3b9f49 10 SwClient::SwClient calbck.hxx 428 0x7fffbe3be8bb 11 sw::ListenerEntry::ListenerEntry calbck.hxx 241 0x7fffbe3be845 12 std::construct_at<sw::ListenerEntry, SwClient *, SwModify *&> stl_construct.h 97 0x7fffbe3be80f 13 std::allocator_traits<std::allocator<sw::ListenerEntry>>::construct<sw::ListenerEntry, SwClient *, SwModify *&> alloc_traits.h 571 0x7fffbe3be5ec 14 std::__cxx1998::vector<sw::ListenerEntry>::_M_realloc_append<SwClient *, SwModify *&> vector.tcc 634 0x7fffbe3be5ec 15 std::__cxx1998::vector<sw::ListenerEntry>::emplace_back<SwClient *, SwModify *&> vector.tcc 123 0x7fffbe3be3ca 16 std::vector<sw::ListenerEntry>::emplace_back<SwClient *, SwModify *&> vector 599 0x7fffbe3bd80a 17 sw::WriterMultiListener::StartListening calbck.cxx 262 0x7fffbe3bb65d 18 SwEndNoteInfo::GetCharFormat docftn.cxx 166 0x7fffbe6911c1 19 (anonymous namespace)::lcl_ResetPoolIdForDocAndSync docftn.cxx 186 0x7fffbe69130b 20 SwEndNoteInfo::SetCharFormat docftn.cxx 193 0x7fffbe691223 21 SwEndNoteOptionPage::FillItemSet docfnote.cxx 342 0x7fffa88bdb58 22 SwFootNoteOptionDlg::OkHdl docfnote.cxx 60 0x7fffa88bb484 23 SwFootNoteOptionDlg::LinkStubOkHdl docfnote.cxx 55 0x7fffa88bb19d 24 Link<weld::Button&, void>::Call link.hxx 111 0x7fffe4732de1 25 weld::Button::signal_clicked weld.hxx 1519 0x7fffe47323ac 26 QtInstanceButton::buttonClicked QtInstanceButton.cxx 102 0x7fffe473076c 27 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceButton:: *)()>::call(void (QtInstanceButton:: *)(), QtInstanceButton *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 127 0x7fffe47332b1 28 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceButton:: *)()>::call(void (QtInstanceButton:: *)(), QtInstanceButton *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceButton:: *)()>::call(void (QtInstanceButton:: *)(), QtInstanceButton *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 65 0x7fffe47331e9 29 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceButton:: *)()>::call(void (QtInstanceButton:: *)(), QtInstanceButton *, void * *) qobjectdefs_impl.h 126 0x7fffe473311b 30 QtPrivate::FunctionPointer<void (QtInstanceButton:: *)()>::call<QtPrivate::List<>, void>(void (QtInstanceButton:: *)(), QtInstanceButton *, void * *) qobjectdefs_impl.h 174 0x7fffe473309d 31 QtPrivate::QCallableObject<void (QtInstanceButton:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 545 0x7fffe4732fc6 32 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 461 0x7fffe385ace2 33 doActivate<false> qobject.cpp 4127 0x7fffe3919054 34 QMetaObject::activate qobject.cpp 4187 0x7fffe390ecf3 35 QAbstractButton::clicked moc_qabstractbutton.cpp 396 0x7fffe1a24d79 36 QAbstractButtonPrivate::emitClicked qabstractbutton.cpp 381 0x7fffe1a24c77 37 QAbstractButtonPrivate::click qabstractbutton.cpp 374 0x7fffe1a24ad1 38 QAbstractButton::mouseReleaseEvent qabstractbutton.cpp 976 0x7fffe1a25fbf 39 QWidget::event qwidget.cpp 8967 0x7fffe189d44d 40 QAbstractButton::event qabstractbutton.cpp 933 0x7fffe1a25ddc 41 QPushButton::event qpushbutton.cpp 684 0x7fffe1b9c251 42 QApplicationPrivate::notify_helper qapplication.cpp 3296 0x7fffe17e1989 43 QApplication::notify qapplication.cpp 2774 0x7fffe17e366d 44 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1124 0x7fffe3843cca 45 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1582 0x7fffe3844c09 46 QApplicationPrivate::sendMouseEvent qapplication.cpp 2355 0x7fffe17e22a7 47 QWidgetWindow::handleMouseEvent qwidgetwindow.cpp 667 0x7fffe18dc2ff 48 QWidgetWindow::event qwidgetwindow.cpp 299 0x7fffe18daab5 49 QApplicationPrivate::notify_helper qapplication.cpp 3296 0x7fffe17e1989 50 QApplication::notify qapplication.cpp 3247 0x7fffe17e58bd 51 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1124 0x7fffe3843cca 52 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1582 0x7fffe3844c09 53 QGuiApplicationPrivate::processMouseEvent qguiapplication.cpp 2465 0x7fffe267ee7a 54 QGuiApplicationPrivate::processWindowSystemEvent qguiapplication.cpp 2192 0x7fffe267e036 55 QWindowSystemInterface::sendWindowSystemEvents qwindowsysteminterface.cpp 1113 0x7fffe27640ed 56 QWindowSystemInterface::flushWindowSystemEvents qwindowsysteminterface.cpp 1082 0x7fffe2763f9e 57 QtWaylandClient::QWaylandDisplay::flushRequests qwaylanddisplay.cpp 511 0x7fffdfea8575 58 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay:: *)()>::call(void (QtWaylandClient::QWaylandDisplay:: *)(), QtWaylandClient::QWaylandDisplay *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 127 0x7fffdfec3cf5 59 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay:: *)()>::call(void (QtWaylandClient::QWaylandDisplay:: *)(), QtWaylandClient::QWaylandDisplay *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay:: *)()>::call(void (QtWaylandClient::QWaylandDisplay:: *)(), QtWaylandClient::QWaylandDisplay *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 65 0x7fffdfec3c1d 60 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay:: *)()>::call(void (QtWaylandClient::QWaylandDisplay:: *)(), QtWaylandClient::QWaylandDisplay *, void * *) qobjectdefs_impl.h 126 0x7fffdfec3b3f 61 QtPrivate::FunctionPointer<void (QtWaylandClient::QWaylandDisplay:: *)()>::call<QtPrivate::List<>, void>(void (QtWaylandClient::QWaylandDisplay:: *)(), QtWaylandClient::QWaylandDisplay *, void * *) qobjectdefs_impl.h 174 0x7fffdfec3ab1 62 QtPrivate::QCallableObject<void (QtWaylandClient::QWaylandDisplay:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 545 0x7fffdfec39db 63 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 461 0x7fffe385ace2 64 QMetaCallEvent::placeMetaCall qobject.cpp 621 0x7fffe390376c 65 QObject::event qobject.cpp 1420 0x7fffe39055c0 66 QApplicationPrivate::notify_helper qapplication.cpp 3296 0x7fffe17e1989 67 QApplication::notify qapplication.cpp 3247 0x7fffe17e58bd 68 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1124 0x7fffe3843cca 69 QCoreApplication::sendEvent qcoreapplication.cpp 1568 0x7fffe3844b79 70 QCoreApplicationPrivate::sendPostedEvents qcoreapplication.cpp 1923 0x7fffe38464b4 71 QCoreApplication::sendPostedEvents qcoreapplication.cpp 1755 0x7fffe38449a1 72 postEventSourceDispatch qeventdispatcher_glib.cpp 246 0x7fffe3e2e311 73 ?? 0x7fffea30c7df 74 ?? 0x7fffea30ea17 75 g_main_context_iteration 0x7fffea30f180 76 QEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 399 0x7fffe3e2d50b 77 QPAEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 89 0x7fffe2f59238 78 QtInstance::ImplYield QtInstance.cxx 464 0x7fffe4709672 79 QtInstance::DoYield QtInstance.cxx 475 0x7fffe470c6f1 80 ImplYield svapp.cxx 385 0x7fffeed0fed6 81 Application::Yield svapp.cxx 473 0x7fffeed0f86f 82 Application::Execute svapp.cxx 360 0x7fffeed0f650 83 desktop::Desktop::Main app.cxx 1679 0x7ffff7b2696b 84 ImplSVMain svmain.cxx 228 0x7fffeed30756 85 SVMain svmain.cxx 246 0x7fffeed32349 86 soffice_main sofficemain.cxx 121 0x7ffff7ba04ba 87 sal_main main.c 51 0x555555555a6d 88 main main.c 49 0x555555555a47 Change-Id: I23aab31c981483830245130cbd06991c1732fc5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176355 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtInstanceButton.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/qt5/QtInstanceButton.cxx b/vcl/qt5/QtInstanceButton.cxx
index 6de1164e8d10..26d9c35663f7 100644
--- a/vcl/qt5/QtInstanceButton.cxx
+++ b/vcl/qt5/QtInstanceButton.cxx
@@ -99,6 +99,10 @@ bool QtInstanceButton::hasCustomClickHandler(QAbstractButton& rButton)
return aProp.toBool();
}
-void QtInstanceButton::buttonClicked() { signal_clicked(); }
+void QtInstanceButton::buttonClicked()
+{
+ SolarMutexGuard g;
+ signal_clicked();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */