JVM access violation
See original GitHub issueI’ve only seen this once in months of using FlatLAF so it’s not a blocker. Unfortunately, it’s not possible to pin down exactly what was happening at the time, my application was in the midst of a complex MVC operation. The version of FlatLAF that I was using was version 1.2
Best wishes
Craige
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffbdb5614cc, pid=17016, tid=10532
#
# JRE version: OpenJDK Runtime Environment AdoptOpenJDK (11.0.8+10) (build 11.0.8+10)
# Java VM: OpenJDK 64-Bit Server VM AdoptOpenJDK (11.0.8+10, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C [flatlaf-windows-x86_64-59421262876000.dll+0x14cc]
#
# 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:
# N:\ReleaseWorkspace\master\almasw\OBSPREP\ObservingTool\hs_err_pid17016.log
#
# If you would like to submit a bug report, please visit:
# https://github.com/AdoptOpenJDK/openjdk-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
null - Possible causes of Java VM ...
When a Java VM crashes with an EXCEPTION_ACCESS_VIOLATION and produces an hs_err_pidXXX.log file, what does that indicate? The error itself is basically a ......
Read more >JVM crashes with EXCEPTION_ACCESS_VIOLATION #2091
What did you see instead? The JVM crashed after a few seconds with. # # A fatal error has been detected by the...
Read more >5.1 Determine Where the Crash Occurred
In some cases a bug in a native library manifests itself as a crash in Java VM code. Consider the crash in Example...
Read more >Exception Access Violation in JRE - Google Groups
Hi, I installed Beagle and Beast today and so far have not been able to complete a successful run. Whilst I can convert...
Read more >Matlab access violation on startup - MathWorks
I've recently run into a problem where Matlab suffers an access violation every time I try to start it (first section of crash...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Had no luck reproducing this. Tried all kinds of things with my mouse cursor that I could think of.
Although the crash addresses in the two logs are different, the crash happens at the same code location. Craige’s log uses a slightly older DLL, but the disassembled code is the same at the two addresses.
Code in
flatlaf-windows-x86_64.dll
at address1661
(disassembled using DUMPBIN):Both logs report “access violation to address
0x20
”:This matches the first instruction above. Register
rsi
is zero.To find the source code for this, I’ve also disassembled
FlatWndProc.obj
(built with gradle) and searched for the first instruction. Found it at the end of C++ methodFlatWndProc::WindowProc()
:This is the C++ line of the crashes: https://github.com/JFormDesigner/FlatLaf/blob/60e5861de454f4a77c748dc317f023d7c197e06e/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.cpp#L211
mov rcx,qword ptr [rsi+20h]
seems to load fieldFlatWndProc::defaultWndProc
to registerrcx
, which is used to pass first parameter to methodCallWindowProc
(see x64 calling convention). Registerrsi
is used for C++this
in this method and is zero. The reason for this must be that the window proc is called with a unknown (probably destroyed)hwnd
, thenfwp
becomesnull
and the app crashes.https://github.com/JFormDesigner/FlatLaf/blob/60e5861de454f4a77c748dc317f023d7c197e06e/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.cpp#L178-L179
What window message was sent? Since
uMsg
is passed as 3rd parameter toCallWindowProc()
, it will be passed in registerr8
(r8d
is lower 32 bit ofr8
; see x64 Architecture), which is loaded at address1665
withmov r8d,ebx
. Registerebx
is lower 32 bit ofrbx
.rbx
is zero in Craige’s log, which is message WM_NULL. In Marcel’s logrbx
is0x00000000000002a2
, which is message WM_NCMOUSELEAVE.Anyway, was not able to reproduce a crash. So will add a
NULL
check to avoid that crash.