office-gobmx/framework/qa
Caolán McNamara 30c582a720 make CppunitTest_framework_dispatch reliable
the appearance of 2 interceptions is reproducible for me on linux with

make CppunitTest_framework_dispatch VALGRIND=memcheck

1st time
 #1 (anonymous namespace)::MyInterceptor::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/qa/cppunit/dispatchtest.cxx:139
 #2 non-virtual thunk to (anonymous namespace)::MyInterceptor::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/qa/cppunit/dispatchtest.cxx:0
 #3 framework::InterceptionHelper::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/source/dispatch/interceptionhelper.cxx:87
 #4 non-virtual thunk to framework::InterceptionHelper::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/source/dispatch/interceptionhelper.cxx:0
 #5 (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/source/services/frame.cxx:2329
 #6 non-virtual thunk to (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/source/services/frame.cxx:0
 #7 framework::DispatchHelper::executeDispatch(com::sun::uno::Reference<com::sun::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&) at core/framework/source/services/dispatchhelper.cxx:110
 #8 non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::uno::Reference<com::sun::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&) at core/framework/source/services/dispatchhelper.cxx:0
 #9 unotest::MacrosTest::dispatchCommand(com::sun::uno::Reference<com::sun::lang::XComponent> const&, rtl::OUString const&, com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&) at core/unotest/source/cpp/macros_test.cxx:94
 #10 (anonymous namespace)::testInterception::TestBody() at core/framework/qa/cppunit/dispatchtest.cxx:172

2nd time
 #1 (anonymous namespace)::MyInterceptor::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/qa/cppunit/dispatchtest.cxx:139
 #2 non-virtual thunk to (anonymous namespace)::MyInterceptor::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/qa/cppunit/dispatchtest.cxx:0
 #3 framework::InterceptionHelper::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/source/dispatch/interceptionhelper.cxx:87
 #4 non-virtual thunk to framework::InterceptionHelper::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/source/dispatch/interceptionhelper.cxx:0
 #5 (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/source/services/frame.cxx:2329
 #6 non-virtual thunk to (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::util::URL const&, rtl::OUString const&, int) at core/framework/source/services/frame.cxx:0
 #7 SfxStateCache::GetSlotServer(SfxDispatcher&, com::sun::uno::Reference<com::sun::frame::XDispatchProvider> const&) at core/sfx2/source/control/statcach.cxx:263
 #8 SfxBindings::UpdateSlotServer_Impl() at core/sfx2/source/control/bindings.cxx:1083
 #9 SfxBindings::NextJob_Impl(Timer const*) at core/sfx2/source/control/bindings.cxx:1254
 #10 SfxBindings::NextJob(Timer*) at core/sfx2/source/control/bindings.cxx:1222
 #11 SfxBindings::LinkStubNextJob(void*, Timer*) at core/sfx2/source/control/bindings.cxx:1219
 #12 Link<Timer*, void>::Call(Timer*) const at core/include/tools/link.hxx:111
 #13 Timer::Invoke() at core/vcl/source/app/timer.cxx:76
 #14 Scheduler::CallbackTaskScheduling() at core/vcl/source/app/scheduler.cxx:480
 #15 SalTimer::CallCallback() at core/vcl/inc/saltimer.hxx:55
 #16 SvpSalInstance::CheckTimeout(bool) at core/vcl/headless/svpinst.cxx:161
 #17 SvpSalInstance::ImplYield(bool, bool) at core/vcl/headless/svpinst.cxx:399
 #18 SvpSalInstance::DoYield(bool, bool) at core/vcl/headless/svpinst.cxx:471
 #19 ImplYield(bool, bool) at core/vcl/source/app/svapp.cxx:377
 #20 Scheduler::ProcessEventsToIdle() at core/vcl/source/app/svapp.cxx:407
 #21 unotest::MacrosTest::dispatchCommand(com::sun::uno::Reference<com::sun::lang::XComponent> const&, rtl::OUString const&, com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&) at core/unotest/source/cpp/macros_test.cxx:95
 #22 (anonymous namespace)::testInterception::TestBody() at core/framework/qa/cppunit/dispatchtest.cxx:172

setting bold/italic will invalidate the slot for the property and timer
starts to update the normal listeners to those properties which might
kick in on a slower run.

Change-Id: Ib37e61c0fbed463f8974d476158e54a0160a2c92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157798
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-11 15:20:30 +02:00
..
complex
cppunit
unoapi