Chunky (Bukkit)

Chunky (Bukkit)

20.6k Downloads

Crash when `WeightedPicker#search` called with argument out of expected range

eizengan opened this issue ยท 6 comments

commented

Originally thought to be an issue with the Fabric API, additional context available there. Could this actually be an issue with Chunky instead?

The following error crashed my server several times while generating terrain for minecraft:the_end

java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: The provided target value for entry selection must be less than or equal to the weight total
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.IllegalArgumentException: The provided target value for entry selection must be less than or equal to the weight total
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
	at net.fabricmc.fabric.impl.biome.WeightedPicker.search(WeightedPicker.java:79)
	at net.fabricmc.fabric.impl.biome.WeightedPicker.pickFromNoise(WeightedPicker.java:56)
	at net.fabricmc.fabric.impl.biome.TheEndBiomeData$Overrides.pick(TheEndBiomeData.java:132)
	at net.minecraft.class_2169.handler$zzc000$getWeightedEndBiome(class_2169.java:546)
	at net.minecraft.class_2169.method_38109(class_2169.java:82)
	at net.minecraft.class_2826.method_38291(class_2826.java:200)
	at net.minecraft.class_2791.method_38257(class_2791.java:393)
	at net.minecraft.class_3754.method_38327(class_3754.java:134)
	at net.minecraft.class_3754.method_38333(class_3754.java:124)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	... 6 more

A full crash report is available here

commented

I don't believe this is an issue with Chunky since it does not directly use the API mentioned in the stack trace. Most likely some other mod is using this API and is causing issues during chunk generation which is why it's showing up.

Can you try uninstalling any other mods except for Chunky and Fabric API to confirm whether it still happens?

commented

I believe I did prior to opening this issue? https://mclo.gs/tMcyWWH#L94 is the modlist running at the time of that crash

commented

Apologies, did not see the attached crash report. Interesting that this still occurs with only Fabric API installed.

Let's continue discussing on the other issue for now.

commented

Closing since it seems this has been reproduced successfully without Chunky installed, indicating an issue with Fabric.

commented

Appreciate the quick response, and thanks for helping with diagnosis! ๐Ÿ™‡โ€โ™‚๏ธ

commented

Appreciate the quick response, and thanks for helping with diagnosis! ๐Ÿ™‡โ€โ™‚๏ธ

No problem. I didn't do much though, thank the people who dug deeper and reproduced the issue. ๐Ÿ™‚

Still pending a fix too obviously, but it looks like at least a workaround should be able to be implemented fairly quickly.