Menu

#208 Application crash after installing LibericaJDK

3.x
open
nobody
None
5
2021-02-21
2020-09-28
No

OS: Windows 10 Pro x64 version 10.0.18362
Steps to reproduce:
* uninstall Oracle JRE/JDK
* install OpenJDK from AdoptOpenJDK (don't know whether is required step)
* install LibericaJDK (https://libericajdk.ru/pages/java-8u265/)
* run executable created by Launch4j (or by launch4j-maven-plugin) without bundled jre
Expected result: started child process java.exe
Actual result: two child processes created: executable itself and WerFault.exe, the latter reports application crash to user. Five events are logged to Windows Journal (see attachment).

Investigation:
Running application with --l4j-debug parameter produces the empty launch4j.log file. Seems like error on early initialization phase.
Here is the last ProcMon lines before crash:

21:35:37,4316316    javaApp.exe 8100    RegCloseKey HKLM\SOFTWARE\JavaSoft\Java Development Kit\8.0.265.01  SUCCESS 
21:35:37,4316465    javaApp.exe 8100    RegEnumKey  HKLM\SOFTWARE\JavaSoft\Java Development Kit NO MORE ENTRIES Index: 2, Length: 288
21:35:37,4316601    javaApp.exe 8100    RegCloseKey HKLM\SOFTWARE\JavaSoft\Java Development Kit SUCCESS 
21:35:37,4316785    javaApp.exe 8100    RegQueryKey HKLM    SUCCESS Query: HandleTags, HandleTags: 0x0
21:35:37,4316921    javaApp.exe 8100    RegOpenKey  HKLM\SOFTWARE\JavaSoft\JRE  NAME NOT FOUND  Desired Access: Read
21:35:37,4317209    javaApp.exe 8100    RegQueryKey HKLM    SUCCESS Query: HandleTags, HandleTags: 0x0
21:35:37,4317319    javaApp.exe 8100    RegOpenKey  HKLM\SOFTWARE\JavaSoft\JDK  SUCCESS Desired Access: Read
21:35:37,4317538    javaApp.exe 8100    RegSetInfoKey   HKLM\SOFTWARE\JavaSoft\JDK  SUCCESS KeySetInformationClass: KeySetHandleTagsInformation, Length: 0
21:35:37,4317646    javaApp.exe 8100    RegEnumKey  HKLM\SOFTWARE\JavaSoft\JDK  SUCCESS Index: 0, Name: 8u265+1
21:35:37,9426482    javaApp.exe 8100    Process Create  C:\WINDOWS\SysWOW64\WerFault.exe    SUCCESS PID: 5192, Command line: C:\WINDOWS\SysWOW64\WerFault.exe -u -p 8100 -s 540
21:35:39,3798318    javaApp.exe 8100    Process Create  C:\WINDOWS\SysWOW64\WerFault.exe    SUCCESS PID: 5000, Command line: C:\WINDOWS\SysWOW64\WerFault.exe -u -p 8100 -s 516

Seems like something wrong with content parse of registry key HKLM\SOFTWARE\JavaSoft\JDK. Here is the registry key content:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK]
"CurrentVersion"="8u265+1"

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\8u265+1]
"JavaHome"="C:\\Program Files\\LibericaJDK\\jdk-8.0.265.01\\"
"RuntimeLib"="C:\\Program Files\\LibericaJDK\\jdk-8.0.265.01\\bin\\server\\jvm.dll"

Also, removing the registry key HKLM\SOFTWARE\JavaSoft\JDK leads to the normal start of the executable created by Launch4j (java.exe from AdoptOpenJDK used). After recovering the registry key, crash comes back.

Launch4j configuration is:

<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
  <dontWrapJar>false</dontWrapJar>
  <headerType>console</headerType>
  <jar>javaApp.jar</jar>
  <outfile>javaApp.exe</outfile>
  <errTitle></errTitle>
  <cmdLine></cmdLine>
  <chdir>.</chdir>
  <priority>normal</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl></supportUrl>
  <stayAlive>false</stayAlive>
  <restartOnCrash>false</restartOnCrash>
  <manifest></manifest>
  <icon>database-add.ico</icon>
  <jre>
    <bundledJre64Bit>false</bundledJre64Bit>
    <bundledJreAsFallback>false</bundledJreAsFallback>
    <minVersion>1.8.0_00</minVersion>
    <maxVersion></maxVersion>
    <jdkPreference>preferJre</jdkPreference>
    <runtimeBits>64/32</runtimeBits>
  </jre>
</launch4jConfig>
1 Attachments

Discussion

  • r_x

    r_x - 2021-01-26

    If the log is empty I would use the parameter --l4j-debug-all instead of --l4j-debug.

    --l4j-debug-all activates the logging verbose mode.

     
    • Andrey Marinchuk

      No changes: log file is empty with --l4j-debug-all.
      Seems like, the problem is due to the format of version (8u265+1), launch4j expects another format and not checking the format conformance.

       

      Last edit: Andrey Marinchuk 2021-02-21

Log in to post a comment.