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

Crash with BlockEntityRenderer. Not filled all elements of the vertex #198

Open
maxanier opened this issue Aug 24, 2024 · 0 comments
Open

Comments

@maxanier
Copy link

When the tent preview overlaps with Vampirism's village totem (if controlled by a faction), the client crashes.

Apparently, the rendering by Font#drawInBatch inside your preview rendering causes an issue with the BufferBuilder.
Vampirism tries to render text here: https://github.com/TeamLapen/Vampirism/blob/a63b012ad0029dd70a751bcd037848d12ad2b3fe/src/main/java/de/teamlapen/vampirism/client/renderer/blockentity/TotemBESR.java#L68

I don't really see why it is causing a crash, but I am not an expert in rendering. Maybe you have an idea how this can be fixed on your or our side.
It also seems there may be other mods with similar compatibility issues:
#187

Since you are already catching this exception anyway: Would it be viable to just log and ignore these exception instead of crashing. I assume for most players, it is not crucial to have that block render when the tent overlay is rendered.
This crash can even prevent you from loading the world again: If the game is saved in a state where preview and block overlap, the game will immediately crash upon loading the world.

Original report:

TeamLapen/Vampirism#1407

Stacktrace:

java.lang.IllegalStateException: Not filled all elements of the vertex
	at com.mojang.blaze3d.vertex.BufferBuilder.m_5752_(BufferBuilder.java:288) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.font.glyphs.BakedGlyph.m_5626_(BakedGlyph.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.client.gui.Font.m_92787_(Font.java:357) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.client.gui.Font$StringRenderOutput.m_6411_(Font.java:286) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.util.StringDecomposer.m_14332_(StringDecomposer.java:17) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.util.StringDecomposer.m_14317_(StringDecomposer.java:43) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.util.FormattedCharSequence.m_13736_(FormattedCharSequence.java:23) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.client.gui.Font.m_92926_(Font.java:352) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.client.gui.Font.m_92866_(Font.java:201) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.client.gui.Font.m_92733_(Font.java:134) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at net.minecraft.client.gui.Font.m_92841_(Font.java:130) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading}
	at de.teamlapen.vampirism.client.renderer.blockentity.TotemBESR.renderFactionName(TotemBESR.java:68) ~[Vampirism-1.19.2-1.9.1.jar%23130!/:1.9.1] {re:classloading,pl:runtimedistcleaner:A}
	at de.teamlapen.vampirism.client.renderer.blockentity.TotemBESR.render(TotemBESR.java:47) ~[Vampirism-1.19.2-1.9.1.jar%23130!/:1.9.1] {re:classloading,pl:runtimedistcleaner:A}
	at de.teamlapen.vampirism.client.renderer.blockentity.TotemBESR.m_6922_(TotemBESR.java:19) ~[Vampirism-1.19.2-1.9.1.jar%23130!/:1.9.1] {re:classloading,pl:runtimedistcleaner:A}
	at com.terraformersmc.campanion.client.renderer.item.BuiltTentItemRenderer.renderBlockEntity(BuiltTentItemRenderer.java:61) ~[Campanion-forge-1.19.2-4.1.2+forge.jar%23129!/:4.1.2+forge] {re:mixin,re:classloading}
	at com.terraformersmc.campanion.client.renderer.item.BuiltTentItemRenderer.renderFakeBlock(BuiltTentItemRenderer.java:53) ~[Campanion-forge-1.19.2-4.1.2+forge.jar%23129!/:4.1.2+forge] {re:mixin,re:classloading}
	at net.minecraft.client.renderer.LevelRenderer.handler$zzo000$renderLevel(LevelRenderer.java:3154) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.LevelRenderer.m_109599_(LevelRenderer.java:1234) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.GameRenderer.m_109089_(GameRenderer.java:1068) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:840) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1115) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:campanion.mixins.json:client.MixinMinecraftClient,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:campanion.mixins.json:client.MixinMinecraftClient,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23131!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.2.0.jar%23126!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%23113!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%23113!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%23113!/:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%23113!/:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%23113!/:?] {}

Versions

	Mod List: 
		client-1.19.2-20220805.130853-srg.jar             |Minecraft                     |minecraft                     |1.19.2              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
		Campanion-forge-1.19.2-4.1.2+forge.jar            |Campanion                     |campanion                     |4.1.2+forge         |DONE      |Manifest: NOSIGNATURE
		forge-1.19.2-43.2.0-universal.jar                 |Forge                         |forge                         |43.2.0              |DONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90
		Vampirism-1.19.2-1.9.1.jar                        |Vampirism                     |vampirism                     |1.9.1               |DONE      |Manifest: NOSIGNATURE

Reproduce

If you want to reproduce this:

  1. Find a village with a totem (or place a totem top ontop a totem base)
  2. Make sure it is controlled by a faction (/vampirism-test village capture vampirism:hunter)
  3. Hold a tent so that the preview overlaps with the totem block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant