blackd / Inventory-Profiles

Take control over you inventory. Sort. Move matching/all Items. Throw all/all items. Locked slots. Gear sets! And much more!
https://inventory-profiles-next.github.io/
GNU Affero General Public License v3.0
152 stars 50 forks source link

Crash when using 'throw all' (r + m) keybind #349

Closed triphora closed 1 year ago

triphora commented 1 year ago

Have you asked for help on discord?

NO

Minecraft Version/s

1.20.1

Modloader

Fabric

Modloader Version

0.14.21

Operating System

macOS

List of all other installed mods

Found in logs below

Describe the problem

The game crashes when using the 'throw all' keybind (r + m).

Log is available HERE, in the spoiler. I would copy-paste it, but I am on mobile and whenever I try to select text on that page it jumps back to the top.

Here's a bit of the stacktrace, remapped:

java.lang.IllegalStateException: Accessing LegacyRandomSource from multiple threads
at net.minecraft.util.thread.LockHelper.crash(LockHelper.java:84)
at net.minecraft.util.math.random.CheckedRandom.next(CheckedRandom.java:49)
at net.minecraft.util.math.random.BaseRandom.nextInt(BaseRandom.java:27)
at net.minecraft.client.world.ClientWorld.randomBlockDisplayTick(ClientWorld.java:382)
at net.minecraft.client.world.ClientWorld.doRandomBlockDisplayTicks(ClientWorld.java:363)
at net.minecraft.client.MinecraftClient.tick(MinecraftClient.java:1942)
at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1181)
at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:802)
at net.minecraft.client.main.Main.main(Main.java:250)

Which suggests that this may be something from vanilla acting haywire because of IPN.

Steps to reproduce

  1. Use the 'throw all' keybind (r + m)

Additional context

I have not opened this issue on Discord because I am a mod developer (and contributor to this mod) and do not need to be told what is a bug and what is not.

I have asked the person reporting to attempt to reproduce using only IPN. Considering the vanilla-only stacktrace/thread dumps, without any unobf mixin method names, though, I somewhat doubt this is related to interaction with other mods, though

I have tried to reproduce the problem with only or without "Inventory Profiles Next" and its dependencies installed.

blackd commented 1 year ago

I've seen this before but it was cased by sodium.

A wild guess is that keybinds of litematica and IPN are bumping heads. I suggest you change the defaut r+m to something that doesn't involve M or other litematica first keys.

triphora commented 1 year ago

Will get back to you when the reporter gets back to me about reproducing using only IPN. Probably worth changing the default keybind in that case.

blackd commented 1 year ago

also it might be mac specific which makes it impossible to fix since I don't have access to a mac

triphora commented 1 year ago

Looks like it can be reproduced with only IPN

https://empireminecraft.com/threads/mod-help-inventory-profiles-next-crashing.87186/#post-1629265

blackd commented 1 year ago

well it's mac specific then since I can't reproduce it on either Linux or windows.

This will be so annoying to track.

blackd commented 1 year ago

Can I have to config file

triphora commented 1 year ago

https://hst.sh/eximeripoh.json

blackd commented 1 year ago

I guess the interval between clicks is required by the server?

If not will it be possible they try without it.

blackd commented 1 year ago

I'll try to fix this in the release that will be out latter today but since I can't really test it it's just a guess work.

triphora commented 1 year ago

Yes, 1.10.7 fixes it. Thanks for the very quick response.