Jade ๐Ÿ”

Jade ๐Ÿ”

93M Downloads

[1.21-pre.2 Bug] Looking at fluids triggers hard crash

Meshiest opened this issue ยท 0 comments

commented

Mod loader

Fabric

Minecraft version

1.21-pre.2

Mod version

15.0.0

Modloader version

0.99.4+1.21

Modpack info

No response

[IMPORTANT] If bug:

  • I have confirmed this bug is reproducible on a minimal setup, not a modpack with many other mods.

[IMPORTANT] If bug: The latest.log file, not the crash report

No response

Issue description

WailaExceptionHandler.java improperly handles null error providers as it tries to hash null in the ERROR.contains(null).

I was able to mitigate the hard crash by inserting the following code before the ERRORS.contains(provider) call:

		if (provider == null) {
			Jade.LOGGER.error("Caught unhandled exception : [{}] {}\n{}", "Unknown", e,
					ExceptionUtils.getStackTrace(e));
			return;
		}

The error that is triggering the issue:

[14:16:25] [Render thread/ERROR]: Caught unhandled exception : [Unknown] java.lang.IllegalStateException: Missing elements in vertex: Color
java.lang.IllegalStateException: Missing elements in vertex: Color
	at net.minecraft.class_287.method_60806(class_287.java:127)
	at net.minecraft.class_287.method_60805(class_287.java:96)
	at net.minecraft.class_287.method_22912(class_287.java:156)
	at net.minecraft.class_4588.method_22918(class_4588.java:130)
	at snownee.jade.overlay.DisplayHelper.drawTextureWithMasking(DisplayHelper.java:124)
	at snownee.jade.overlay.DisplayHelper.drawTiledSprite(DisplayHelper.java:302)
	at snownee.jade.overlay.DisplayHelper.lambda$drawFluid$0(DisplayHelper.java:266)
	at snownee.jade.util.ClientProxy.getFluidSpriteAndColor(ClientProxy.java:224)
	at snownee.jade.overlay.DisplayHelper.drawFluid(DisplayHelper.java:255)
	at snownee.jade.impl.ui.FluidStackElement.render(FluidStackElement.java:31)
	at snownee.jade.impl.ui.BoxElement.render(BoxElement.java:186)
	at snownee.jade.overlay.OverlayRenderer.renderOverlay(OverlayRenderer.java:202)
	at snownee.jade.overlay.OverlayRenderer.renderOverlay478757(OverlayRenderer.java:169)
	at snownee.jade.util.ClientProxy.onRenderTick(ClientProxy.java:131)
	at snownee.jade.util.ClientProxy.lambda$onInitializeClient$3(ClientProxy.java:266)
	at net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback.lambda$static$0(HudRenderCallback.java:28)
	at net.minecraft.class_329.handler$zkj000$fabric-rendering-v1$render(class_329.java:3038)
	at net.minecraft.class_329.method_1753(class_329.java:220)
	at net.minecraft.class_757.method_3192(class_757.java:896)
	at net.minecraft.class_310.method_1523(class_310.java:1285)
	at net.minecraft.class_310.method_1514(class_310.java:882)
	at net.minecraft.client.main.Main.main(Main.java:256)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	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)

This bug also prints out a nice rainbow in the sky if you don't crash
image

If I had to guess, this issue would be related to the BufferBuilder Rendering changes

A temporary workaround for now is to disable fluids in /jadec config -> mod menu