Open k-x7 opened 1 year ago
Hi, Thank you for reporting this issue, this is tracked internally on GR 42292.
experiencing similar issue (win and macos)
@oubidar-Abderrahim is there any update?
@oubidar-Abderrahim is there any update?
The team is still investigating the issue.
any update you may have would be greatly appreciated
Hi @k-x7
we are currently working on #4921 to quite generally improve support for AWT and related technologies. Once that is merged (work is in progress already, so expect that to be merged in the next months, but no definite ETA), we will have a look at this. Could easily be affected by the current changes so we will have a look once the major changes are in.
-- Christian
any updates on this?? Facing similar issue while using a dependency that relies on awt. Even tried it with the latest graalvm dev builds, doesn't work. The issue described by @k-x7 is still reproducible with:
native-image 23 2024-09-17
GraalVM Runtime Environment GraalVM CE 23-dev+24.1 (build 23+24-jvmci-b01)
Substrate VM GraalVM CE 23-dev+24.1 (build 23+24, serial gc)
Describe the issue I have created a small shared lib using native image, which call
ImageIO.read(...)
. when I callgraal_tear_down_isolate
from the C code the program will not return anything after printing an error :My assumption is Disposer when the thread interrupted it will just print the error and call
wait()
somewhere else, which will stuck in waiting state or the infinite while loop.I tried to get
Java2D Disposer
thread and callinterrupt()
many times without success.Steps to reproduce the issue
GetImageInfo.java
:import javax.imageio.ImageIO;
import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException;
public class GetImageInfo {
}
javac GetImageInfo.java
java -agentlib:native-image-agent=config-output-dir=META-INF/native-image GetImageInfo PATH_TO_ANY_IMAGE.jpg
loading img in path: sample.jpg Height: 720, Width: 1200
native-image -H:Name=libgetimageinfo GetImageInfo --shared
compile
main.c
:run
main
:[*] using libgetimageinfo centrypoint: loading img in path: qrcode.jpg Height: 720, Width: 1200 Exception while removing reference.
ps -T -p $(pidof main)
1091924 1091924 pts/12 00:02:43 main 1091924 1091931 pts/12 00:00:00 Java2D Disposer
openjdk version "17.0.5" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08, mixed mode, sharing)
openjdk 19 2022-09-20 OpenJDK Runtime Environment GraalVM CE 23.0.0-dev (build 19+36-jvmci-23.0-b01) OpenJDK 64-Bit Server VM GraalVM CE 23.0.0-dev (build 19+36-jvmci-23.0-b01, mixed mode, sharing)