CodeChicken Lib 1.8.+

CodeChicken Lib 1.8.+

141M Downloads

IllegalStateException in ShaderUniformCache

NicolasFlamel42 opened this issue ยท 2 comments

commented

From what I can tell the error seems to be that in the ShaderUniformCache.FloatUniformBuffer.apply() and the DoubleUniformBuffer.apply() functions the checks for matrices seem to be switched, as FloatUniformBuffer checks for D_MATRIX and DoubleUniformBuffer checks for MATRIX, making it impossible to use any sort of matrix as a uniform value. It might also be an error on my part.

Here is the crash report:

java.lang.IllegalStateException: Invalid type for DoubleUniformEntry: D_MATRIX
	at codechicken.lib.render.shader.ShaderUniformCache$DoubleUniformEntry.apply(ShaderUniformCache.java:510) ~[codechickenlib-242818-3596092_mapped_snapshot_20210309-1.16.5.jar:1.16.5-4.0.6.443] {re:classloading}
	at codechicken.lib.render.shader.ShaderUniformCache.popApply(ShaderUniformCache.java:98) ~[codechickenlib-242818-3596092_mapped_snapshot_20210309-1.16.5.jar:1.16.5-4.0.6.443] {re:classloading}
	at codechicken.lib.render.shader.ShaderProgram.popCache(ShaderProgram.java:128) ~[codechickenlib-242818-3596092_mapped_snapshot_20210309-1.16.5.jar:1.16.5-4.0.6.443] {re:classloading}
	at codechicken.lib.render.shader.ShaderRenderType.setupRenderState(ShaderRenderType.java:25) ~[codechickenlib-242818-3596092_mapped_snapshot_20210309-1.16.5.jar:1.16.5-4.0.6.443] {re:classloading}
	at net.minecraft.client.renderer.RenderType.finish(RenderType.java:280) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.IRenderTypeBuffer$Impl.finish(IRenderTypeBuffer.java:82) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:computing_frames,pl:runtimedistcleaner:A,re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.IRenderTypeBuffer$Impl.getBuffer(IRenderTypeBuffer.java:44) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:computing_frames,pl:runtimedistcleaner:A,re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:1125) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:mixins.codechickenlib.json:WorldRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:620) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:437) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1003) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:612) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] {}
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {}
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:108) [forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-recomp.jar:?] {}
commented

I noticed this bug the other week when I ported the shader system outside Minecraft. Should be fixed for the next release.

commented

This should be fixed in version 4.0.7.444.