<AWT Dev> RFR: 6508941: java.awt.Desktop.open causes VM to crash with video files sporadically

Alexey Ivanov aivanov at openjdk.java.net
Tue Dec 1 20:00:56 UTC 2020

On Sat, 21 Nov 2020 21:59:28 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> The report of this bug quite outdated so can be closed but I found that in the documentation:
> https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea
>> Because ShellExecute can delegate execution to Shell extensions (data sources, context menu handlers, verb implementations) that are activated using Component Object Model (COM), COM should be initialized before ShellExecute is called. Some Shell extensions require the COM single-threaded apartment (STA) type. In that case, COM should be initialized as shown here: CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)
> But this CoInitializeEx is missed in the Desktop class. Absent of this initialization caused some other crashes in past, see JDK-6950553 for example:
> https://bugs.openjdk.java.net/browse/JDK-6950553

Marked as reviewed by aivanov (Reviewer).


PR: https://git.openjdk.java.net/jdk/pull/1369

More information about the awt-dev mailing list