spoorn / sodium-forge

A Fabric..... I mean Forge mod designed to improve frame rates and reduce micro-stutter
GNU Lesser General Public License v3.0
28 stars 8 forks source link

Strange Compatibility Issue with Refined Pipes and Mekanism #60

Closed glencoe2004 closed 3 years ago

glencoe2004 commented 3 years ago

Reproduction Steps

Honestly, this issue is pretty weird. Going directly to world 2 from startup will crash immediately, but loading world 1 then 2 will allow it to launch just fine.

  1. Open up World 2, and observe that it crashes due to Sodium
  2. Relaunch the game, open up World 1, note that it uses refined pipes with Mekanism machines and does not crash
  3. Exit to the main menu and open up World 2 while still in the same Minecraft instance, the world will load fine and not crash

World 1 World 2

Crash Report File

Crash log is available here.

[Optional] Server/Client logs

Slightly redacted client and debug.logs are available at the above link with the crash report.

Mods list

[✔️] 1.16.5-enchantedgoldenapplecrafting-1.0 [✔️] AdditionalEnchantedMiner-1.16.5-16.1.7 [✔️] AI-Improvements-1.16.2-0.3.0 [✔️] architectury-1.18.25-forge [✔️] ars_nouveau-1.16.5-1.19.3 [✔️] Artifacts-1.16.5-2.9.3 [✔️] Auto-Smelting+1.2 [✔️] branders-spawnermod-1.16.5-1.7.11 [✔️] caelus-forge-1.16.5-2.1.3.0 [✔️] cavebiomes-2.0 [✔️] CavesAndCliffsBackport-6.1 [✔️] ClassicCombat-1.16.4-universal [✔️] collective-1.16.5-2.26 [✔️] Craftable_NameTag+1.16.x [✔️] CraftTweaker-1.16.5-7.1.0.330 [✔️] curioofundying-forge-1.16.5-5.2.0.0 [✔️] curios-forge-1.16.5-4.0.5.2 [✔️] curiouselytra-forge-1.16.5-4.0.2.3 [✔️] Cyclic-1.16.5-1.2.11 [✔️] Disenchanting-forge-1.16.5-1.7.1 [✔️] easy_villagers-1.16.5-1.0.11 [✔️] elevatorid-1.16.5-1.7.13 [✔️] expandability-2.0.1-forge [✔️] extendedbonemeal_1.16.5-1.3 [✔️] extremeSoundMuffler-3.13-1.16.5 [✔️] FastFurnace-1.16.3-4.3.0 [✔️] FastWorkbench-1.16.4-4.5.1 [✔️] FluxNetworks-1.16.5-6.1.7.12 [✔️] ftb-gui-library-1605.2.1.41-forge [✔️] ftb-library-forge-1605.3.1-build.38 [✔️] ftb-ultimine-1603.1.1.13 [✔️] GamemodeOverhaul-1.16.4-1.4.2.4 [✔️] geckolib-forge-1.16.5-3.0.41 [✔️] hplus-forge-2.0.0 [✔️] Hwyla-forge-1.10.11-B78_1.16.2 [✔️] InfinityMending-1.16.3-0.1.0 [✔️] Inspirations-1.16.5-1.2.3.37 [✔️] jei-1.16.5-7.7.0.106 [✔️] JEITweaker-1.16.5-1.0.1.33 [✔️] Mantle-1.16.5-1.6.109 [✔️] Mekanism-1.16.5-10.0.21.448 [✔️] MekanismAdditions-1.16.5-10.0.21.448 [✔️] MekanismGenerators-1.16.5-10.0.21.448 [✔️] MekanismTools-1.16.5-10.0.21.448 [✔️] mob_grinding_utils-1.16.5-0.4.23 [✔️] mobcatcher-3.2 [✔️] NaturesCompass-1.16.5-1.9.0 [✔️] notenoughcrashes-3.2.0-forge [✔️] paintings-1.16.4-7.0.0.1 [✔️] Patchouli-1.16.4-53 [✔️] Placebo-1.16.4-4.5.0 [✔️] randompatches-2.4.4-forge [✔️] refinedpipes-0.5 [✔️] refinedstorage-1.9.13 [✔️] refinedstorageaddons-0.7.2 [✔️] ScalableCatsForce-2.13.5-build-2-with-library [✔️] sodium-forge-2.6+rev.39f57a1 [✔️] StorageDrawers-1.16.3-8.2.2 [✔️] storagetech-1.16.4-R1.3 [✔️] supermartijn642corelib-1.0.9-mc1.16.5 [✔️] swingthroughgrass-1.16.4-1.5.3 [✔️] tesseract-1.0.21-mc1.16.5 [✔️] Toast-Control-1.16.3-4.3.0 [✔️] worldedit-forge-mc1.16.3-7.2.1-dist

Additional Information

In an older version, attempting to attach an energy pipe to a Mekanism Wind Generator would immediately crash the game with a similar rendering error. However, updating fixed this issue.

spoorn commented 3 years ago

Sodium builds chunks on multiple threads, and the Map from RefinedPipes is not thread safe: https://github.com/refinedmods/refinedpipes/blob/mc1.16/src/main/java/com/refinedmods/refinedpipes/render/PipeBakedModel.java#L33

You will have to follow up with RefinedPipes to fix it