AdoptOpenJDK / AdoptOpenJDK/IcedTea-Web

WebStart and SWT on macOS

オープン
#844 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
268
フォーク
96
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello community. I have an issue with launching my app on macOS with WebStart. It uses SWT framework which requires "-XstartOnFirstThread" VM argument when running on macOS. At the same time the application works fine if running directly, so the issue seems in the WebStart. Last time SWT and WebStart were working fine on Java 8 prior to macOS Big Sur 11.0.1.

I am using OpenWebStart 1.4.0 with built-in IcedTeaWeb 1.8.6, Adopt OpenJDK 11.0.13/17.0.35 and macOS Monterey 12.0.1

Here is a small SWT jnlp app to easily reproduce the issue. Issue is only presented on macOS. (zipped jnlp)
[test.zip](https://github.com/AdoptOpenJDK/IcedTea-Web/files/7604335/test.zip)
The jnlp sources are in the repo: https://github.com/torchwood1715/swt-test/tree/main/jnlp

The issue is that IcedTeaWeb stucks on startup even before the application code is run. Here is thread-dump:
[threadDump.txt](https://github.com/AdoptOpenJDK/IcedTea-Web/files/7604353/threadDump.txt) and OpenWebStart logs from IcedTeaWeb [2021-11-25_185058.805-ows-stage1.log](https://github.com/AdoptOpenJDK/IcedTea-Web/files/7604356/2021-11-25_18.50.58.805-ows-stage1.log) , [2021-11-25_185058.805-ows-stage2.log](https://github.com/AdoptOpenJDK/IcedTea-Web/files/7604357/2021-11-25_18.50.58.805-ows-stage2.log).

It looks like AWT initialization hangs if -XstartOnFirstThread parameter is used. It is possible to bypass this by using -Djava.awt.headless parameter. But then SWT fails with InvalidThreadAccess exeption, which means -XstartOnFirstThread parameter is not completely honored, and the application was started in not main thread. Does anyone have idea how to fix this?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。