summaryrefslogtreecommitdiff
path: root/vcl/vclplug_win.component
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-09-28 15:45:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-09-28 20:48:49 +0200
commit1dd01410e6c39c0e51bfb406c1cbb02569bd8dd3 (patch)
treedd301ad408ebf66ad8a45fea7ab2b2ea19969a2d /vcl/vclplug_win.component
parent5cf54c5e54c774062591851f9877e2afb4a36451 (diff)
Destroy CWinClipboard sufficiently early
At least with a local --host=i686-pc-cygwin --enable-dbgutil Windows `make unitcheck slowcheck` build (i.e., similar to <https://ci.libreoffice.org/job/gerrit_windows/>, which is often failing with aborted builds, presumably due to hung tests), I could once see a CppunitTest hang with just a main thread left at > ntdll.dll!77acc62c() > [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] > KernelBase.dll!77492863() > rpcrt4.dll!773e55d9() > rpcrt4.dll!77466afb() > combase.dll!7576a02a() > combase.dll!7565072f() > combase.dll!7564b2dd() > combase.dll!7564b246() > combase.dll!756498a4() > combase.dll!757690ef() > vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::release() Line 166 > at C:\lo\core\include\systools\win32\comtools.hxx(166) > vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::~COMReference<IDataObject>() Line 101 > at C:\lo\core\include\systools\win32\comtools.hxx(101) > vclplug_winlo.dll!CAPNDataObject::~CAPNDataObject() Line 97 > at C:\lo\core\vcl\win\dtrans\APNDataObject.cxx(97) > vclplug_winlo.dll!CAPNDataObject::`scalar deleting destructor'(unsigned int) > vclplug_winlo.dll!CAPNDataObject::Release() Line 137 > at C:\lo\core\vcl\win\dtrans\APNDataObject.cxx(137) > vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::release() Line 166 > at C:\lo\core\include\systools\win32\comtools.hxx(166) > vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::~COMReference<IDataObject>() Line 101 > at C:\lo\core\include\systools\win32\comtools.hxx(101) > vclplug_winlo.dll!CDOTransferable::~CDOTransferable() > vclplug_winlo.dll!CDOTransferable::`scalar deleting destructor'(unsigned int) > cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 233 > at C:\lo\core\cppuhelper\source\weak.cxx(233) > vclplug_winlo.dll!cppu::WeakImplHelper<com::sun::star::datatransfer::XTransferable,com::sun::star::datatransfer::XSystemTransferable>::release() Line 115 > at C:\lo\core\include\cppuhelper\implbase.hxx(115) > vclplug_winlo.dll!com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable>::~Reference<com::sun::star::datatransfer::XTransferable>() Line 110 > at C:\lo\core\include\com\sun\star\uno\Reference.hxx(110) > vclplug_winlo.dll!CWinClipboard::~CWinClipboard() Line 73 > at C:\lo\core\vcl\win\dtrans\WinClipboard.cxx(73) > vclplug_winlo.dll!CWinClipboard::`scalar deleting destructor'(unsigned int) > cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 233 > at C:\lo\core\cppuhelper\source\weak.cxx(233) > cppuhelper3MSC.dll!cppu::WeakComponentImplHelperBase::release() Line 86 > at C:\lo\core\cppuhelper\source\implbase.cxx(86) > vclplug_winlo.dll!cppu::PartialWeakComponentImplHelper<com::sun::star::datatransfer::clipboard::XSystemClipboard,com::sun::star::datatransfer::clipboard::XFlushableClipboard,com::sun::star::lang::XServiceInfo>::release() Line 86 > at C:\lo\core\include\cppuhelper\compbase.hxx(86) > vcllo.dll!com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard>::~Reference<com::sun::star::datatransfer::clipboard::XClipboard>() Line 110 > at C:\lo\core\include\com\sun\star\uno\Reference.hxx(110) > vcllo.dll!ImplSVData::~ImplSVData() Line 485 > at C:\lo\core\vcl\source\app\svdata.cxx(485) > vcllo.dll!`rtl::Static<ImplSVData,`anonymous namespace'::private_aImplSVData>::get'::`2'::`dynamic atexit destructor for 'instance''() > ucrtbased.dll!72f16942() > ucrtbased.dll!72f16523() > ucrtbased.dll!72f010ac() > ntdll.dll!77ad9476() > ntdll.dll!77ad9476() > ntdll.dll!77ad93f0() > ntdll.dll!77afcbd8() > ntdll.dll!77aefdc8() > kernel32.dll!77736a14() > ntdll.dll!77aeab4f() > ntdll.dll!77aeab1a() i.e., the ImplSVData::m_xSystemClipboard introduced by 974ea67a7c345a8be98c5aaa59baf9b07959b708 "tdf#129930: Dispose SystemClipboard service early enough" for some reason causing a COM issue when the static ImplSVData aImplSVData (vcl/source/app/svdata.cxx) gets destroyed during exit. And with this change to vcl/source/app/svmain.cxx, I could still see CppunitTests hang with just a main thread left at > [External Code] > vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::release() Line 166 > at C:\lo\core\include\systools\win32\comtools.hxx(166) > vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::~COMReference<IDataObject>() Line 101 > at C:\lo\core\include\systools\win32\comtools.hxx(101) > vclplug_winlo.dll!CAPNDataObject::~CAPNDataObject() Line 97 > at C:\lo\core\vcl\win\dtrans\APNDataObject.cxx(97) > [External Code] > vclplug_winlo.dll!CAPNDataObject::Release() Line 137 > at C:\lo\core\vcl\win\dtrans\APNDataObject.cxx(137) > vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::release() Line 166 > at C:\lo\core\include\systools\win32\comtools.hxx(166) > vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::~COMReference<IDataObject>() Line 101 > at C:\lo\core\include\systools\win32\comtools.hxx(101) > [External Code] > cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 233 > at C:\lo\core\cppuhelper\source\weak.cxx(233) > vclplug_winlo.dll!cppu::WeakImplHelper<com::sun::star::datatransfer::XTransferable,com::sun::star::datatransfer::XSystemTransferable>::release() Line 115 > at C:\lo\core\include\cppuhelper\implbase.hxx(115) > vclplug_winlo.dll!com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable>::~Reference<com::sun::star::datatransfer::XTransferable>() Line 110 > at C:\lo\core\include\com\sun\star\uno\Reference.hxx(110) > vclplug_winlo.dll!CWinClipboard::~CWinClipboard() Line 73 > at C:\lo\core\vcl\win\dtrans\WinClipboard.cxx(73) > [External Code] > cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 233 > at C:\lo\core\cppuhelper\source\weak.cxx(233) > cppuhelper3MSC.dll!cppu::WeakComponentImplHelperBase::release() Line 86 > at C:\lo\core\cppuhelper\source\implbase.cxx(86) > vclplug_winlo.dll!cppu::PartialWeakComponentImplHelper<com::sun::star::datatransfer::clipboard::XSystemClipboard,com::sun::star::datatransfer::clipboard::XFlushableClipboard,com::sun::star::lang::XServiceInfo>::release() Line 86 > at C:\lo\core\include\cppuhelper\compbase.hxx(86) > vclplug_winlo.dll!rtl::Reference<CWinClipboard>::~Reference<CWinClipboard>() Line 113 > at C:\lo\core\include\rtl\ref.hxx(113) > [External Code] i.e., the static rtl::Reference<CWinClipboard> g_Instance (vcl/win/dtrans/WinClipboard.cxx) introduced by b76e903ccc83d0ccf0c6548782622638dd8a0ee5 "dtrans/clipboard: create instances with uno constructors" still causing the same COM issue during exit. Change-Id: Ib89d37a4fcb4b4a25e552a9dd14a96ade8e40309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103559 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/vclplug_win.component')
-rw-r--r--vcl/vclplug_win.component3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/vclplug_win.component b/vcl/vclplug_win.component
index 907694991895..db79a027510e 100644
--- a/vcl/vclplug_win.component
+++ b/vcl/vclplug_win.component
@@ -42,5 +42,8 @@
<implementation name="com.sun.star.datatransfer.clipboard.ClipboardW32"
constructor="dtrans_CWinClipboard_get_implementation">
<service name="com.sun.star.datatransfer.clipboard.SystemClipboard"/>
+ <!-- Fake singleton so the servicemanager shuts us down and we can clean up our global instance
+ var: -->
+ <singleton name="com.sun.star.datatransfer.clipboard.theSystemClipboard"/>
</implementation>
</component>