diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-07 18:30:33 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-08 10:28:02 +0200 |
commit | 800eebfa82106c509310ed43bef38a7a4ad4451f (patch) | |
tree | 873cb321d6b59d23a63e3fb34dac7e0ee720d62f /xmlsecurity/qa | |
parent | 749ac5f415a590da505eb5e3d4a37a49a9c82fcc (diff) |
Database document apparently needs to be closed before it is disposed
Otherwise, if a test like testPreserveMacroTemplateSignature10::TestBody from
xmlsecurity/qa/unit/signing/signing.cxx happens to be executed after
testPreserveMacroSignatureODB::TestBody from
xmlsecurity/qa/unit/signing/signing2.cxx during CppunitTest_xmlsecurity_signing,
it would SIGABRT with something like
> warn:sfx.view:1935717:1935717:sfx2/source/view/frmload.cxx:489: DBG_UNHANDLED_EXCEPTION in static void (anonymous namespace)::SfxFrameLoader_Impl::impl_handleCaughtError_nothrow(const com::sun::star::uno::Any &, const ::comphelper::NamedValueCollection &) exception: com.sun.star.lang.DisposedException message: Frame disposed /home/sbergman/lo/core/framework/source/services/frame.cxx:362
> warn:legacy.osl:1935717:1935717:vcl/source/window/window.cxx:273: Window ( 19SfxFrameWindow_Impl()) with live children destroyed: 23SfxFrameViewWindow_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl()
> Window ( 19SfxFrameWindow_Impl()) with live children destroyed: 23SfxFrameViewWindow_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl()
at
> #7 0x00007ff59b2599e9 in SalAbort(rtl::OUString const&, bool) (rErrorText="Window ( 19SfxFrameWindow_Impl()) with live children destroyed: 23SfxFrameViewWindow_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow("..., bDumpCore=true) at vcl/source/app/salplug.cxx:303
> #8 0x00007ff59b08c751 in Application::Abort(rtl::OUString const&) (rErrorText="Window ( 19SfxFrameWindow_Impl()) with live children destroyed: 23SfxFrameViewWindow_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow() 21SfxEmptySplitWin_Impl() 14SfxSplitWindow("...) at vcl/source/app/svapp.cxx:281
> #9 0x00007ff59a846f98 in vcl::Window::dispose() (this=0x4ea35d0) at vcl/source/window/window.cxx:274
> #10 0x00007ff5954ff853 in SfxFrameWindow_Impl::dispose() (this=0x4ea35d0) at sfx2/source/view/frame2.cxx:82
> #11 0x00007ff59aad5161 in VclReferenceBase::disposeOnce() (this=0x4ea3818) at vcl/source/outdev/vclreferencebase.cxx:38
> #12 0x00007ff591c3815b in VclPtr<OutputDevice>::disposeAndClear() (this=0x7ffd92f67810) at include/vcl/vclptr.hxx:206
> #13 0x00007ff591cbaeb8 in VCLXWindow::dispose() (this=0x52fb4c0) at toolkit/source/awt/vclxwindow.cxx:920
> #14 0x00007ff59300e147 in (anonymous namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) (this=0x4f02260, xComponentWindow=empty uno::Reference, xController=empty uno::Reference) at framework/source/services/frame.cxx:1514
> #15 0x00007ff5930104ee in (anonymous namespace)::XFrameImpl::close(unsigned char) (this=0x4f02260, bDeliverOwnership=1 '\001') at framework/source/services/frame.cxx:1692
> #16 0x00007ff593016633 in (anonymous namespace)::XFrameImpl::implts_checkSuicide() (this=0x4f02260) at framework/source/services/frame.cxx:3189
> #17 0x00007ff59300ffb4 in (anonymous namespace)::XFrameImpl::removeActionLock() (this=0x4f02260) at framework/source/services/frame.cxx:2683
> #18 0x00007ff592fa892f in framework::ActionLockGuard::freeResource() (this=0x7ffd92f68bd0) at framework/source/inc/loadenv/actionlockguard.hxx:123
> #19 0x00007ff592f9e2de in framework::LoadEnv::impl_reactForLoadingState() (this=0x7ffd92f68ac8) at framework/source/loadenv/loadenv.cxx:1637
> #20 0x00007ff592f9d9fc in framework::LoadEnv::impl_setResult(bool) (this=0x7ffd92f68ac8, bResult=false) at framework/source/loadenv/loadenv.cxx:515
> #21 0x00007ff592f9d851 in framework::LoadEnv::impl_loadContent() (this=0x7ffd92f68ac8) at framework/source/loadenv/loadenv.cxx:1160
> #22 0x00007ff592f9a502 in framework::LoadEnv::start() (this=0x7ffd92f68ac8) at framework/source/loadenv/loadenv.cxx:395
> #23 0x00007ff592f98261 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) (this=0x7ffd92f68ac8, sURL="file:///xmlsecurity/qa/unit/signing/data/tdf42316.ott", lMediaDescriptor=uno::Sequence of length 2 = {...}, xBaseFrame=uno::Reference to (class framework::Desktop *) 0x18b3c48, sTarget="_default", nSearchFlags=0, eFeature=LoadEnvFeatures::NONE) at framework/source/loadenv/loadenv.cxx:300
> #24 0x00007ff592f96bdc in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (xLoader=uno::Reference to (class framework::Desktop *) 0x18b3c58, xContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0xa6aeb0, sURL="file:///xmlsecurity/qa/unit/signing/data/tdf42316.ott", sTarget="_default", nSearchFlags=0, lArgs=uno::Sequence of length 2 = {...}) at framework/source/loadenv/loadenv.cxx:169
> #25 0x00007ff592ff8ce2 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x18b3be0, sURL="file:///xmlsecurity/qa/unit/signing/data/tdf42316.ott", sTargetFrameName="_default", nSearchFlags=0, lArguments=uno::Sequence of length 2 = {...}) at framework/source/services/desktop.cxx:593
> #26 0x00007ff592ff8da5 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 workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XComponent.hpp:136
> #27 0x00007ff593d7bb28 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x18a6d80, rURL="file:///xmlsecurity/qa/unit/signing/data/tdf42316.ott", rDocService="", rExtraArgs=uno::Sequence of length 1 = {...}) at unotest/source/cpp/macros_test.cxx:61
> #28 0x00007ff5956b132d in testPreserveMacroTemplateSignature10::TestBody() (this=0x18a6d30) at xmlsecurity/qa/unit/signing/signing.cxx:1243
Change-Id: If2c45a8fc8d907b12f4d92c77f524d50d9e928cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100344
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlsecurity/qa')
-rw-r--r-- | xmlsecurity/qa/unit/signing/signing2.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx b/xmlsecurity/qa/unit/signing/signing2.cxx index 90a8f3b1e6ef..2430840499ac 100644 --- a/xmlsecurity/qa/unit/signing/signing2.cxx +++ b/xmlsecurity/qa/unit/signing/signing2.cxx @@ -16,6 +16,7 @@ #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/XStorable.hpp> +#include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/xml/crypto/SEInitializer.hpp> #include <comphelper/propertysequence.hxx> @@ -61,7 +62,14 @@ void SigningTest2::setUp() void SigningTest2::tearDown() { if (mxComponent.is()) + { + css::uno::Reference<css::util::XCloseable> closer(mxComponent, css::uno::UNO_QUERY); + if (closer.is()) + { + closer->close(true); + } mxComponent->dispose(); + } test::BootstrapFixture::tearDown(); } |