maruohon / itemscroller

A client-side Minecraft mod that adds various convenient ways of moving items within inventory GUIs, such as scrolling over stacks to move single items to or from it
GNU Lesser General Public License v3.0
146 stars 68 forks source link

Client crash when clicking a trading recipe #65

Open j0r1s opened 2 years ago

j0r1s commented 2 years ago

I don't know how I got to this point but when I click some Armorer villager trades the client is crashing with java.lang.IndexOutOfBoundsException: Index 6 out of bounds for length 6 error.

Screenshot of inventory : image

It looks like there is a difference between the recipes client side and server side, when I click the helmet, the shield appears in the output slot and if I click the shield, then the client crash.

If I hover over the helmet, the shield tooltip is displayed : image

Of course, this doesn't happen with itemscroller disabled and it looks like there is only one villager (out of a lot) affected.

Here is the crash report :

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 26/08/2021, 12:26
Description: Rendering screen

java.lang.IndexOutOfBoundsException: Index 6 out of bounds for length 6
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
    at java.base/java.util.Objects.checkIndex(Objects.java:359)
    at java.base/java.util.ArrayList.get(ArrayList.java:427)
    at net.minecraft.class_492.method_25394(class_492.java:227)
    at net.minecraft.class_757.method_3192(class_757.java:874)
    at net.minecraft.class_310.method_1523(class_310.java:1112)
    at net.minecraft.class_310.method_1514(class_310.java:728)
    at net.minecraft.client.main.Main.main(Main.java:217)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
    at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
    at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
    at java.base/java.util.Objects.checkIndex(Objects.java:359)
    at java.base/java.util.ArrayList.get(ArrayList.java:427)
    at net.minecraft.class_492.method_25394(class_492.java:227)

-- Screen render details --
Details:
    Screen name: net.minecraft.class_492
    Mouse location: Scaled: (409, 297). Absolute: (819.000000, 595.000000)
    Screen size: Scaled: (960, 509). Absolute: (1920, 1017). Scale factor of 2.000000

-- Affected level --
Details:
    All players: 1 total; [class_746['gw3ll'/450, l='ClientLevel', x=-816.80, y=77.00, z=-2684.97]]
    Chunk stats: 4096, 1023
    Level dimension: minecraft:overworld
    Level spawn location: World: (48,63,144), Section: (at 0,15,0 in 3,3,9; chunk contains blocks 48,0,144 to 63,255,159), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 73202370 game time, 84433529 day time
    Server brand: fabric
    Server type: Non-integrated multiplayer server
Stacktrace:
    at net.minecraft.class_638.method_8538(class_638.java:370)
    at net.minecraft.class_310.method_1587(class_310.java:2399)
    at net.minecraft.class_310.method_1514(class_310.java:747)
    at net.minecraft.client.main.Main.main(Main.java:217)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
    at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
    at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)

-- Last reload --
Details:
    Reload number: 1
    Reload reason: initial
    Finished: Yes
    Packs: Default, Fabric Mods, VanillaTweaks_r637673.zip

