LWJGL / lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
https://www.lwjgl.org
BSD 3-Clause "New" or "Revised" License
4.67k stars 628 forks source link

EXCEPTION_ACCESS_VIOLATION in a JNI call #836

Closed Frontear closed 1 year ago

Frontear commented 1 year ago

Version

3.3.1

Platform

Windows x64

JDK

OpenJDK Runtime Environment Microsoft-32931 (17.0.3+7) (build 17.0.3+7-LTS)

Module

GLFW bindings

Bug description

This issue was reported over to me from a user in our discord. Upon running their Minecraft game, it proceeded to crash relatively quickly, citing atio6axx.dll, which is an amd dll used by their gpu. I went ahead and reported the issue to MS in #361 because it seems to relate heavily to an issue that occured a few days prior, but with an NVIDIA driver instead (was not related to LWJGL). This issue specifically arises when LWJGL attempts to invoke glfwCreateWindow, crashing with an exception access violation.

Relevant JVM dump: hs_err_pid8924.log

Stacktrace or crash log output

No response

Spasi commented 1 year ago

Hey @Frontear,

Issues like this are impossible to diagnose from our side. Also, it's almost certain not a bug in LWJGL, but rather one or more of the following:

In any case, we won't be able to provide any help without more information or at least a way to reproduce the crash.

Frontear commented 1 year ago

Hi,

After doing some digging, it seems entirely related to MS OpenJDK. Many users have reported having JVM crashes, and the dll responsible is more often than not jvm.dll. So far there has been 5+ reports with almost identical traces all linking back to the jvm.dll, and the fact that they use ms openjdk. Switching to eclipse adoptium releases completely resolves all these issues.

ArcaneSunku commented 1 year ago

I know this is closed, but I'm not entirely what is the certainty that it is related to MS OpenJDK as I got the very same error for Minecraft modding (I use eclipse adoptium OpenJDK) with the ati6xx.dll which is an AMD related driver. It has been confirmed many times on the Minecraft Forge forums that it is AMD's issue, not Microsoft's JVM. When it is jvm.dll it might be, but his error log clearly states an AMD driver.

The solution for this was always going back to a compatible driver.

Edit: Sorry for the edits, I thought I'd leave links to back up my claim

My initial post w/ discussion

Same issue, being confirmed that going to different drivers works