GTNewHorizons / Hodgepodge

A HodgePodge of patches
GNU Lesser General Public License v3.0
38 stars 60 forks source link

Minecraft Crash After System Wakeup - NullPointerException in SoundManager #406

Closed Edgars-Cirulis closed 1 month ago

Edgars-Cirulis commented 2 months ago

Your GTNH Discord Username

edgarscirulis

Minecraft crashes with a NullPointerException in the SoundManager class after the system wakes up from sleep mode. The issue appears to be related to the sound system becoming uninitialized upon waking up.

Steps to Reproduce:

  1. Launch Minecraft.
  2. Put the system into sleep mode while Minecraft is running.
  3. Wake the system up from sleep mode.
  4. Observe that there is no sound.
  5. Wait approximately 2 minutes.
  6. Minecraft crashes.

Crash Report

---- Minecraft Crash Report ---- // This doesn't make any sense!

Time: 2024-08-06 14:35:03 EEST Description: Unexpected error

java.lang.NullPointerException: Cannot invoke "java.util.HashMap.get(Object)" because the return value of "paulscode.sound.Library.getSources()" is null at net.minecraft.client.audio.SoundManager$SoundSystemStarterThread.playing(SoundManager.java:499) at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:218) at net.minecraft.client.audio.SoundHandler.update(SourceFile:179) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2013) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:973) at net.minecraft.client.Minecraft.run(Minecraft.java:5110) at net.minecraft.client.main.Main.main(SourceFile:148) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.rfb$realLaunch(Launch.java:250) at net.minecraft.launchwrapper.Launch.launch(Launch.java:35) at net.minecraft.launchwrapper.Launch.main(Launch.java:60) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.gtnewhorizons.retrofuturabootstrap.Main.main(Main.java:219) at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

Egos90 commented 1 month ago

Discord Username Egos900 I've got the same problem with my world. My logs looks like this:

latest.log fml-client-latest.log crash-2024-09-10_11.35.42-client.txt