Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Sodium 0.6.1 #1088

Closed
3 tasks done
jurohn opened this issue Dec 3, 2024 · 9 comments
Closed
3 tasks done

Incompatibility with Sodium 0.6.1 #1088

jurohn opened this issue Dec 3, 2024 · 9 comments
Milestone

Comments

@jurohn
Copy link

jurohn commented Dec 3, 2024

Pre-reporting checklist

  • I have searched existing issues and didn't find any previous reports of this bug.
  • This bug still happens in the latest version of Wurst. I've made sure my installation is up to date.
  • I have tried removing all other mods and the bug still happens.

Description

Open a random world (smp) with this mods and it crashes.

Repro steps

Open a random world (smp) with this mods and it crashes. Didnt crash with sodium 0.6 but they say they dont support Wurst.

(Removed modlist)

Wurst Client version

7.46.3

Minecraft version

1.21.3

Crash report (if applicable)

---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 2024-12-03 12:47:03
Description: Unexpected error

java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1297.method_5765()" because "$$1" is null
	at knot//net.minecraft.class_4184.method_19321(class_4184.java:57)
	at knot//net.minecraft.class_757.method_3188(class_757.java:690)
	at knot//net.minecraft.class_757.method_3192(class_757.java:491)
	at knot//net.minecraft.class_310.method_1523(class_310.java:1352)
	at knot//net.minecraft.class_310.method_1514(class_310.java:933)
	at knot//net.minecraft.client.main.Main.main(Main.java:265)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at knot//net.minecraft.class_4184.method_19321(class_4184.java:57)
	at knot//net.minecraft.class_757.method_3188(class_757.java:690)

-- Uptime --
Details:
	JVM uptime: 18.790s
	Wall uptime: 10.970s
	High-res time: 8.754s
	Client ticks: 138 ticks / 6.900s
Stacktrace:
	at knot//net.minecraft.class_310.method_1587(class_310.java:2443)
	at knot//net.minecraft.class_310.method_54580(class_310.java:1002)
	at knot//net.minecraft.class_310.method_1514(class_310.java:957)
	at knot//net.minecraft.client.main.Main.main(Main.java:265)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

-- Affected level --
Details:
	All players: 0 total; []
	Chunk stats: 361, 0
	Level dimension: minecraft:worldhaha
	Level spawn location: World: (8,64,8), Section: (at 8,0,8 in 0,4,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511)
	Level time: 0 game time, 0 day time
	Server brand: ~~ERROR~~ NullPointerException: Cannot read field "field_3944" because "this.field_3729.field_1724" is null
	Server type: Non-integrated multiplayer server
	Tracked entity count: 0

-- Last reload --
Details:
	Reload number: 1
	Reload reason: initial
	Finished: Yes
	Packs:  (Removed)

-- System Details --
Details:
	Minecraft Version: 1.21.3
	Minecraft Version ID: 1.21.3
	Operating System: Windows 11 (amd64) version 10.0
	Java Version: 21.0.3, Microsoft
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
	Memory: 419478200 bytes (400 MiB) / 805306368 bytes (768 MiB) up to 2147483648 bytes (2048 MiB)
	CPUs: 16
	Processor Vendor: AuthenticAMD
	Processor Name: AMD Ryzen 7 7700X 8-Core Processor             
	Identifier: AuthenticAMD Family 25 Model 97 Stepping 2
	Microarchitecture: Zen 3
	Frequency (GHz): 4.49
	Number of physical packages: 1
	Number of physical CPUs: 8
	Number of logical CPUs: 16
	Graphics card #0 name: AMD Radeon(TM) Graphics
	Graphics card #0 vendor: Advanced Micro Devices, Inc.
	Graphics card #0 VRAM (MiB): 512.00
	Graphics card #0 deviceId: VideoController1
	Graphics card #0 versionInfo: 32.0.11024.2
	Graphics card #1 name: NVIDIA GeForce RTX 3060 Ti
	Graphics card #1 vendor: NVIDIA
	Graphics card #1 VRAM (MiB): 8192.00
	Graphics card #1 deviceId: VideoController2
	Graphics card #1 versionInfo: 32.0.15.6614
	Memory slot #0 capacity (MiB): 16384.00
	Memory slot #0 clockSpeed (GHz): 4.80
	Memory slot #0 type: Unknown
	Memory slot #1 capacity (MiB): 16384.00
	Memory slot #1 clockSpeed (GHz): 4.80
	Memory slot #1 type: Unknown
	Virtual memory max (MiB): 40597.48
	Virtual memory used (MiB): 19415.37
	Swap memory total (MiB): 8704.00
	Swap memory used (MiB): 16.81
	Space in storage for jna.tmpdir (MiB): available: 864511.31, total: 1906800.00
	Space in storage for org.lwjgl.system.SharedLibraryExtractPath (MiB): available: 864511.31, total: 1906800.00
	Space in storage for io.netty.native.workdir (MiB): available: 864511.31, total: 1906800.00
	Space in storage for java.io.tmpdir (MiB): available: 864511.31, total: 1906800.00
	Space in storage for workdir (MiB): available: 864511.31, total: 1906800.00
	JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	Fabric Mods: 
		(Removed mods)
		
	Launched Version: fabric-loader-0.16.9-1.21.3
	Launcher name: minecraft-launcher
	Backend library: LWJGL version 3.3.3-snapshot
	Backend API: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 GL version 3.2.0 NVIDIA 566.14, NVIDIA Corporation
	Window size: 1278x741
	GFLW Platform: win32
	GL Caps: Using framebuffer using OpenGL 3.2
	GL debug messages: 
	Is Modded: Definitely; Client brand changed to 'fabric'
	Universe: 400921fb54442d18
	Type: Client (map_client.txt)
	Graphics mode: fancy
	Render Distance: 32/32 chunks
	Resource Packs:  (Removed)
	Current Language: en_us
	Locale: en_US
	System encoding: Cp1252
	File encoding: UTF-8
	CPU: 16x AMD Ryzen 7 7700X 8-Core Processor
