Lightman's Currency

Lightman's Currency

331k Downloads

BUG: Important (>40 000) number of empty "Render thread" errors on joining a world

moninformateur opened this issue · 3 comments

commented

Minecraft Version

1.18.2

Forge Version

40.1.85

Lightman's Currency Version

lightmanscurrency-1.18.2-2.0.0.5

Environment Type

Minecraft Client (Bug/crash happened in a single-player world or while the game was booting)

Other relevant Mods

AutoRegLib-1.7-53.jar
lightmanscurrency-1.18.2-2.0.0.5.jar
Quark-3.2-358.jar

Describe the bug

On joining world a singleplayer world, the console logs about 8000 to 70 000 lines of empty Render Thread, causing stuttering.

To Reproduce

  1. Create a minecraft instance with the parameters and the three mods described above, with lightman's currency being v2.0.0.5.
  2. Create a new world and join. The console generates about 8k of "Render Thread" errors. This does not cause a crash, but does create stuttering behavior the more errors are generated.
  3. The amount of error generated is correlated with the number of mods enabled. With about 200 mods, I get about 70 000 lines of Render Thread errors.

This bug is fixed by downgrading Lightman's to 2.0.0.4 or any previous versions. Seems related to the ArmorStand.

This bug seems to be related in some way to a conflict with Quark since the bug does not happen when Quark is disabled (see the line below).

This bug does not happen if Quark is enabled and Lightman's is disabled. This is the reason why I posted the issue here.

Screenshots/Logs/Crash Reports

The logs themselves are too big to share in Pastebin.

Here is what all the 70 000 lines of Render Thread errors say when about 200 mods are enabled:

[12:29:48] [Render thread/ERROR]: Exception caught during firing event: null
	Index: 1
	Listeners:
		0: NORMAL
		1: ASM: vazkii.quark.content.tweaks.module.ArmedArmorStandsModule@2bd08e2f entityConstruct(Lnet/minecraftforge/event/entity/EntityEvent$EntityConstructing;)V
java.lang.NullPointerException

Here is what all the 8 000 lines of Render Thread errors say when only the three mods (Quark, Lightman and AutoRegLib) are enabled:

[12:54:35] [Render thread/ERROR]: Exception caught during firing event: Cannot read field "f_46443_" because "this.f_19853_" is null Index: 1 Listeners: 0: NORMAL 1: ASM: vazkii.quark.content.tweaks.module.ArmedArmorStandsModule@1c388114 entityConstruct(Lnet/minecraftforge/event/entity/EntityEvent$EntityConstructing;)V java.lang.NullPointerException: Cannot read field "f_46443_" because "this.f_19853_" is null at TRANSFORMER/[email protected]/net.minecraft.world.entity.Entity.m_6210_(Entity.java:2502) at TRANSFORMER/[email protected]/net.minecraft.world.entity.decoration.ArmorStand.m_6210_(ArmorStand.java:102) at TRANSFORMER/[email protected]/net.minecraft.world.entity.decoration.ArmorStand.m_7350_(ArmorStand.java:731) at TRANSFORMER/[email protected]/net.minecraft.network.syncher.SynchedEntityData.m_135381_(SynchedEntityData.java:125) at TRANSFORMER/[email protected]/vazkii.quark.content.tweaks.module.ArmedArmorStandsModule.setShowArms(ArmedArmorStandsModule.java:25) at TRANSFORMER/[email protected]/vazkii.quark.content.tweaks.module.ArmedArmorStandsModule.entityConstruct(ArmedArmorStandsModule.java:20) at net.minecraftforge.eventbus.ASMEventHandler_176_ArmedArmorStandsModule_entityConstruct_EntityConstructing.invoke(.dynamic) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) at TRANSFORMER/[email protected]/net.minecraft.world.entity.Entity.<init>(Entity.java:256) at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.<init>(LivingEntity.java:232) at TRANSFORMER/[email protected]/net.minecraft.world.entity.decoration.ArmorStand.<init>(ArmorStand.java:89) at TRANSFORMER/[email protected]/net.minecraft.world.entity.decoration.ArmorStand.<init>(ArmorStand.java:94) at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.traders.tradedata.item.restrictions.EquipmentRestriction.equippable(EquipmentRestriction.java:40) at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.traders.tradedata.item.restrictions.EquipmentRestriction.allowItemSelectItem(EquipmentRestriction.java:36) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.client.gui.widget.ItemEditWidget.lambda$initItemList$1(ItemEditWidget.java:134) at java.base/java.util.HashMap.forEach(HashMap.java:1421) at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.traders.tradedata.item.restrictions.ItemTradeRestriction.forEach(ItemTradeRestriction.java:56) at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.client.gui.widget.ItemEditWidget.initItemList(ItemEditWidget.java:134) at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.proxy.ClientProxy.onLogin(ClientProxy.java:273) at net.minecraftforge.eventbus.ASMEventHandler_5_ClientProxy_onLogin_LoggedInEvent.invoke(.dynamic) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) at TRANSFORMER/[email protected]/net.minecraftforge.client.ForgeHooksClient.firePlayerLogin(ForgeHooksClient.java:969) at TRANSFORMER/[email protected]/net.minecraft.client.multiplayer.ClientPacketListener.m_5998_(ClientPacketListener.java:363) at TRANSFORMER/[email protected]/net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(ClientboundLoginPacket.java:83) at TRANSFORMER/[email protected]/net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(ClientboundLoginPacket.java:19) at TRANSFORMER/[email protected]/net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:22) at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) at TRANSFORMER/[email protected]/net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:116) at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1015) at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91374_(Minecraft.java:665) at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:205) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)

commented

Unfortunately this is caused by a change made by quark on how the ItemStack.canEquip function is handled, which is very difficult to call outside of an in-world context (as it requires an entity input, which in turn requires a level/world input). I'll see if I can make a workaround.

commented

Should be fixed in v2.0.0.5a

commented

That was mighty fast! Thank you!