-- System Details --
Details:
    Minecraft Version: 1.17.1
    Minecraft Version ID: 1.17.1
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 16.0.1, Microsoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
    Memory: 1174111320 bytes (1119 MiB) / 2483027968 bytes (2368 MiB) up to 4294967296 bytes (4096 MiB)
    CPUs: 16
    Processor Vendor: AuthenticAMD
    Processor Name: AMD Ryzen 7 3700X 8-Core Processor             
    Identifier: AuthenticAMD Family 23 Model 113 Stepping 0
    Microarchitecture: Zen 2
    Frequency (GHz): 3.60
    Number of physical packages: 1
    Number of physical CPUs: 8
    Number of logical CPUs: 16
    Graphics card #0 name: NVIDIA GeForce RTX 2070 SUPER
    Graphics card #0 vendor: NVIDIA (0x10de)
    Graphics card #0 VRAM (MB): 4095.00
    Graphics card #0 deviceId: 0x1e84
    Graphics card #0 versionInfo: DriverVersion=27.21.14.6627
    Memory slot #0 capacity (MB): 16384.00
    Memory slot #0 clockSpeed (GHz): 3.20
    Memory slot #0 type: DDR4
    Memory slot #1 capacity (MB): 16384.00
    Memory slot #1 clockSpeed (GHz): 3.20
    Memory slot #1 type: DDR4
    Virtual memory max (MB): 37561.71
    Virtual memory used (MB): 12619.86
    Swap memory total (MB): 4864.00
    Swap memory used (MB): 0.00
    JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
    Fabric Mods: 
        blue_endless_jankson: jankson 1.2.1
        carpet: Carpet Mod 1.4.43
        carpet-autocraftingtable: Carpet-AutoCraftingTable 1.4.35
        carpet-extra: Carpet Extra 1.4.43
        chunky: Chunky 1.2.93
        cloth-basic-math: Cloth Basic Math 0.5.1
        cloth-config2: Cloth Config v4 5.0.34
        com_moandjiezana_toml_toml4j: toml4j 0.7.2
        com_velocitypowered_velocity-native: velocity-native 1.1.0-SNAPSHOT
        cullparticles: Cull Particles 2.0
        dynamicfps: Dynamic FPS 2.0.4
        essentialaddons: Essential Addons 1.17.1-1.0.3
        fabric: Fabric API 0.37.0+1.17
        fabric-api-base: Fabric API Base 0.3.0+a02b446313
        fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.2.0+2b5c62d018
        fabric-biome-api-v1: Fabric Biome API (v1) 3.1.11+c345aea818
        fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.5+a02b446318
        fabric-command-api-v1: Fabric Command API (v1) 1.1.2+6cefd57718
        fabric-commands-v0: Fabric Commands (v0) 0.2.2+92519afa18
        fabric-containers-v0: Fabric Containers (v0) 0.1.12+a02b446318
        fabric-content-registries-v0: Fabric Content Registries (v0) 0.2.2+a02b446318
        fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.5+be9da31018
        fabric-dimensions-v1: Fabric Dimensions API (v1) 2.0.11+6cefd57718
        fabric-entity-events-v1: Fabric Entity Events (v1) 1.1.0+a02b446318
        fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.9+a722d8c018
        fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.1+92519afa18
        fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.7+6cefd57718
        fabric-item-api-v1: Fabric Item API (v1) 1.2.4+a02b446318
        fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.10+b7ab612118
        fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.4+a02b446318
        fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.2+36b77c3e18
        fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.4.4+a02b44633d
        fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.4+a02b446318
        fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.3+92519afa18
        fabric-models-v0: Fabric Models (v0) 0.3.0+a02b446318
        fabric-networking-api-v1: Fabric Networking API (v1) 1.0.12+6cefd57718
        fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.11+a02b446318
        fabric-networking-v0: Fabric Networking (v0) 0.3.2+92519afa18
        fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.10.9+b7ab612118
        fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.3+a02b446318
        fabric-particles-v1: Fabric Particles (v1) 0.2.4+a02b446318
        fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.10+e2961fee18
        fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.4+5f02c96918
        fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.8+a02b446318
        fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.0+a02b446318
        fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.5+a02b446313
        fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.13+a02b446318
        fabric-rendering-v0: Fabric Rendering (v0) 1.1.2+92519afa18
        fabric-rendering-v1: Fabric Rendering (v1) 1.6.0+a02b446318
        fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.7+b7ab61213d
        fabric-screen-api-v1: Fabric Screen API (v1) 1.0.4+155f865c18
        fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.8+a02b446318
        fabric-structure-api-v1: Fabric Structure API (v1) 1.1.12+6cefd57718
        fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.1.4+a02b446318
        fabric-textures-v0: Fabric Textures (v0) 1.0.6+a02b446318
        fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.12+b7ab612118
        fabric-transfer-api-v1: Fabric Transfer API (v1) 1.0.0+3fe3c3f518
        fabricloader: Fabric Loader 0.11.6
        ferritecore: FerriteCore 3.0.1
        inventorysorter: Inventory Sorter 1.7.9-1.17
        iris: Iris 1.1.1
        itemscroller: Item Scroller 0.15.0-dev.20210707.005506
        java: OpenJDK 64-Bit Server VM 16
        krypton: Krypton 0.1.4
        kyrptconfig: Kytpt Config 1.1.10-1.17
        lazydfu: LazyDFU 0.1.2
        litematica: Litematica 0.0.0-dev.20210713.103711
        lithium: Lithium 0.7.3
        malilib: MaLiLib 0.10.0-dev.24
        minecraft: Minecraft 1.17.1
        minihud: MiniHUD 0.19.0-dev.20210707.150016
        modmenu: Mod Menu 2.0.4
        sodium: Sodium 0.3.0+IRIS2
        starlight: Starlight 1.0.0-RC3+fabric.2b7d7ae
        tweakeroo: Tweakeroo 0.10.0-dev.20210710.155746
    Launched Version: fabric-loader-0.11.6-1.17.1
    Backend library: LWJGL version 3.2.2 build 10
    Backend API: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 GL version 3.2.0 NVIDIA 466.27, NVIDIA Corporation
    Window size: 1920x1017
    GL Caps: Using framebuffer using OpenGL 3.2
    GL debug messages: 
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'fabric'
    Type: Client (map_client.txt)
    Graphics mode: fancy
    Resource Packs: vanilla, Fabric Mods, file/VanillaTweaks_r637673.zip
    Current Language: English (US)
    CPU: 16x AMD Ryzen 7 3700X 8-Core Processor 
crepls commented 2 years ago

i have the same issue, stays persistent with certain villager. crash occurs when clicking the last trade, which shows no tooltip.

it seems like the items are shifted upwards?

image image

After unlocking a new trade the issue fixes itself:

image

crash log:

---- Minecraft Crash Report ----
// There are four lights!

Time: 1/8/22, 7:58 PM
Description: Rendering screen