@jurohn jurohn added status:unconfirmed type:bug Something isn't working labels Dec 3, 2024
@Alexander01998 Alexander01998 changed the title Incompatibel wit h Sodium 0.6.1 Incompatibility with Sodium 0.6.1 Dec 3, 2024
@Alexander01998
Copy link
Member

Deobfuscated stacktrace:

java.lang.NullPointerException: Cannot invoke "net.minecraft.entity.Entity.hasVehicle" because "$$1" is null
	at knot//net.minecraft.client.render.Camera.update(Camera.java:57)
	at knot//net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer.java:690)
	at knot//net.minecraft.client.render.GameRenderer.render(GameRenderer.java:491)
	at knot//net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1352)
	at knot//net.minecraft.client.MinecraftClient.run(MinecraftClient.java:933)
	at knot//net.minecraft.client.main.Main.main(Main.java:265)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

This is a rather cryptic error message. Wurst's mixins do not target Entity.hasVehicle() or Camera.update() directly. I'm not sure what $$1 points to.

@jurohn Just to confirm, you did also try it without that huge list of mods and still got the same error with just Wurst, Fabric API, and Sodium?

@jurohn
Copy link
Author

jurohn commented Dec 3, 2024

Deobfuscated stacktrace:

java.lang.NullPointerException: Cannot invoke "net.minecraft.entity.Entity.hasVehicle" because "$$1" is null
	at knot//net.minecraft.client.render.Camera.update(Camera.java:57)
	at knot//net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer.java:690)
	at knot//net.minecraft.client.render.GameRenderer.render(GameRenderer.java:491)
	at knot//net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1352)
	at knot//net.minecraft.client.MinecraftClient.run(MinecraftClient.java:933)
	at knot//net.minecraft.client.main.Main.main(Main.java:265)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

This is a rather cryptic error message. Wurst's mixins do not target Entity.hasVehicle() or Camera.update() directly. I'm not sure what $$1 points to.

@jurohn Just to confirm, you did also try it without that huge list of mods and still got the same error with just Wurst, Fabric API, and Sodium?

image

Tested with just this and the problem is still there.
Problem was not there with the previous Sodium version, so they must have changed something that messed up Wurst compatibility.

@MCRcortex
Copy link

the issue is your SodiumFluidRendererMixin

@Alexander01998
Copy link
Member

Hmm.

Entity.hasVehicle() is normally just return this.getVehicle() != null;, which should not be able to throw a NullPointerException unless it's been modified by a mixin.

Sodium 0.6.1 does not seem to have any mixins targeting Entity.hasVehicle().

Reese's Sodium Options does not seem to have any mixins targeting Entity at all.

Sodium Extra does not seem to have any mixins targeting Entity.hasVehicle(), but does have a mixin for Camera.tick().

Camera.tick() is mojmap for Camera.updateEyeHeight(), not Camera.update().

@Alexander01998
Copy link
Member

the issue is your SodiumFluidRendererMixin

Please elaborate.

@MCRcortex
Copy link

The issue is a mixin issue, the SodiumFluidRenderer class gets loaded in on a packet join, due to initialization of the renderer, the exception is caught as all packet errors are and ignored, however this is completely incorrect and results in the incorrect crash file being generated, if you look at the log, its the first error that happened, Invalid descriptor on wurst.mixins.json:SodiumFluidRendererMixin from mod wurst->@Inject::onIsFluidOccluded

@Alexander01998
Copy link
Member

Thanks! I see the issue. The parameters of Sodium's DefaultFluidRenderer.isFluidOccluded() method changed in this commit from last week. The method now takes a FluidState instead of a Fluid, but Wurst is still looking for the old method signature.

@Alexander01998
Copy link
Member

Will be fixed in Wurst 7.46.4. Let's see if I can get that released before Minecraft 1.21.4 is out.

@jurohn
Copy link
Author

jurohn commented Dec 3, 2024

Thank you @Alexander01998 for picking this up insanely fast. Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants