HT's TreeChop

HT's TreeChop

3M Downloads

[1.19.2] Null Pointer Exception Crash

Batul-Moonfall opened this issue · 4 comments

commented

Game will crash to server list seemingly at random. Seems to mostly occur inside village houses. Possibly caused by looking at structures containing stripped logs. (Acacia houses seem to have a lot of them accenting throughout.)

No apparent crash report, but this block from the Latest.log led me here...

java.lang.NullPointerException: null
	at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:473) ~[?:?]
	at java.util.PriorityQueue.siftDownUsingComparator(PriorityQueue.java:712) ~[?:?]
	at java.util.PriorityQueue.poll(PriorityQueue.java:585) ~[?:?]
	at ht.tuber.graph.FloodFillImpl.lambda$fill$2(FloodFillImpl.java:29) ~[TreeChop-1.19.2-forge-0.18.4.jar%23452!/:0.18.4]
	at java.util.stream.ReferencePipeline$15$1.accept(ReferencePipeline.java:540) ~[?:?]
	at java.util.stream.Stream$2.tryAdvance(Stream.java:1539) ~[?:?]
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?]
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) ~[?:?]
	at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:632) ~[?:?]
	at ht.treechop.common.chop.LazyTreeData.hasLeaves(LazyTreeData.java:99) ~[TreeChop-1.19.2-forge-0.18.4.jar%23452!/:0.18.4]
	at ht.treechop.api.AbstractTreeData.isAProperTree(AbstractTreeData.java:14) ~[TreeChop-1.19.2-forge-0.18.4.jar%23452!/:0.18.4]
	at ht.treechop.client.gui.screen.ChopIndicator.blockCanBeChopped(ChopIndicator.java:79) ~[TreeChop-1.19.2-forge-0.18.4.jar%23452!/:0.18.4]
	at ht.treechop.client.gui.screen.ChopIndicator.render(ChopIndicator.java:36) ~[TreeChop-1.19.2-forge-0.18.4.jar%23452!/:0.18.4]
	at ht.treechop.client.ForgeClient.lambda$onRegisterOverlays$0(ForgeClient.java:39) ~[TreeChop-1.19.2-forge-0.18.4.jar%23452!/:0.18.4]
	at net.minecraftforge.client.gui.overlay.ForgeGui.lambda$render$0(ForgeGui.java:141) ~[forge-1.19.2-43.2.8-universal.jar%23468!/:?]
	at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[guava-31.0.1-jre.jar%23121!/:?]
	at net.minecraftforge.client.gui.overlay.ForgeGui.m_93030_(ForgeGui.java:136) ~[forge-1.19.2-43.2.8-universal.jar%23468!/:?]
	at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:876) ~[client-1.19.2-20220805.130853-srg.jar%23463!/:?]
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1115) ~[client-1.19.2-20220805.130853-srg.jar%23463!/:?]
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23463!/:?]
	at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23463!/:?]
	at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23463!/:?]
	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:568) ~[?:?]
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.2.8.jar%23101!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2388!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2388!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2388!/:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2388!/:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2388!/:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2388!/:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2388!/:?]
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?]
[18:36:35] [Render thread/ERROR]: Error rendering overlay 'treechop:chopping_indicator'
java.lang.NullPointerException: null

(Edit: Added Latest.log file)
latest.log

commented

Also seems to occur when chopping down jungle trees.

commented

Temporary Fix; Toggle chopping indicator off in Config menu.

commented

Hey, thanks for the info! I haven’t been able to reproduce this yet, but as soon as I do, I’ll get it fixed

Temporary Fix; Toggle chopping indicator off in Config menu.

For single player, this is fine, but anyone playing on a server may want to keep the indicator on to avoid crashing the server. The server runs the same tree detection code as the client, but only when a block is broken. So a client crashing before a block is broken saves the server from crashing. Until it’s fixed, the safest solution is probably to use one of the 0.17.x versions of treechop, which are more stable

commented

Still haven't truly fixed this, but I'm pretty sure I stopped it from causing crashes or disconnects. 0.18.5 is posted. Please reopen if you still notice anything bad happening!