[Libreoffice-bugs] [Bug 129930] New: CMtaOleClipboard::m_hClipboardChangedNotifierThread still running during cppuhelper::ServiceManager::disposing
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Jan 10 15:22:55 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=129930
Bug ID: 129930
Summary: CMtaOleClipboard::m_hClipboardChangedNotifierThread
still running during
cppuhelper::ServiceManager::disposing
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: sbergman at redhat.com
<https://crashreport.libreoffice.org/stats/signature/TypeDescriptor_Init_Impl::getMutex()>
lists lots of various LO 6.* crashes on Windows. One specific example is
<https://crashreport.libreoffice.org/stats/crash_details/357f73fc-5cb0-4ec3-84ce-fae571afe3a2>:
The crashing thread apparently runs a
CMtaOleClipboard::m_hClipboardChangedNotifierThread
CMtaOleClipboard::clipboardChangedNotifierThreadProc
(dtrans/source/win32/clipb/MtaOleClipb.cxx:676). It calls
com::sun::star::datatransfer::DataFormatTranslator::create to create that UNO
service from a CDataFormatTranslator ctor
(dtrans/source/win32/dtobj/DataFmtTransl.cxx:58), which fails throwing a
com::sun::star::uno::DeploymentException.
The reason for that failure appears to be that LO is already terminating in
thread 0, where it is in cppuhelper::ServiceManager::disposing
(cppuhelper/source/servicemanager.cxx:833) already (so no new UNO services can
be created any longer).
Looking at the code of at least current master (towards LO 6.5):
* I assume the thread represented by
CMtaOleClipboard::m_hClipboardChangedNotifierThread will get terminated by the
> sal_uInt32 dwResult = WaitForSingleObject(
> m_hClipboardChangedNotifierThread, MAX_WAIT_SHUTDOWN );
[...]
> if ( nullptr != m_hClipboardChangedNotifierThread )
> CloseHandle( m_hClipboardChangedNotifierThread );
code in the ~CMtaOleClipboard dtor (dtrans/source/win32/clipb/MtaOleClipb.cxx).
* The CMtaOleClipboard instance is held as CWinClipbImpl::m_MtaOleClipboard
member (dtrans/source/win32/clipb/WinClipbImpl.hxx).
* The CWinClipbImpl instance in turn is held (via std::unique_ptr) as
CWinClipboard::m_pImpl member (dtrans/source/win32/clipb/WinClipboard.hxx). It
will be destroyed by the
> m_pImpl.reset();
code in CWinClipboard::disposing (dtrans/source/win32/clipb/WinClipboard.cxx).
* But CWinClipboard is itself a UNO service
(com.sun.star.datatransfer.clipboard.SystemClipboard) whose disposing() is only
called during cppuhelper::ServiceManager::disposing.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200110/18c34ac2/attachment.htm>
More information about the Libreoffice-bugs
mailing list