Page 1 of 1

Firts try with OpenJDK on X86 ends in crash

Posted: Wed Sep 13, 2023 2:15 am
by joukj
My fist try with OpenJDK on X86 ended with a fatal error. (see the attached .log file)

Re: Firts try with OpenJDK on X86 ends in crash

Posted: Wed Sep 13, 2023 7:57 am
by arne_v
Looks like your Java application is a GUI application (Swing).

I have seen several reports here about problems with DECWindows from C/C++.

If there is a problem with DECWindows then it obviously impact Java Swing as well.

Re: Firts try with OpenJDK on X86 ends in crash

Posted: Thu Sep 14, 2023 1:53 am
by pustovetov
joukj wrote:
Wed Sep 13, 2023 2:15 am
My fist try with OpenJDK on X86 ended with a fatal error. (see the attached .log file)
Thank you for the bug report. The Java_sun_awt_X11_XlibWrapper_XGetWindowProperty routine looks really suspicious. Perhaps once again an attempt to pass a 64-bit address to a 32-bit function. I'll create a ticket and try to fix it.
p.s. But perhaps the error is not in OpenJDK but in DECWindows.

Re: Firts try with OpenJDK on X86 ends in crash

Posted: Thu Sep 14, 2023 6:02 am
by joukj
Normally C and Decwindows works
I have a lot of problems (not working) with C++ code calling Decwindows.

Re: Firts try with OpenJDK on X86 ends in crash

Posted: Thu Sep 14, 2023 3:31 pm
by arne_v
The native part of the Java runtime is 2/3 C++ and 1/3 C I believe, but I have no idea whether the AWT portion of that is C++ or C.

Re: Firts try with OpenJDK on X86 ends in crash

Posted: Sun Sep 17, 2023 6:30 pm
by jreagan
We're looking at the DECwindows issues. Various headers use "long" and the difference in size between C and C++.

Re: Firts try with OpenJDK on X86 ends in crash

Posted: Mon Sep 18, 2023 2:48 am
by pustovetov
arne_v wrote:
Thu Sep 14, 2023 3:31 pm
The native part of the Java runtime is 2/3 C++ and 1/3 C I believe, but I have no idea whether the AWT portion of that is C++ or C.
The AWT is written in C. So this was not an issue with the DECWindows headers in the new C++. This is an old error that should have crashed OpenJDK on IA64 as well. 64-bit pointers were passed to the XGetWindowProperty and XQueryTree functions instead of 32-bit ones. I've fixed the bugs.

Added in 5 hours 11 minutes 30 seconds:
No, I was wrong. Our OpenJDK IA64 version always uses the _malloc32 routine when doing unsafe.allocateMemory(xxxx).
Therefore, the XGetWindowProperty routine does not crash on IA64. Because on IA64 our OpenJDK is not fully 64-bit.

Re: Firts try with OpenJDK on X86 ends in crash

Posted: Wed Oct 18, 2023 4:23 am
by pustovetov
The next test version of the JDK - 372B - has been released. In it, we corrected many errors with XWindows, so I hope the error has been fixed.

Re: Firts try with OpenJDK on X86 ends in crash

Posted: Wed Oct 18, 2023 4:35 am
by joukj
Confirm, I can now successfuly run the DLS program to calculate Cricket targets. Fine that it works during the curent World cup in India.