Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix / Use CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) #68

Merged
merged 1 commit into from
May 19, 2023

Conversation

markmaker
Copy link

Description

On Windows Java 17 uses COM to provide Desktop functionality. Because COM has an inherently bad design, every library inside one process must conform in its use of COM. See:

https://bugs.openjdk.org/browse/JDK-8270269

Hence, in openpnp-capture we must equally use

CoInitializeEx(NULL, COINIT_APARTMENTTHREADED)

I do not know if this really helps. It could be that in turn Java 11 now breaks. I have still haven't found the time to find out how to locally deploy it into OpenPnP (this PR is what I can quickly offer).

Justification

See:
openpnp/openpnp#1560

Implementation Details

Tested with win/test/openpnp-capture-test.exe. Still works.

@vonnieda vonnieda merged commit 8badbba into openpnp:master May 19, 2023
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants