TwelveIterationMods / CookingForBlockheads

Minecraft Mod. Adds a cooking book and multiblock kitchens that only shows recipes you can make with what you currently have in your inventory.
https://mods.twelveiterations.com/mc/cooking-for-blockheads/
Other
80 stars 80 forks source link

Crash with Tardis mod on server startup #547

Closed 1nd1r4 closed 2 years ago

1nd1r4 commented 3 years ago

Versions

Describe the bug Server crashes on startup. See Log.

To Reproduce Steps to reproduce the behavior:

  1. Use Tardis-Mod-1.16.5-1.5.1 with CookingForBlockheads
  2. start server
  3. server crashes without crash-report.

Expected behavior No crash.

Log latest.log

Unixkitty commented 3 years ago

It seems that this is the same issue I reported some time ago: https://github.com/ModdingForBlockheads/CookingForBlockheads/issues/543

BlayTheNinth commented 2 years ago

@50ap5ud5 I think I found the problem:

https://gitlab.com/Spectre0987/TardisMod-1-14/-/blob/1.16/src/main/java/net/tardis/mod/events/CommonEvents.java#L674 and https://gitlab.com/Spectre0987/TardisMod-1-14/-/blob/1.16/src/main/java/net/tardis/mod/events/CommonEvents.java#L682

In your reload listeners you call thenRunAsync. This causes all reload listeners after yours to run on the CompletableFuture.ASYNC_POOL which seems to be causing classloading issues that eventually result in the above crash.

Using thenRun instead avoids the problem. If you actually do need them to be async you should pass your own Executor to make sure it doesn't use the default one, since the default one seems to have a different parent class loader than mod/mc classes.

(https://gitlab.com/Spectre0987/TardisMod-1-14/-/merge_requests/67)

BlayTheNinth commented 2 years ago

Closing since this is just waiting on a Tardis update