JVM problems

Having trouble installing Oxygen? Got a bug to report? Post it all here.
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

JVM problems

Post by galanohan »

Hi Experts!

I'm experiencing this problem when generating webhelp in oxygen xml editor v26:
...
...
# gen-list] Processing file:/D:/doc_en/test200/docs/API/Csharp.md
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff8231d2903, pid=19716, tid=22764
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.8+7 (17.0.8+7) (build 17.0.8+7)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (17.0.8+7, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# V [jvm.dll+0x582903]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\doc_en\test200\hs_err_pid19716.log
#
# Compiler replay data is saved as:
# D:\doc_en\test200\replay_pid19716.log
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
#

The process finished with exit code: 1


Background:I upgraded JAVA to the latest build days ago, right after upgrading oxygen from v25 to 26. And nothing wrong occur until today, I generated a webhelp yesterday, no surprise no back luck ...

I reinstalled the oxygen but the same problem occurred over and over ... kind of confused, isn't that oxygen v26 is compatible with Java 1.8?
hs_err_pid19716.zip
(59.17 KiB) Downloaded 72 times
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: JVM problems

Post by adrian »

Hello,

It appears to be a bug in the Java runtime bundled with Oxygen v26 ( Temurin 17.0.8 ) that affects the Java just-in-time compiler:
Current thread (0x00000240bf9dd6d0): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=22764, stack(0x000000f08b200000,0x000000f08b300000)]

Current CompileTask:
C2: 3515 5565 4 com.vladsch.flexmark.util.ast.Document::getLineNumber (194 bytes)
If you have another Java 17 runtime installed, try to reconfigure the transformation scenario to point to your Java (Advanced tab, Java Home, Custom).
Advanced Tab (DITA-OT Transformations)

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

Re: JVM problems

Post by galanohan »

Hi Adrian,

Thanks for the advice.

Further question about Adoptium open jdk 17 temurin 17.0.8, is that the only JDK oXygen v26 supports? I notice Adoptium's latest Open JDK release is version 21, is it compatible with oXygen v26? I'm not sure the backwards compatibility.

Also, I remember someone for SynchroSoft said in another post that oXygen v26 supports the latest JRE 1.8, does that means the very latest JRE is also supported? Because I updated my JRE this morning...
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

Re: JVM problems

Post by galanohan »

I customized the JAVA HOME to JRE 1.8. then rebuilt the webhelp, the process ended soon with the following error code:

Executing:
...
java.lang.UnsupportedClassVersionError: org/dita/dost/invoker/MainWithCPWildcardExpansion has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:282)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
..
..
..
The process finished with exit code: 2

So, according to the bold text in the error msg above, I must make sure the class file name of JRE installed on my computer is below 52.0. But, which class file is it? And which JRE release does the v52 class file match with? I'm ok with rolling back but I think I need an accurate JRE version to download..
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

Re: JVM problems

Post by galanohan »

I installed the JRE 1.8.0_202 and uninstalled JRE 1.8.0_351, set the file path to JRE 1.8.0_202 as JAVA_HOME and specified it in webhelp scenario/Advanced/Java home, restarted computer and of course oxygen, the same error occurs too.
It seems the configuration over transformation scenario settings doesn't take effect, as the error log shows the oxygen editor calls the open JDK 17.0.8.1 Temurin regardless of the settings.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: JVM problems

Post by adrian »

Hi,
galanohan wrote:Further question about Adoptium open jdk 17 temurin 17.0.8, is that the only JDK oXygen v26 supports? I notice Adoptium's latest Open JDK release is version 21, is it compatible with oXygen v26? I'm not sure the backwards compatibility.
Oxygen v26 requires Java/OpenJDK 17, mainly because of DITA-OT 4.x. DITA-OT 4.x transformations do not work with any lower version.
OpenJDK 21 is not officially supported as we have not tested it properly yet (was released a month ago). DITA-OT 4.x might work with it, but we cannot recommend it at this time, again due to lack of proper testing.
When you customize the Java Home from the transformation scenario you only affect that specific transformation, so Oxygen Java support is irrelevant in this case. Since this is a DITA-OT transformation, it's the DITA-OT 4.x requirements that are important.
galanohan wrote:Also, I remember someone for SynchroSoft said in another post that oXygen v26 supports the latest JRE 1.8, does that means the very latest JRE is also supported?
Not sure where you have read that. On the contrary, Oxygen no longer supports Java 8/1.8 since v25. It was still possible to run Oxygen v25 with Java 8, but since v26 that's no longer technically possible.
To answer your question, no, we support only specific versions of Java. Oxygen v26 officially supports only Java/OpenJDK 17. It does not support either earlier or later versions. We will eventually support OpenJDK 21, but that is for a later version of Oxygen.
galanohan wrote:I customized the JAVA HOME to JRE 1.8. then rebuilt the webhelp, the process ended soon with the following error code:
It does not work with Java 8/1.8 (class file version 52.0) because DITA-OT 4.x has classes compiled with Java 17 (class file version 61.0). So, for DITA-OT 4.x transformations the minimum supported version of Java is 17.
In the last paragraph from my previous post I mentioned " another Java 17 runtime". By that I meant a different distribution/build of Java 17 (other than Temurin 17.0.8 ). If you still have Oxygen v25.1 installed, you can try with the Java runtime (Temurin 17.0.6) from that (Oxygen/jre folder).

