Hi Sergey, Am Donnerstag, den 08.02.2018, 13:58 -0800 schrieb Sergey Bylokhov: > Hi, Matthias. > Did you have a chance to find why this code works on jdk8u152(this is > reported in the bug description).
sorry - know idea. I found several leads (clrthreadattribute, clr switch, default COM initialization), but nothing that explains this behavioural change from JDK8 to JDK9/10. The changelist VS2013 does not explicitly state something I would connect to this. Greetings, Matthias > On 08/02/2018 10:32, Matthias Bläsing wrote: > > Hi all, > > > > last month I saw the message from Reinhard Pointer on this list: > > > > http://mail.openjdk.java.net/pipermail/swing-dev/2018-January/008132.html > > > > referring to this bug: > > > > https://bugs.openjdk.java.net/browse/JDK-8189938 > > > > With the instructions given in: > > > > https://bugs.openjdk.java.net/browse/JDK-8193928 (closed as duplicate of > > JDK-8189938) > > > > I was able to reproduce the problem on a clean Windows 10 Installation, > > as described in the initial report. > > > > The resulting exception leads to my proposed fix: > > > > Could not initialize COM: HRESULT=0x80010106 > > > > That HRESULT translates to: RPC_E_CHANGED_MODE > > > > This means, that the COM subsystem is already initialized, but with a > > different mode. The code uses CoInitialize and this initializes the > > threading module to be apartment threaded. The above HRESULT means the > > thread was already initialized to be multi-threaded. > > > > The mode can't be changed after is was set once, so instead of bailing > > out, I suggest to accept the situation and initialize to be multi- > > threaded.
