Crash due to SoundMuteHandler
RyanTheTechMan opened this issue ยท 1 comments
I am running the latest version of Quilt on 1.20.1.
Players in our modpack experience these crash logs:
java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1113.method_4784()" because "this.tmpSound" is null
at net.minecraft.class_1140.modify$ipi000$botania$bergamuateAttenuate(class_1140.java:4174)
at net.minecraft.class_1140.method_43222(class_1140.java:494)
at net.minecraft.class_1140.method_4853(class_1140.java:490)
at net.minecraft.class_1140.invokeCalculateVolume(class_1140.java)
at team.creative.enhancedvisuals.client.sound.SoundMuteHandler.lambda$setMuteVolume$1(SoundMuteHandler.java:55)
at java.base/java.util.HashMap.forEach(Unknown Source)
at java.base/java.util.Collections$SynchronizedMap.forEach(Unknown Source)
at team.creative.enhancedvisuals.client.sound.SoundMuteHandler.setMuteVolume(SoundMuteHandler.java:54)
at team.creative.enhancedvisuals.client.sound.SoundMuteHandler.tick(SoundMuteHandler.java:36)
at team.creative.enhancedvisuals.common.event.EVEvents.clientTick(EVEvents.java:79)
at team.creative.enhancedvisuals.EnhancedVisuals.lambda$onInitializeClient$0(EnhancedVisuals.java:59)
at team.creative.creativecore.CreativeFabricLoader.lambda$registerClientTick$1(CreativeFabricLoader.java:47)
at org.quiltmc.qsl.lifecycle.api.client.event.ClientTickEvents.lambda$static$2(ClientTickEvents.java:52)
at net.minecraft.class_310.handler$eop001$quilt_lifecycle_events$endTick(class_310.java:20556)
at net.minecraft.class_310.method_1574(class_310.java:1957)
at net.minecraft.class_310.method_1523(class_310.java:1181)
at net.minecraft.class_310.method_1514(class_310.java:802)
at net.minecraft.client.main.Main.main(Main.java:250)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:557)
at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:84)
at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:28)
or
java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1113.method_4784()" because "this.tmpSound" is null
8 | at net.minecraft.class_1140.modify$ipi000$botania$bergamuateAttenuate(class_1140.java:4174)
9 | at net.minecraft.class_1140.method_43222(class_1140.java:494)
10 | at net.minecraft.class_1140.method_4853(class_1140.java:490)
11 | at net.minecraft.class_1140.invokeCalculateVolume(class_1140.java)
12 | at team.creative.enhancedvisuals.client.sound.SoundMuteHandler.lambda$setMuteVolume$1(SoundMuteHandler.java:55)
13 | at java.base/java.util.HashMap.forEach(Unknown Source)
14 | at java.base/java.util.Collections$SynchronizedMap.forEach(Unknown Source)
15 | at team.creative.enhancedvisuals.client.sound.SoundMuteHandler.setMuteVolume(SoundMuteHandler.java:54)
16 | at team.creative.enhancedvisuals.client.sound.SoundMuteHandler.tick(SoundMuteHandler.java:36)
17 | at team.creative.enhancedvisuals.common.event.EVEvents.clientTick(EVEvents.java:79)
18 | at team.creative.enhancedvisuals.EnhancedVisuals.lambda$onInitializeClient$0(EnhancedVisuals.java:59)
19 | at team.creative.creativecore.CreativeFabricLoader.lambda$registerClientTick$1(CreativeFabricLoader.java:47)
20 | at org.quiltmc.qsl.lifecycle.api.client.event.ClientTickEvents.lambda$static$2(ClientTickEvents.java:52)
21 | at net.minecraft.class_310.handler$eop001$quilt_lifecycle_events$endTick(class_310.java:20556)
22 | at net.minecraft.class_310.method_1574(class_310.java:1957)
23 | at net.minecraft.class_310.method_1523(class_310.java:1181)
24 | at net.minecraft.class_310.method_1514(class_310.java:802)
25 | at net.minecraft.client.main.Main.main(Main.java:250)
26 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
27 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
28 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
29 | at java.base/java.lang.reflect.Method.invoke(Unknown Source)
30 | at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:557)
31 | at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:84)
32 | at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:28)
This causes a game crash. This happens when an explosion occurs nearby the player.
Seems like this is a crash from Botania. Related code can be found here: https://github.com/VazkiiMods/Botania/blob/d5ae1ce522a316a893b01e110badc3bf55690992/Xplat/src/main/java/vazkii/botania/mixin/client/SoundEngineMixin.java#L64
Looks like the issue has been fixed already, maybe a new version is already available? Either way if the issue persists you should report it to Botania as it is not directly related to my mod. If you want to you can mention me in the issue if my help is needed somehow.