java.lang.IndexOutOfBoundsException: Index 7 out of bounds for length 6
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
    at java.base/java.util.Objects.checkIndex(Objects.java:359)
    at java.base/java.util.ArrayList.get(ArrayList.java:427)
    at net.minecraft.class_492.method_25394(class_492.java:227)
    at net.minecraft.class_757.method_3192(class_757.java:875)
    at net.minecraft.class_310.method_1523(class_310.java:1117)
    at net.minecraft.class_310.method_1514(class_310.java:733)
    at net.minecraft.client.main.Main.main(Main.java:238)
    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 net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:608)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
    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 org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210)
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245)
    at org.multimc.EntryPoint.listen(EntryPoint.java:143)
    at org.multimc.EntryPoint.main(EntryPoint.java:34)

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
    at java.base/java.util.Objects.checkIndex(Objects.java:359)
    at java.base/java.util.ArrayList.get(ArrayList.java:427)
    at net.minecraft.class_492.method_25394(class_492.java:227)

-- Screen render details --
Details:
    Screen name: net.minecraft.class_492
    Mouse location: Scaled: (263, 209). Absolute: (791.000000, 629.000000)
    Screen size: Scaled: (640, 339). Absolute: (1920, 1017). Scale factor of 3.000000
Stacktrace:
    at net.minecraft.class_757.method_3192(class_757.java:875)
    at net.minecraft.class_310.method_1523(class_310.java:1117)
    at net.minecraft.class_310.method_1514(class_310.java:733)
    at net.minecraft.client.main.Main.main(Main.java:238)
    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 net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:608)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
    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 org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210)
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245)
    at org.multimc.EntryPoint.listen(EntryPoint.java:143)
    at org.multimc.EntryPoint.main(EntryPoint.java:34)

-- Affected level --
Details:
    All players: 1 total; [class_746['crepls'/1440202, l='ClientLevel', x=1483.17, y=10.00, z=-152.25]]
    Chunk stats: 729, 464
    Level dimension: minecraft:overworld
    Level spawn location: World: (0,84,0), Section: (at 0,4,0 in 0,5,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511)
    Level time: 51389 game time, 27198714 day time
    Server brand: Paper
    Server type: Non-integrated multiplayer server
Stacktrace:
    at net.minecraft.class_638.method_8538(class_638.java:408)
    at net.minecraft.class_310.method_1587(class_310.java:2402)
    at net.minecraft.class_310.method_1514(class_310.java:752)
    at net.minecraft.client.main.Main.main(Main.java:238)
    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 net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:608)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
    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 org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210)
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245)
    at org.multimc.EntryPoint.listen(EntryPoint.java:143)
    at org.multimc.EntryPoint.main(EntryPoint.java:34)

-- Last reload --
Details:
    Reload number: 1
    Reload reason: initial
    Finished: Yes
    Packs: Default, Fabric Mods

-- System Details --
Details:
    Minecraft Version: 1.18.1
    Minecraft Version ID: 1.18.1
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 17.0.1, Eclipse Adoptium
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Eclipse Adoptium
    Memory: 536353040 bytes (511 MiB) / 1245708288 bytes (1188 MiB) up to 3221225472 bytes (3072 MiB)
    CPUs: 12
    Processor Vendor: AuthenticAMD
    Processor Name: AMD Ryzen 5 3600 6-Core Processor              
    Identifier: AuthenticAMD Family 23 Model 113 Stepping 0
    Microarchitecture: Zen 2
    Frequency (GHz): 3.60
    Number of physical packages: 1
    Number of physical CPUs: 6
    Number of logical CPUs: 12
    Graphics card #0 name: NVIDIA GeForce RTX 2060
    Graphics card #0 vendor: NVIDIA (0x10de)
    Graphics card #0 VRAM (MB): 4095.00
    Graphics card #0 deviceId: 0x1f08
    Graphics card #0 versionInfo: DriverVersion=30.0.14.7212
    Memory slot #0 capacity (MB): 8192.00
    Memory slot #0 clockSpeed (GHz): 2.67
    Memory slot #0 type: DDR4
    Memory slot #1 capacity (MB): 8192.00
    Memory slot #1 clockSpeed (GHz): 2.67
    Memory slot #1 type: DDR4
    Virtual memory max (MB): 26576.20
    Virtual memory used (MB): 12794.17
    Swap memory total (MB): 10240.00
    Swap memory used (MB): 21.89
    JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms512m -Xmx3072m
    Launched Version: MultiMC5
    Backend library: LWJGL version 3.2.2 build 10
    Backend API: NVIDIA GeForce RTX 2060/PCIe/SSE2 GL version 3.2.0 NVIDIA 472.12, NVIDIA Corporation
    Window size: 1920x1017
    GL Caps: Using framebuffer using OpenGL 3.2
    GL debug messages: 
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'fabric'
    Type: Client (map_client.txt)
    Graphics mode: fancy
    Resource Packs: Fabric Mods
    Current Language: English (US)
    CPU: 12x AMD Ryzen 5 3600 6-Core Processor 
maruohon commented 2 years ago

I believe you can disable the option in I + C -> Generic -> villagerTradeListRememberScrollPosition to prevent the crash for now. I'll need to fix it at some point, but I'm not really sure how it manages to store an invalid position in the first place...