Game frequently crashes in trade market
Symmettry opened this issue ยท 4 comments
When trying to change to "Least expensive" the game crashes a lot of of the time, and most other times it just never loads anything.
Can you provide logs? Are you sure this is a Wynntils issue? Wynncraft used to "crash" (close) the trade market for that exact filter option a while back, due to a bug.
Can you provide logs? Are you sure this is a Wynntils issue? Wynncraft used to "crash" (close) the trade market for that exact filter option a while back, due to a bug.
Entire game crashes.
Time: 2024-06-02 07:16:25
Description: mouseClicked event handler
java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap.values()" because "itemsOnPage" is null
at com.wynntils.screens.trademarket.TradeMarketSearchResultHolder.clickOnItem(TradeMarketSearchResultHolder.java:178)
at com.wynntils.screens.trademarket.TradeMarketSearchResultScreen.method_25402(TradeMarketSearchResultScreen.java:256)
at net.minecraft.class_312.method_1611(class_312.java:99)
at net.minecraft.class_437.method_25412(class_437.java:414)
at net.minecraft.class_312.method_1601(class_312.java:99)
at net.minecraft.class_312.method_22686(class_312.java:180)
at net.minecraft.class_1255.execute(class_1255.java:102)
at net.minecraft.class_312.method_22684(class_312.java:180)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438)
at com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:201)
at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:219)
at net.minecraft.class_1041.method_15998(class_1041.java:287)
at net.minecraft.class_310.method_1523(class_310.java:1297)
at net.minecraft.class_310.method_1514(class_310.java:856)
at net.minecraft.client.main.Main.main(Main.java:253)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
A detailed walkthrough of the error, its code path and all known details is as follows:
-- Head --
Thread: Render thread
Stacktrace:
at com.wynntils.screens.trademarket.TradeMarketSearchResultHolder.clickOnItem(TradeMarketSearchResultHolder.java:178)
at com.wynntils.screens.trademarket.TradeMarketSearchResultScreen.method_25402(TradeMarketSearchResultScreen.java:256)
at net.minecraft.class_312.method_1611(class_312.java:99)
at net.minecraft.class_437.method_25412(class_437.java:414)
at net.minecraft.class_312.method_1601(class_312.java:99)
at net.minecraft.class_312.method_22686(class_312.java:180)
at net.minecraft.class_1255.execute(class_1255.java:102)
at net.minecraft.class_312.method_22684(class_312.java:180)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438)
at com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:201)
at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:219)
-- Affected screen --
Details:
Screen name: com.wynntils.screens.trademarket.TradeMarketSearchResultScreen
Stacktrace:
at net.minecraft.class_437.method_25412(class_437.java:414)
at net.minecraft.class_312.method_1601(class_312.java:99)
at net.minecraft.class_312.method_22686(class_312.java:180)
at net.minecraft.class_1255.execute(class_1255.java:102)
at net.minecraft.class_312.method_22684(class_312.java:180)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438)
at com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:201)
at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:219)
at net.minecraft.class_1041.method_15998(class_1041.java:287)
at net.minecraft.class_310.method_1523(class_310.java:1297)
at net.minecraft.class_310.method_1514(class_310.java:856)
at net.minecraft.client.main.Main.main(Main.java:253)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
For the latter issue, WynntilsContainerScreen need to implement more methods as final and add a wrapped version. mouseClicked
, dragged, scrolled, released etc as a minimum.
// Check if the item is on a later or earlier page
for (int i = 0; i < itemMap.size(); i++) {
// Skip the current page
if (i == currentPage) continue;
boolean foundItem = false;
Int2ObjectSortedMap<ItemStack> itemsOnPage = itemMap.get(i);
for (ItemStack itemStack : itemsOnPage.values()) { <=== crash here
Apparently our trust that itemMap has all consecutive values is incorrect. Might be some kind of race, I have not looked into details.
What also disturbs me is that our crash handler did not catch this and just closed the screen. It apparently needs to be extended.