Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception Access Violation causing jvm crash after updating flatlaf version to 3.1(3.1.1) #673

Closed
liucunjie opened this issue Apr 30, 2023 · 4 comments
Milestone

Comments

@liucunjie
Copy link

Our program works fine on flatlaf v3.0, But jvm crash occurred after updating to 3.1 or 3.1.1. I can't pinpoint the problem. Any ideas are appreciated.
OS:windows 10
JVM: 1.8
hs_err_pid12916.log

@DevCharly
Copy link
Collaborator

Strange that it works with FlatLaf 3.0 but crashes with 3.1 because there is actually nearly no changes in native code regarding window decorations from 3.0 to 3.1. Only added new native methods. See commit 07ad467#diff-0393d6d30e320a47e5a348543e9382b73ddee2bfa56889beb3c9d4c88a3be8fd

And the used JRE and PC are the same in both cases?

Does it work with Java 11 or any other newer Java version?

@liucunjie
Copy link
Author

Thank you for giving suggestion. Thanks a lot :)
It worked after upgrading jre 8 to 11

Yes, all the test on the same JRE and PC.

@DevCharly
Copy link
Collaborator

Finally was able to reproduce the crash 😄

Occurs under following conditions:

  • on Windows 10/11
  • and application runs in Java 8 (but older than 8u321)
  • and newer Java version (e.g. 11) is installed and added to PATH environment variable
  • and using class SystemInfo before AWT initialization

The problem is that awt.dll from Java 11+ is loaded, via PATH variable, into Java 8, which causes the crash.

This can be seen in your log where awt.dll is loaded from Eclipse JRE 17 and from Java 8:

image

Here is the PATH from your log:

image

DevCharly added a commit that referenced this issue Jul 1, 2023
DevCharly added a commit that referenced this issue Jul 1, 2023
built by GitHub Actions:
https://github.com/JFormDesigner/FlatLaf/actions/runs/5431957508

locally signed Windows DLLs with FormDev Software GmbH code signing certificate
@DevCharly
Copy link
Collaborator

fixed in latest 3.2-SNAPSHOT: https://github.com/JFormDesigner/FlatLaf#snapshots

@DevCharly DevCharly added this to the 3.2 milestone Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants