"DynamicTrees-1.12.2-0.9.5" Crash on Startup
A-Vladimir opened this issue ยท 9 comments
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Dynamic Trees (dynamictrees)
Caused by: java.lang.ArithmeticException: / by zero
latest.log
Follow up.
MC: 1.12.2
Forge: 2836 (Issue encountered on an earlier version, but suggested by mod involved "Apotheosis"
Minimal list of mods to reproduce.
Dynamic Trees 0.9.5
Apotheosis 1.9.4
Placebo 1.6.0 (used by Apotheosis)
Optifine: Encountered w/ "preview_OptiFine_1.12.2_HD_U_E4_pre4"
Additionally tested against "OptiFine_1.12.2_HD_U_E3"
This was tested without VanillaFix for the same outcome, then VanillaFix was added for convenience with the hastebin (link) which replicates the above report.
An fix for now would be to disable the garden module in Apotheosis Config.
PS: I posted this log before Apotheosis updated, but i don't think the issue is fixed yet.
IDK why optifine has to be involved as well but I'd guess the cacti since DynTrees don't touch sugar cane..
this looks simply like an oversight or an over optimistic approach
https://github.com/ferreusveritas/DynamicTrees/blob/1.12.2/src/main/java/com/ferreusveritas/dynamictrees/proxy/ClientProxy.java#L101
PixelBuffer pixbuf = new PixelBuffer(bakedTextureGetter.apply(resloc));
returns either something smaller than 16 pixel in width, so the following
PixelBuffer center = new PixelBuffer(u * 8, u * 8);
creates an empty Buffer that fails in the following calls with this crash
who exactly is modifying something here so it behaves not as to be expected is on another page, but this should simply be guarded against instead of trusting the input to be right
Recommentdation: Throw an Exception on your own containing a few details on what file fails in this case, because this seems like maybe a broken texture in a resourcepack, it is never checked that the textures are valid expect the resourcelocation being valid
Please use hastebin for error logs and stack traces.
Duplicate of #290.