forked from amazingfate/loongoffice
JunitTest_sfx2_complex occasionally deadlocked when the main thread at > framework::UndoManagerHelper::isUndoPossible > chart::UndoCommandDispatch::fireStatusEvent > chart::CommandDispatch::addStatusListener > svt::ToolboxController::bindListener > framework::ToolBarManager::UpdateControllers > framework::ToolBarManager::AsyncUpdateControllersHdl > Scheduler::CallbackTaskScheduling > SalTimer::CallCallback > SvpSalInstance::CheckTimeout > SvpSalInstance::ImplYield > SvpSalInstance::DoYield > ImplYield > Application::Execute > desktop::Desktop::Main has acquired the SolarMutex in framework::ToolBarManager::AsyncUpdateControllersHdl and is now trying to acquire framework::UndoManagerHelper_Impl::m_aMutex, while a cppu_threadpool at > framework::UndoManagerHelper_Impl::impl_clear > std::function<void ()>::operator() > framework::(anonymous namespace)::UndoManagerRequest::execute > framework::UndoManagerHelper_Impl::impl_processRequest > framework::UndoManagerHelper_Impl::clear > framework::UndoManagerHelper::clear > gcc3::callVirtualMethod first acquired framework::UndoManagerHelper_Impl::m_aMutex and then tries to acquire the SolarMutex. That additional acquiring of the SolarMutex had been added to framework::UndoManagerHelper_Impl::impl_clear in 8611f6e259b807b4f19c8dc0eab86ca648891ce3 "ref-count SdrObject". Change-Id: Ifcb8765b29b65f773be6bbe54092346c5ae3a33b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146371 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>