serval2412 at yahoo.fr
Fri May 29 14:41:52 UTC 2020
On Win10 with master sources updated today, I noticed this log:
CoInitializeEx failed (expectedly): Cannot change thread mode after it is
Thread is in a main single-threaded apartment.
To investigate about this, I first changed all calls to CoInitialize towards
(as indicated in first patch:
Moreover, it'll make concurrency model explicit")
So now, I check if there's a call to CoUnInitialize for each CoInitializeEx
and I noticed this:
61 CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
I thought about removing line 61 (the reinit with CoInitializeEx) in dtr.
Indeed if a component needs to initialize COM library, I suppose it should
be its responsability.
However, I wonder if a thread which would have already initialized COM
library could call ADO part and so would expect that when ADO finished its
job, to have COM still initialized.
But even in this case, it could be wrong since ADO dtr always uses
"COINIT_APARTMENTTHREADED" and perhaps the caller thread uses another
Any thoughts here?
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
More information about the LibreOffice