I'm not sure if the Java crash you have encountered is an issue specific to Java 17.0.8 or a general issue for all Java 17.0.x builds.
In the end, it won't hurt to also test with OpenJDK 21, if you have that. If it fails with the error "java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release", you will have to also add this to the "JVM arguments" field:

Code: Select all

-Djava.security.manager=allow
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

Re: JVM problems

Post by galanohan »

Hi Adrian,

Thanks for the detailed reply.

I've uninstalled v26 and rolled back to v25.1 to make sure document production is not affected, so far so good. But I'll install v26 again in a separate folder and test OpenJDK v21 or the latest and give it a try.

Exciting!
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: JVM problems

Post by adrian »

Hi,
Actually, if you do install v26.0 side-by-side with v25.1, please try this in v26.0 as the Java Home:
If you still have Oxygen v25.1 installed, you can try with the Java runtime (Temurin 17.0.6) from that (Oxygen/jre folder).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

Re: JVM problems

Post by galanohan »

Hi Adrian,

I had a quick test with oxygen v26+OpenJDK v21 JRE (v21.0.0.35, the latest), it works pretty good so far, no unexpected errors. JAVA_HOME for webhelp transformation scenario was set to \Program Files\Eclipse Adoptium\jre-21.0.0.35-hotspot. Except that SVG cannot be rendered though I've followed the instructions at https://www.oxygenxml.com/doc/versions/ ... l?hl=latex and https://github.com/oxygenxml/dita-latex and configured accordingly.
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

Re: JVM problems

Post by galanohan »

I had another test for SVG in dita topics and webhelp output. Latex formulas can be rendered as SVG by specifying outputclass with embed-latex in foreign element but none of these formulas in SVG format are displayed in webhelp/html output, though I had the following rules in the css file of publishing template:

Code: Select all

.svg-image {
  width: auto;    /* Set the desired width */
  height: auto;    /* Set the desired height or use 'auto' for proportional scaling */
         /* Add any other CSS properties to style the SVG image */
}

*[class ~= "topic/image"] {
        prince-image-resolution: 96dpi;
        -ah-image-resolution: 96dpi;
        image-resolution: 96dpi;
        max-width: 100%;
 }
    
*[class ~= "topic/image"] {

        /* The US-letter page size minus page margins. See p-page-size.css for the current page size. */
        max-width: 6.5in;         
}
    
    *[outputclass ~= "side-by-side"] > *[class ~= "topic/p"] {
  display:inline-block;
  width: 45%;
}  

*[outputclass ~= "side-by-side"] > *[class ~= "topic/fig"] {
  display:inline-block;
  width: 45%;
}  

*[outputclass ~= "side-by-side"] > *[class ~= "topic/fig"]  > *[class ~= "topic/image"] {
  width:100%;
}

*[outputclass ~= "side-by-side"] > *[class ~= "topic/fig"] {  
  vertical-align:top;
  font-size:0pt;  
}
Browsers are: Chrome and Edge. Operating system: Win 11
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

Re: JVM problems

Post by galanohan »

I also installed this plugin:https://www.dita-ot.org/plugins/org.dit ... ge-convert
\frameworks\dita\DITA-OT3.x\bin> dita install org.dita-semia.image-convert
Added org.dita-semia.image-convert

Will this plugin contradict with com.oxygenxml.latex.svg?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: JVM problems

Post by Radu »

Hi,
I assume you installed in the DITA OT this plugin I previously created:
https://github.com/oxygenxml/dita-latex
How about if you start a different forum post to discuss about Latex and SVGs? Maybe you can give a small example there showing a small DITA topic with a latex equation inside for which the publishing does not work.
About this remark:
Will this plugin contradict with com.oxygenxml.latex.svg?
I do not know how my plugin interacts with any other plugin created by someone else, but this can be easily tested, just uninstall the other plugin and then see if the publishing works better.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
galanohan
Posts: 115
Joined: Mon Jul 10, 2023 11:49 am

Re: JVM problems

Post by galanohan »

Yes, I installed the dita-latex plugin you developed some months ago.
Sure! I can provide a sample dita topic file in another post, thanks Radu!
Post Reply