oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.21k stars 1.62k forks source link

NativeImage AWT Lock Fail Issue for JAWT_DrawingSurface #5319

Closed ksbaydar closed 10 months ago

ksbaydar commented 1 year ago

Hi, I have trouble in native image conversion of an app using JAWT. I tried to convert the simple app given at openjdk-jdk11/jawt.h at master · AdoptOpenJDK/openjdk-jdk11 (github.com).

I am getting JAWT_LOCK_ERROR. I have to work in local premises so just I am able to share the following demo project. I have tried this app with Graal VM 22.2 ce and GraalVM 22.3 ee.

jawt-test-demo.zip

I have searched the GraalVM docs but maybe I am missing some point which GraalVM native image could not support.

Thank you in advance for your helps

Serhat

oubidar-Abderrahim commented 1 year ago

Hi, thank you for reaching out with this, could you please share the reproducer as a Github repository? also please specify what OS & architecture you're using, and the full stacktrace of the error.

ksbaydar commented 1 year ago

Hi, Redhat EL Release 8.5, X86 64 Bit Graal VM EE 22.3 I have put simple sample please find in the following link. ksbaydar/jawt-graalvm (github.com) https://github.com/ksbaydar/jawt-graalvm

I was able to compile it to binary. When I run it, it failed with jawt lock failure. It is really so simple. My goal is to convert an app using old version jogl library. I have been struggling with this more than one month. First I thought is was due to the lib itself. It is well known and widely used but it is old-fashi build structure and lib relation. After lot of efforts, the root cause might seem to awt native conversion problem. When you want to paint your widget with using JAWT access through JNI, awt_DrawingSurface lock fails.

I have looked GraalVM source code with AWT JNI registration part. I have seen many unsupported operations. But I could not make a relation which substitution leads to this.

Thank you very much in advance Best regards Serhat

4 Kas 2022 Cum, saat 16:17 tarihinde Abderrahim Oubidar < @.***> şunu yazdı:

Hi, thank you for reaching out with this, could you please share the reproducer as a Github repository? also please specify what OS & architecture you're using?

— Reply to this email directly, view it on GitHub https://github.com/oracle/graal/issues/5319#issuecomment-1303528883, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN7ERXYQRNKRYBMKMFDEP3WGUEIFANCNFSM6AAAAAARSJLN3E . You are receiving this because you authored the thread.Message ID: @.***>

oubidar-Abderrahim commented 1 year ago

Running the example only produces this

...
echo -e "Main-Class: HelloJAWTWorld" >> META-INF/MANIFEST.MF
jar cfm bin/HelloJAWTWorld.jar ./META-INF/MANIFEST.MF -C classes/ . >/dev/null 2>&1
gmake: *** [Makefile:53: HelloJAWTWorld.jar] Error 1

How to get to the error? can you provide steps to reproduce in detail with the prerequisites that I should have?

oubidar-Abderrahim commented 1 year ago

Any updates?

ksbaydar commented 1 year ago

Sorry about late response. I am struggling with [REDACTED].

Note: @oubidar-Abderrahim edited this comment to remove personal information.

I will give you more details but please give me some time.

I am really sorry for this. Thank you very much in advance.

On Tue, Nov 22, 2022 at 6:34 PM Abderrahim Oubidar @.***> wrote:

Running the example only produces this

... echo -e "Main-Class: HelloJAWTWorld" >> META-INF/MANIFEST.MF jar cfm bin/HelloJAWTWorld.jar ./META-INF/MANIFEST.MF -C classes/ . >/dev/null 2>&1 gmake: *** [Makefile:53: HelloJAWTWorld.jar] Error 1

How to get to the error? can you provide steps to reproduce in details with prerequisites that I should have?

— Reply to this email directly, view it on GitHub https://github.com/oracle/graal/issues/5319#issuecomment-1323863304, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN7ERTWU7C7QL7Q4K5UDC3WJTRZVANCNFSM6AAAAAARSJLN3E . You are receiving this because you authored the thread.Message ID: @.***>

ksbaydar commented 1 year ago

Hi Mr.Abderrahim, I just want to inform my situation. I hope my previous message is not public. If so, please delete or hide my message I do not want that message to be seen in public.

On Mon, Dec 12, 2022 at 8:36 PM Ozi Baydar YT @.***> wrote:

Sorry about late response. I am struggling with health problems of my father who has serious lung cancer. This made me really frustrated and I had to make some break. I will give you more details but please give me some time.

I am really sorry for this. Thank you very much in advance.

On Tue, Nov 22, 2022 at 6:34 PM Abderrahim Oubidar < @.***> wrote:

Running the example only produces this

... echo -e "Main-Class: HelloJAWTWorld" >> META-INF/MANIFEST.MF jar cfm bin/HelloJAWTWorld.jar ./META-INF/MANIFEST.MF -C classes/ . >/dev/null 2>&1 gmake: *** [Makefile:53: HelloJAWTWorld.jar] Error 1

How to get to the error? can you provide steps to reproduce in details with prerequisites that I should have?

— Reply to this email directly, view it on GitHub https://github.com/oracle/graal/issues/5319#issuecomment-1323863304, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN7ERTWU7C7QL7Q4K5UDC3WJTRZVANCNFSM6AAAAAARSJLN3E . You are receiving this because you authored the thread.Message ID: @.***>

oubidar-Abderrahim commented 10 months ago

Closing this issue for inactivity. if you or someone else is facing the same issue but on our latest versions, please create a new issue. Thank you.