GTNewHorizons / lwjgl3ify

A mod to run Minecraft 1.7.10 using LWJGL3 and Java 17+
GNU Lesser General Public License v3.0
170 stars 37 forks source link

OpenAL bindings don't accept null arguments #100

Closed makamys closed 10 months ago

makamys commented 12 months ago

In LWJGL2, the bindings convert null arguments into 0's. LWJGL3ify instead tries to unconditionally access their fields, causing an exception.

This happens with ArchaicFix on startup for example. (Fortunately it doesn't cause a crash.)

[Default Sound Device Checker/ERROR] [ArchaicFix]: An exception occured while checking sound device status
java.lang.NullPointerException: Cannot read field "device" because "device" is null
    at org.lwjglx.openal.ALC10.alcGetString(ALC10.java:91) ~[lwjgl3ify-1.5.7.jar:?]
    at org.embeddedt.archaicfix.helpers.SoundDeviceThread.getDefault(SoundDeviceThread.java:23) ~[SoundDeviceThread.class:?]
    at org.embeddedt.archaicfix.helpers.SoundDeviceThread.run(SoundDeviceThread.java:43) [SoundDeviceThread.class:?]