AdoptOpenJDK / AdoptOpenJDK/IcedTea-Web

WebStart and SWT on macOS

Aberta
#844 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Java
Estrelas
268
Forks
96
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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?

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.