I built a new PC with an AMD Ryzen 5600 (which has an Integrated Radeon Graphics Card) CPU and an Nvidia RTX 4070 Ti as my GPU (Windows 10).
I cloned the template and selected Amazon-Coretto 19 as the JDK. The build was fine.
Upon starting, the JVM immediately crashes:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffef9352b60, pid=6828, tid=1108
#
# JRE version: OpenJDK Runtime Environment Corretto-19.0.2.7.1 (19.0.2+7) (build 19.0.2+7-FR)
# Java VM: OpenJDK 64-Bit Server VM Corretto-19.0.2.7.1 (19.0.2+7-FR, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C [atio6axx.dll+0x192b60]
This is similar to this issue.
However, after updating my AMD and Nvidia drivers the issue didn’t go away.
The line with windows-amd64 makes me suspicious that I am still using the ICG.
Disabling the ICG in my device settings, so that only my Nvidia GPU could possibly be use, circumvented the hard crash and instead lead to “window couldn’t be created”.
I figured out two separate problems, which I was able to solve and like to share
Why is OPENRNDR crashing with EXCEPTION_ACCESS_VIOLATION ?
→ This is a driver issue of your GPU/CPU misinterpreting memory allocation.
In my case, the Windows Update only updated the latest drivers for my BIOS version (MSI B550 from 2019). I went to the MSI site where I downloaded the latest B550 BIOS and flashed it. Afterward a restart, I got a popup for new AMD drivers and was able to update it.
Why is OPENRNDR using the wrong GPU ?
→ If you have multiple GPUs you can either select it in the Nvidia Control Panel, AMD Radeon Settings (or whatever Intel is using for their Arc series graphics cards) or potentially the Windows “Graphics Settings”.
I had the trickier setup with an Nvidia and an AMD on the same computer, so neither vendor menu saw the other’s GPU. I always started with the drastically less performant one: OpenGL renderer: AMD Radeon(TM) Graphics
I took the command that starts the application (the first line in the terminal when running in IntelliJ) which tells you which executable is used: C:\Users\Lukas\.jdks\corretto-19.0.2\bin\java.exe …
In the Windows Graphics Settings, I added it to my preference list and selected the GPU manually.
Thanks to @Abe for the support <3
I also liked the hint with trying out the Demo suite for LWJGL 3. It clears your mind from your project crashing specifically - most of the examples crashed too. It was an hardware issue.
I’m so happy to be back to working on my stuff !
Just to add 2 cents, I had a similar problems (on win11) with AMD wx3200 with pro drivers crashing openrndr programs. Initialy I blamed lack of support for latest version of JDK by lwjgl3 but yesterday installing the latest Adrenalin driver solved issue. This actually might be something with native code on lwjgl side that AMD doesn’t like as I’ve been recently messing with new Java native api (writing some custom bindings to raylib and abusing it quite heavly) and I haven’t seen single crash.