Daomephsta / LootTweaker

A CraftTweaker addon that adds the ability to tweak loot tables
MIT License
17 stars 2 forks source link

0.4.0 Causing "Exception in server tick loop" error #95

Closed Lodgercat closed 4 months ago

Lodgercat commented 4 months ago

Describe the bug I was updating the mods in my personal modpack (https://www.curseforge.com/minecraft/modpacks/lodgercat-machines-magic-and-mythics-modpack) which involved updating Loottweaker from 0.3.3 to 0.4. However, upon joining the server, it would not let the client join and provided the error log below. Backdating to 0.3.3 - on both client and server - allowed me to join the server

To Reproduce Using the mods included in my modpack, or reviewing the log below

Expected behavior No error to occur when joining

Screenshots N/A

Logs & scripts https://mclo.gs/WXtoNsv

Version Info (Exact versions only): LootTweaker: 0.4.0 CraftTweaker/Minetweaker: 1.12-4.1.20.699.jar Forge: 1.12.2 Minecraft:

Additional context N/A

Daomephsta commented 4 months ago

Please provide your latest.log as well. It is potentially helpful in this case.

Lodgercat commented 4 months ago

crash-2024-06-04_18.35.42-server.txt 2024-06-04-6.log.gz 2024-06-04-7.log.gz latest.log

It might just be log 6 as the latest.log would have been overwritten when I changed the mods again and loaded it back up

Daomephsta commented 4 months ago

Nothing in there unfortunately. Try this JAR, it should fix the issue and log some info about what's causing it. So replace 0.3.3 with that JAR, run the game, load a world, and post the resulting latest.log.

The actual issue is probably in another mod, because a null there doesn't make sense.

Lodgercat commented 4 months ago

Apologies, been a busy few days. Will give it a try with that tomorrow. It is a big modpack so yeah could be anything conflicting

Lodgercat commented 4 months ago

SP Latest Log.zip

image image image image image ![Uploading image.png…]()

MP Latest Log.zip

Hopefully, I've done this right. I replaced 0.3.3 with the JAR and loaded both a single-player and multiplayer server of the same seed world. Some mod that I've updated seems to have partially converted the KFC I was hiding in into shulker chests and possibly some other blocks into other ones that I can't recall being there (in screenshots). Like there's random recycle bins from ZAWA, TARDIS glass and a tree made of stairs. Not sure if that's loot tweaker or another mod

Edit: Server just crashed with this error report. Maybe caused by a fishing net if I'm reading it right? crash-2024-06-08_20.45.11-server.txt

Daomephsta commented 4 months ago

Some mod that I've updated seems to have partially converted the KFC I was hiding in into shulker chests and possibly some other blocks into other ones that I can't recall being there (in screenshots). Like there's random recycle bins from ZAWA, TARDIS glass and a tree made of stairs. Not sure if that's loot tweaker or another mod

Edit: Server just crashed with this error report. Maybe caused by a fishing net if I'm reading it right? crash-2024-06-08_20.45.11-server.txt

Looks like block registry corruption. LootTweaker doesn't register any blocks or items, so it's another mod. The crash seems to be because the corruption means a block has the wrong tile entity, i.e. the corruption is the issue, not Actually Additions. I don't know much more about block registry corruption, it only happened to me once when I was messing the the modlist of an existing world a lot back in 1.7.10.

As for the SP and MP logs, I'm still looking at those.

Daomephsta commented 4 months ago

Tracked the problem to RLTweaker and CustomNPCs. They're both doing strange things to the Forge event bus by making use of internals, which ends up breaking LootTweaker's normally correct assumption that event listeners have an owning mod. I can see what RLTweaker is doing, but not why it needs to do it that way. CustomNPCs is a mystery. Might take a deeper look later, because I'm curious.

I'll add in a relevant null check to the next version. It's an easy fix and prevents a crash with a common mod that's no longer updated.

On a different note, your pack is hard to debug because it's so resource intensive. It takes ~8GB of RAM and ~10 minutes just to show the main menu. You can pare down the mod list of the reproduction case by using a binary search. This will make it a lot easier for a mod dev to debug. Particularly in a case like this where it's necessary to launch the whole pack.

Daomephsta commented 4 months ago

Closed by db5c662

Lodgercat commented 4 months ago

Tracked the problem to RLTweaker and CustomNPCs. They're both doing strange things to the Forge event bus by making use of internals,

I've decided to remove CustomNPCs as it seems more like a creative thing or for a single player world and more time. Thanks for finding what was causing the issues

On a different note, your pack is hard to debug because it's so resource intensive. It takes ~8GB of RAM and ~10 minutes just to show the main menu.

I did go all out for this modpack to see if it works and yeah it requires most of my 32GB of ram for the client and server which isn't great. Seems to work mostly ok as long as I've pregenerated the world