https://bugs.freedesktop.org/show_bug.cgi?id=57979
Priority: medium
Bug ID: 57979
CC: [email protected]
Assignee: [email protected]
Summary: ODatabaseContext::dispose uses other services during
shutdown
Severity: normal
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: All
Status: NEW
Version: 4.0.0.0.alpha0+ Master
Component: Database
Product: LibreOffice
At least reproducible with current Linux x86-64 --enable-dbugtil master build:
"File - New - Database", "Finish", save, "Reports - Use Wizard to Create
Report...", "Cancel", "File - Exit LibreOffice" reports
> warn:legacy.osl:9105:1:lo/core/dbaccess/source/core/dataaccess/ModelImpl.cxx:924:
> caught an exception!
> in function:static bool
> dbaccess::ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors(const
> com::sun::star::uno::Reference<com::sun::star::embed::XStorage>&)
> type: com.sun.star.uno.DeploymentException
> message: component context fails to supply service com.sun.star.io.TempFile
> of type com.sun.star.io.XTempFile
> context: N4cppu16ComponentContextE
on stderr, coming from
> #0 0x00007fffa3ba44e5 in
> dbaccess::ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors
> (_rxStorage=uno::Reference to {<com::sun::star::container::XNameAccess> =
> {<com::sun::star::container::XElementAccess> =
> {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb42ded10}, <No
> data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> =
> {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb42def80}, <No
> data fields>}, <No data fields>}) at
> lo/core/dbaccess/source/core/dataaccess/ModelImpl.cxx:924
> #1 0x00007fffa3ba371a in dbaccess::ODatabaseModelImpl::commitRootStorage
> (this=0x4af4af0) at lo/core/dbaccess/source/core/dataaccess/ModelImpl.cxx:828
> #2 0x00007fffa3ba208c in dbaccess::ODatabaseModelImpl::dispose
> (this=0x4af4af0) at lo/core/dbaccess/source/core/dataaccess/ModelImpl.cxx:741
> #3 0x00007fffa3b16565 in dbaccess::ODatabaseContext::disposing
> (this=0x7fffb4866258) at
> lo/core/dbaccess/source/core/dataaccess/databasecontext.cxx:290
> #4 0x00007ffff70258ba in cppu::WeakComponentImplHelperBase::dispose
> (this=0x7fffb4866258) at lo/core/cppuhelper/source/implbase.cxx:268
> #5 0x00007fffa3b25a52 in
> cppu::WeakComponentImplHelper3<com::sun::star::lang::XServiceInfo,
> com::sun::star::sdb::XDatabaseContext,
> com::sun::star::lang::XUnoTunnel>::dispose (this=0x7fffb4866258) at
> lo/core/solver/unxlngx6/inc/cppuhelper/compbase3.hxx:66
> #6 0x00007ffff701e8b0 in cppu::OFactoryComponentHelper::dispose
> (this=0x7fffb459d018) at lo/core/cppuhelper/source/factory.cxx:514
> #7 0x00007ffff6fda888 in cppu::OComponentHelper::release
> (this=0x7fffb459d018) at lo/core/cppuhelper/source/component.cxx:91
> #8 0x00007ffff70234e8 in cppu::OFactoryComponentHelper::release
> (this=0x7fffb459d018) at lo/core/cppuhelper/source/factory.cxx:334
> #9 0x00007ffff6fd601b in
> com::sun::star::uno::Reference<com::sun::star::lang::XSingleComponentFactory>::~Reference
> (this=0x7386e0, __in_chrg=<optimized out>) at
> lo/core/solver/unxlngx6/inc/com/sun/star/uno/Reference.hxx:108
> #10 0x00007ffff6ff9ea9 in (anonymous
> namespace)::Implementation::~Implementation (this=0x7386d0,
> __in_chrg=<optimized out>) at
> lo/core/cppuhelper/source/defaultbootstrap.cxx:150
> #11 0x00007ffff6ff9f02 in
> boost::checked_delete<{anonymous}::Implementation>((anonymous
> namespace)::Implementation *) (x=0x7386d0) at
> lo/core/solver/unxlngx6/inc/external/boost/checked_delete.hpp:34
> #12 0x00007ffff7000cb8 in
> boost::detail::sp_counted_impl_p<{anonymous}::Implementation>::dispose(void)
> (this=0x7387e0) at
> lo/core/solver/unxlngx6/inc/external/boost/smart_ptr/detail/sp_counted_impl.hpp:78
> #13 0x00007ffff7001300 in boost::detail::sp_counted_base::release
> (this=0x7387e0) at
> lo/core/solver/unxlngx6/inc/external/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:145
> #14 0x00007ffff700138f in boost::detail::shared_count::~shared_count
> (this=0x738830, __in_chrg=<optimized out>) at
> lo/core/solver/unxlngx6/inc/external/boost/smart_ptr/detail/shared_count.hpp:217
> #15 0x00007ffff6fde03c in
> boost::shared_ptr<{anonymous}::Implementation>::~shared_ptr(void)
> (this=0x738828, __in_chrg=<optimized out>) at
> lo/core/solver/unxlngx6/inc/external/boost/smart_ptr/shared_ptr.hpp:168
> #16 0x00007ffff6fe0151 in std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> >::~pair(void) (this=0x738820,
> __in_chrg=<optimized out>) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_pair.h:88
> #17 0x00007ffff6ffea5e in std::_Rb_tree_node<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >::~_Rb_tree_node(void)
> (this=0x738800, __in_chrg=<optimized out>) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:130
> #18 0x00007ffff6ffea7c in
> __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >
> >::destroy<std::_Rb_tree_node<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >
> >(std::_Rb_tree_node<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > *) (this=0x7fffffffdcf0,
> __p=0x738800) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ext/new_allocator.h:114
> #19 0x00007ffff6ffc5fb in std::_Rb_tree<rtl::OUString, std::pair<const
> rtl::OUString, boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >
> >::_M_destroy_node(std::_Rb_tree<rtl::OUString, std::pair<const
> rtl::OUString, boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::_Link_type)
> (this=0x7fffffffdcf0, __p=0x738800) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:419
> #20 0x00007ffff6ff8a15 in std::_Rb_tree<rtl::OUString, std::pair<const
> rtl::OUString, boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >
> >::_M_erase(std::_Rb_tree<rtl::OUString, std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::_Link_type)
> (this=0x7fffffffdcf0, __x=0x738800) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:1084
> #21 0x00007ffff6ff89f2 in std::_Rb_tree<rtl::OUString, std::pair<const
> rtl::OUString, boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >
> >::_M_erase(std::_Rb_tree<rtl::OUString, std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::_Link_type)
> (this=0x7fffffffdcf0, __x=0x7385e0) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:1082
> #22 0x00007ffff6ff89f2 in std::_Rb_tree<rtl::OUString, std::pair<const
> rtl::OUString, boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >
> >::_M_erase(std::_Rb_tree<rtl::OUString, std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::_Link_type)
> (this=0x7fffffffdcf0, __x=0x6e52b0) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:1082
> #23 0x00007ffff6ff89f2 in std::_Rb_tree<rtl::OUString, std::pair<const
> rtl::OUString, boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >
> >::_M_erase(std::_Rb_tree<rtl::OUString, std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::_Link_type)
> (this=0x7fffffffdcf0, __x=0x6db140) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:1082
> #24 0x00007ffff6ff89f2 in std::_Rb_tree<rtl::OUString, std::pair<const
> rtl::OUString, boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >
> >::_M_erase(std::_Rb_tree<rtl::OUString, std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::_Link_type)
> (this=0x7fffffffdcf0, __x=0x6e8790) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:1082
> #25 0x00007ffff6ff45e8 in std::_Rb_tree<rtl::OUString, std::pair<const
> rtl::OUString, boost::shared_ptr<{anonymous}::Implementation> >,
> std::_Select1st<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > >, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::~_Rb_tree(void)
> (this=0x7fffffffdcf0, __in_chrg=<optimized out>) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:646
> #26 0x00007ffff6fef3a8 in std::__cxx1998::map<rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation>, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::~map(void)
> (this=0x7fffffffdcf0, __in_chrg=<optimized out>) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_map.h:90
> #27 0x00007ffff6fef444 in std::__debug::map<rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation>, std::less<rtl::OUString>,
> std::allocator<std::pair<const rtl::OUString,
> boost::shared_ptr<{anonymous}::Implementation> > > >::~map(void)
> (this=0x7fffffffdcf0, __in_chrg=<optimized out>) at
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/debug/map.h:107
> #28 0x00007ffff6fe14aa in (anonymous namespace)::Data::~Data
> (this=0x7fffffffdcf0, __in_chrg=<optimized out>) at
> lo/core/cppuhelper/source/defaultbootstrap.cxx:229
> #29 0x00007ffff6fe5b5e in (anonymous namespace)::ServiceManager::disposing
> (this=0x7fffe6a02208) at lo/core/cppuhelper/source/defaultbootstrap.cxx:1369
> #30 0x00007ffff70258ba in cppu::WeakComponentImplHelperBase::dispose
> (this=0x7fffe6a02208) at lo/core/cppuhelper/source/implbase.cxx:268
> #31 0x00007ffff701b860 in
> cppu::WeakComponentImplHelper8<com::sun::star::lang::XServiceInfo,
> com::sun::star::lang::XMultiServiceFactory,
> com::sun::star::lang::XMultiComponentFactory,
> com::sun::star::container::XSet,
> com::sun::star::container::XContentEnumerationAccess,
> com::sun::star::beans::XPropertySet, com::sun::star::beans::XPropertySetInfo,
> com::sun::star::lang::XEventListener>::dispose (this=0x7fffe6a02208) at
> lo/core/solver/unxlngx6/inc/cppuhelper/compbase8.hxx:66
> #32 0x00007ffff6fc8e95 in cppu::try_dispose (xInstance=uno::Reference to
> {_vptr.XInterface = 0x7ffff7306308}) at
> lo/core/cppuhelper/source/component_context.cxx:276
> #33 0x00007ffff6fcb47a in cppu::ComponentContext::disposing
> (this=0x7fffe69dd858) at lo/core/cppuhelper/source/component_context.cxx:745
> #34 0x00007ffff70258ba in cppu::WeakComponentImplHelperBase::dispose
> (this=0x7fffe69dd858) at lo/core/cppuhelper/source/implbase.cxx:268
> #35 0x00007ffff6fda10e in
> cppu::WeakComponentImplHelper2<com::sun::star::uno::XComponentContext,
> com::sun::star::container::XNameContainer>::dispose (this=0x7fffe69dd858) at
> lo/core/solver/unxlngx6/inc/cppuhelper/compbase2.hxx:66
> #36 0x00007ffff7a89459 in desktop::Desktop::DeInit (this=0x7fffffffe430) at
> lo/core/desktop/source/app/app.cxx:627
> #37 0x00007ffff32f1f31 in DeInitVCL () at
> lo/core/vcl/source/app/svmain.cxx:494
> #38 0x00007ffff32f119b in ImplSVMain () at
> lo/core/vcl/source/app/svmain.cxx:186
> #39 0x00007ffff32f11f8 in SVMain () at lo/core/vcl/source/app/svmain.cxx:199
> #40 0x00007ffff7acdccb in soffice_main () at
> lo/core/desktop/source/app/sofficemain.cxx:74
> #41 0x0000000000400948 in sal_main () at lo/core/desktop/source/app/main.c:48
> #42 0x0000000000400929 in main (argc=1, argv=0x7fffffffe618) at
> lo/core/desktop/source/app/main.c:47
As ODatabaseContext is a single-instance implementation (see use of
cppu::createOneInstanceComponentFactory in dbaccess/soruce/misc/services.cxx),
it is only disposed when the global service manager is disposed, but after the
global service manager has cleaned its tables so that it no longer provides any
services.
So either ODatabaseContext should not do substantial work during dispose (which
is best not to do, anyway) or should be changed to destroy implementation(s) as
soon as they are no longer referenced by client code (i.e., not use
cppu::createOneInstanceComponentFactory).
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs