Skip to content

AchieveHunter crashes on worlds with too many advancements #40

Description

@rojorum24

When opening and clicking on an advancement on a world with a large number of completed advancements the game crashes with IllegalArgumentException: Comparison method violates its general contract!

When playing the game on a fresh test world with a small number of advancements there are no crashes suggesting that the crash might be caused by a list size or complexity. When AchieveHunter is disabled there are no crashes.

From what I can tell the crash comes from the getAdvancementsWithProgress method although admittedly I don't know Java just what I got from looking at the crash report.

---- Minecraft Crash Report ----
// I just don't know what went wrong :(

Time: 2026-04-16 12:51:03
Description: mouseReleased event handler

java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.base/java.util.TimSort.mergeHi(TimSort.java:903)
at java.base/java.util.TimSort.mergeAt(TimSort.java:520)
at java.base/java.util.TimSort.mergeForceCollapse(TimSort.java:461)
at java.base/java.util.TimSort.sort(TimSort.java:254)
at java.base/java.util.Arrays.sort(Arrays.java:1308)
at java.base/java.util.ArrayList.sort(ArrayList.java:1804)
at knot//net.minecraft.class_457.getAdvancementsWithProgress(class_457.java:919)
at knot//net.minecraft.class_457.achievehunter$onMouseReleased(class_457.java:1455)
at knot//net.minecraft.class_4069.handler$zzg000$achievehunter$onMouseReleasedInAdvancementsScreen(class_4069.java:524)
at knot//net.minecraft.class_4069.method_25406(class_4069.java)
at knot//net.minecraft.class_312.mixinextras$bridge$method_25406$41(class_312.java)
at knot//net.minecraft.class_312.wrapOperation$bid000$fabric-screen-api-v1$invokeMousePressedEvents(class_312.java:1068)
at knot//net.minecraft.class_312.method_1601(class_312.java:128)
at knot//net.minecraft.class_312.method_22686(class_312.java:215)
at knot//net.minecraft.class_1255.execute(class_1255.java:110)
at knot//net.minecraft.class_312.method_22684(class_312.java:215)
at knot//org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at knot//org.lwjgl.system.JNI.invokeV(Native Method)
at knot//org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438)
at knot//com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:149)
at knot//com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:170)
at knot//net.minecraft.class_1041.method_15998(class_1041.java:318)
at knot//net.minecraft.class_310.method_1523(class_310.java:1361)
at knot//net.minecraft.class_310.method_1514(class_310.java:922)
at knot//net.minecraft.client.main.Main.main(Main.java:267)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:514)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions