summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-09 17:19:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-09 17:19:53 +0100
commit574d331e7635ed5c9a56985ba1eeadb7353040bc (patch)
treee70c1e74f8f542b6eb8d6cafae44d5bc9a89cc4d /framework
parent05bdc6739c6b29bcce41716000dc02d1271abd13 (diff)
Avoid starting m_aAsyncUpdateControllersTimer of disposed ToolBarManager
Seen a Jenkins build fail in JunitTest_framework_complex as below, and the only remotely plausible scenario I can think of is that a call from Frame::contextChanged -> ToolBarManager::frameAction started the timer after Frame::close -> dispose -> ... -> ToolBarManager::dispose had been called but before Frame::close -> dispose -> ... -> ~ToolBarManager had been called. (And tracing the calls to Frame member functions, there indeed appear to be call patterns during JunitTest_framework_complex where Frame::contextChanged is called from within Frame::close -> dispose -> ...) Any other calls to m_aAsyncUpdateControllersTimer.Start() in ToolBarManager appear to already check for !m_bDisposed. <http://ci.libreoffice.org/job/lo_tb_master_linux_dbg/9049/console>: > #7 0x00002b2653546566 in __assert_fail_base () at /lib64/libc.so.6 > #8 0x00002b2653546612 in () at /lib64/libc.so.6 > #9 0x00002b2676f23777 in framework::ToolBarManager::~ToolBarManager() (this=0x3a48710, __in_chrg=<optimized out>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/framework/source/uielement/toolbarmanager.cxx:198 > #10 0x00002b2676f23978 in framework::ToolBarManager::~ToolBarManager() (this=0x3a48710, __in_chrg=<optimized out>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/framework/source/uielement/toolbarmanager.cxx:201 > #11 0x00002b2655fd5328 in cppu::OWeakObject::release() (this=0x3a48710) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/weak.cxx:233 > #12 0x00002b2676ec7138 in cppu::WeakImplHelper<com::sun::star::frame::XFrameActionListener, com::sun::star::lang::XComponent, com::sun::star::ui::XUIConfigurationListener>::release() (this=0x3a48710) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/cppuhelper/implbase.hxx:113 > #13 0x00002b2655ef353a in com::sun::star::uno::cpp_release(void*) (pCppI=0x3a48738) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/com/sun/star/uno/genfunc.hxx:48 > #14 0x00002b2655c5d4ab in cppu::idestructElements(void*, _typelib_TypeDescriptionReference*, int, int, void (*)(void*)) (pElements=0x32c5a28, pElementType=0x1670d90, nStartIndex=0, nStopIndex=5, release=0x2b2655ef3517 <com::sun::star::uno::cpp_release(void*)>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/destr.hxx:238 > p = 0x3a48738 > nPos = 4 > #15 0x00002b2655c5d64f in cppu::idestroySequence(_sal_Sequence*, _typelib_TypeDescriptionReference*, _typelib_TypeDescription*, void (*)(void*)) (pSeq=0x32c5a20, pType=0x24a6cf0, pTypeDescr=0x24a6cf0, release=0x2b2655ef3517 <com::sun::star::uno::cpp_release(void*)>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/destr.hxx:284 > __PRETTY_FUNCTION__ = "void cppu::idestroySequence(uno_Sequence*, typelib_TypeDescriptionReference*, typelib_TypeDescription*, uno_ReleaseFunc)" > #16 0x00002b2655c8952f in uno_type_sequence_destroy(uno_Sequence*, typelib_TypeDescriptionReference*, uno_ReleaseFunc) (sequence=0x32c5a20, type=0x24a6cf0, release=0x2b2655ef3517 <com::sun::star::uno::cpp_release(void*)>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/sequence.cxx:916 > #17 0x00002b2655f31ba6 in com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> >::~Sequence() (this=0x2679070, __in_chrg=<optimized out>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/com/sun/star/uno/Sequence.hxx:113 > rType = invalid uno::Type > #18 0x00002b2655f2ef92 in cppu::OInterfaceIteratorHelper::~OInterfaceIteratorHelper() (this=0x2b26785beaf0, __in_chrg=<optimized out>) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/interfacecontainer.cxx:103 > bShared = false > #19 0x00002b2655f2fb98 in cppu::OInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) (this=0x32bd280, rEvt=...) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/interfacecontainer.cxx:288 > aGuard = {pT = 0x0} > aIt = {rCont = @0x32bd280, bIsList = 1 '\001', aData = {pAsSequence = 0x2679070, pAsInterface = 0x2679070}, nRemain = 0} > #20 0x00002b2655f308d7 in cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) (this=0x38bc030, rEvt=...) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/interfacecontainer.cxx:477 > i = 0 > nSize = 3 > ppListenerContainers = std::unique_ptr<cppu::OInterfaceContainerHelper *> containing 0x2f7c650 > #21 0x00002b2676e37180 in (anonymous namespace)::Frame::disposing() (this=0x38bbf30) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/framework/source/services/frame.cxx:2242 > parent = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b26785beca0 > xThis = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbfa0 > layoutMgr = uno::Reference to (framework::LayoutManager *) 0x2fa5190 > aEvent = {Source = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbfa0} > xDisposableCtrl = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b26785beca0 > xDisposableComp = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b2676e34200 <(anonymous namespace)::Frame::isActive()+160> > disp = 0x2f7c650 > xDispatchHelper = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b26785bec80 > old = Application::Off > contWin = uno::Reference to (com::sun::star::uno::XInterface *) 0x2b26785bf050 > #22 0x00002b2655f2b262 in cppu::WeakComponentImplHelperBase::dispose() (this=0x38bbf30) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppuhelper/source/implbase.cxx:107 > aEvt = {Source = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbf30} > aGuard2 = {pT = 0x39553a0} > aGuard = {pT = 0x0} > #23 0x00002b2676e3f0a6 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=0x38bbf30) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/cppuhelper/compbase.hxx:94 > #24 0x00002b2676e34edb in (anonymous namespace)::Frame::close(sal_Bool) (this=0x38bbf30, bDeliverOwnership=0 '\000') at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/framework/source/services/frame.cxx:1829 > xSelfHold = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbf30 > aSource = {Source = uno::Reference to ((anonymous namespace)::Frame *) 0x38bbf30} > pContainer = 0x33c4ba0 > aWriteLock = {m_bCleared = true, m_solarMutex = @0x16529c0} > #25 0x00002b26752971a1 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) (pThis=0x38bbfd0, nVtableIndex=5, pRegisterReturn=0x0, pReturnTypeRef=0x165a1b0, bSimpleReturn=true, pStack=0x2b26785bf1a0, nStack=0, pGPR=0x2b26785bf2c0, pFPR=0x2b26785bf2f0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:133 > data = {pMethod = 47444203360446, pStack = 0x2b26785bf1a0, nStack = 0, pGPR = 0x2b26785bf2c0, pFPR = 0x2b26785bf2f0, rax = 47444228043088, rdx = 47444228043040, xmm0 = 4.9549649932863477e-314, xmm1 = 2.3440563169523938e-310} > pMethod = 47444209328504 > #26 0x00002b26752960bc in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, typelib_TypeDescriptionReference*, sal_Int32, typelib_MethodParameter*, void*, void**, uno_Any**) (pThis=0x2f330e0, aVtableSlot=..., pReturnTypeRef=0x165a1b0, nParams=1, pParams=0x3200050, pUnoReturn=0x0, pUnoArgs=0x3a70260, ppUnoExc=0x2b26785bf478) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:245 > pStack = 0x2b26785bf1a0 > pFPR = {2.34405631697769e-310, 2.3440546323697648e-310, 1.0609978954826362e-313, 2.3440563169796168e-310, 2.5903774855902888e-316, -9.6283901862001054e-07, 2.3440563169800615e-310, 0} > __PRETTY_FUNCTION__ = "void cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, typelib_TypeDescriptionReference*, sal_Int32, typelib_MethodParameter*, void*, void**, uno_Any**)" > pCppArgs = 0x2b26785bf170 > pStackStart = 0x2b26785bf1a0 > pGPR = {59490256, 0, 47444228043568, 47444174450194, 0, 52429824} > nTempIndices = 0 > nFPR = 0 > pAdjustedThisPtr = 0x38bbfd0 > ppTempParamTypeDescr = 0x2b26785bf180 > nGPR = 2 > pReturnTypeDescr = 0x165a1b0 > pCppReturn = 0x0 > bSimpleReturn = true > pTempIndices = 0x2b26785bf178 > #27 0x00002b2675296ada in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) (pUnoI=0x2f330e0, pMemberDescr=0x3200400, pReturn=0x0, pArgs=0x3a70260, ppException=0x2b26785bf478) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:436 > nMemberPos = 5 > aVtableSlot = {offset = 0, index = 5} > pThis = 0x2f330e0 > pTypeDescr = 0x2590e40 > __PRETTY_FUNCTION__ = "void bridges::cpp_uno::shared::unoInterfaceProxyDispatch(uno_Interface*, const typelib_TypeDescription*, void*, void**, uno_Any**)" > #28 0x00002b267653517a in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const (this=0x3aba970, returnValue=0x2b26785bf8a0, outArguments=0x2b26785bf920) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/incomingrequest.cxx:242 > exc = <error reading variable: Cannot access memory at address 0x3aba87808> > pexc = 0x2b26785bf4a0 > retType = {_pTypeDescr = 0x165a1b0} > nSize = 0 > retBuf = std::__debug::vector of length 0, capacity 0 > outBufs = empty std::__debug::list > args = std::__debug::vector of length 1, capacity 1 = {0x3a331c0} > __PRETTY_FUNCTION__ = "bool binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny>*) const" > isExc = false > #29 0x00002b2676533f7a in binaryurp::IncomingRequest::execute() const (this=0x3aba970) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/incomingrequest.cxx:77 > resetCc = true > oldCc = {m_pUnoI = 0x0} > ret = {data_ = _uno_Any(void)} > outArgs = std::__debug::vector of length 0, capacity 0 > isExc = false > #30 0x00002b2676554a88 in binaryurp::(anonymous namespace)::request(void*) (pThreadSpecificData=0x3aba970) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/reader.cxx:85 > __PRETTY_FUNCTION__ = "void binaryurp::{anonymous}::request(void*)" > #31 0x00002b2655c27f0b in cppu_threadpool::JobQueue::enter(long, bool) (this=0x398ea80, nDisposeId=39254816, bReturnWhenNoJob=true) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/threadpool/jobqueue.cxx:107 > guard = {pT = 0x398ea80} > job = {pThreadSpecificData = 0x3aba970, doRequest = 0x2b2676554a1f <binaryurp::(anonymous namespace)::request(void*)>} > pReturn = 0x0 > #32 0x00002b2655c2cb57 in cppu_threadpool::ORequestThread::run() (this=0x256fb20) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/threadpool/thread.cxx:168 > #33 0x00002b2655c2d04d in osl::threadFunc(void*) (param=0x256fb30) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/osl/thread.hxx:185 > pObj = 0x256fb30 > #34 0x00002b2652f08340 in osl_thread_start_Impl(void*) (pData=0x2570ac0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sal/osl/unx/thread.cxx:240 > terminate = false > pImpl = 0x2570ac0 > __PRETTY_FUNCTION__ = "void* osl_thread_start_Impl(void*)" > #35 0x00002b26538e1dc5 in start_thread () at /lib64/libpthread.so.0 > #36 0x00002b265360eced in clone () at /lib64/libc.so.6 Change-Id: I27e15a72f6b96484cb45928eaabae589cf9d7ed7
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/toolbarmanager.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 6f5b27ec5dfa..20091251da52 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -397,7 +397,7 @@ void ToolBarManager::frameAction( const FrameActionEvent& Action )
throw ( RuntimeException, std::exception )
{
SolarMutexGuard g;
- if ( Action.Action == FrameAction_CONTEXT_CHANGED )
+ if ( Action.Action == FrameAction_CONTEXT_CHANGED && !m_bDisposed )
{
m_aAsyncUpdateControllersTimer.Start();
}