Actuator Model crash when using FoamFix smallPropertyStorage
scotty9090 opened this issue ยท 16 comments
Game crashes while trying to render @Railcraft items in JEI. I get to about @ra when it crashes
and then need to restore from backup.
Running the 12.0.0 build of RC.
Log file snippet:
Description: Rendering ingredient
java.lang.NullPointerException: Rendering ingredient
at mods.railcraft.client.render.models.resource.ActuatorModel$CompositeModel.func_188616_a(ActuatorModel.java:196)
at net.minecraft.client.renderer.RenderItem.func_191967_a(RenderItem.java:127)
at net.minecraft.client.renderer.RenderItem.func_191961_a(RenderItem.java:106)
at mezz.jei.render.ItemStackFastRenderer.uncheckedRenderItemAndEffectIntoGUI(ItemStackFastRenderer.java:63)
at mezz.jei.render.ItemStackFastRenderer.renderItemAndEffectIntoGUI(ItemStackFastRenderer.java:32)
at mezz.jei.render.IngredientListBatchRenderer.render(IngredientListBatchRenderer.java:157)
at mezz.jei.gui.overlay.IngredientGrid.draw(IngredientGrid.java:99)
at mezz.jei.gui.overlay.IngredientGridWithNavigation.draw(IngredientGridWithNavigation.java:97)
at mezz.jei.gui.overlay.IngredientListOverlay.drawScreen(IngredientListOverlay.java:161)
at mezz.jei.gui.GuiEventHandler.onDrawBackgroundEventPost(GuiEventHandler.java:62)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_3898_GuiEventHandler_onDrawBackgroundEventPost_BackgroundDrawnEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraft.client.gui.GuiScreen.func_146276_q_(GuiScreen.java:575)
at net.minecraft.client.gui.inventory.GuiContainerCreative.func_73863_a(GuiContainerCreative.java:615)
at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:396)
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1124)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Relevant portion of logfile (I couldn't paste the full thing in Pastebin - let me know if more is needed and I can try uploading to Github):
hmm, why would there be invalid white flag variants? will add a null check most likely
Game crashes while trying to render @Railcraft items in JEI. I get to about @ra when it crashes
and then need to restore from backup.Running the 12.0.0 build of RC.
Log file snippet:
Description: Rendering ingredient
java.lang.NullPointerException: Rendering ingredient
at mods.railcraft.client.render.models.resource.ActuatorModel$CompositeModel.func_188616_a(ActuatorModel.java:196)
at net.minecraft.client.renderer.RenderItem.func_191967_a(RenderItem.java:127)
at net.minecraft.client.renderer.RenderItem.func_191961_a(RenderItem.java:106)
at mezz.jei.render.ItemStackFastRenderer.uncheckedRenderItemAndEffectIntoGUI(ItemStackFastRenderer.java:63)
at mezz.jei.render.ItemStackFastRenderer.renderItemAndEffectIntoGUI(ItemStackFastRenderer.java:32)
at mezz.jei.render.IngredientListBatchRenderer.render(IngredientListBatchRenderer.java:157)
at mezz.jei.gui.overlay.IngredientGrid.draw(IngredientGrid.java:99)
at mezz.jei.gui.overlay.IngredientGridWithNavigation.draw(IngredientGridWithNavigation.java:97)
at mezz.jei.gui.overlay.IngredientListOverlay.drawScreen(IngredientListOverlay.java:161)
at mezz.jei.gui.GuiEventHandler.onDrawBackgroundEventPost(GuiEventHandler.java:62)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_3898_GuiEventHandler_onDrawBackgroundEventPost_BackgroundDrawnEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraft.client.gui.GuiScreen.func_146276_q_(GuiScreen.java:575)
at net.minecraft.client.gui.inventory.GuiContainerCreative.func_73863_a(GuiContainerCreative.java:615)
at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:396)
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1124)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)Relevant portion of logfile (I couldn't paste the full thing in Pastebin - let me know if more is needed and I can try uploading to Github):
YOoo ik heb ook deze crash man
I ALSO Have this crash man this weed is good
sucks PLEASE FIX # @scotty9090 @liach @codydbgt @adudney @EoD
resulted in me finding out that specifically disabling
smallPropertyStorage
in FoamFix'scoremod
section fixes the crash.
Can confirm this fixes the issue. Thanks @DaMatrix
Got the same crash. https://paste.dimdev.org/eyilimuqop.rb
Can somebody experiencing this crash humour me and try without foamfix ? Allocated RAM may need to be increased.
I was experiencing this crash, added railcraft to FTB Interactions, which has FoamFix. After I removed FoamFix the Actuator no longer caused crashes while being rendered by JEI.
@Lyokanthrope And did you try it without foamfix? I don't ask this to point fingers -- if an interaction can be reliably demonstrated, it's important to know.
Yes, disabling Foamfix fixed the issue.
I then tried Foamfix with the coremod functionality turned off, and that seemed to solve the problem.
Can also confirm
https://paste.ee/p/VLKzD
EDIT: Yes, I did see that disabling the coremod functionality of FoamFix solves it, but that's not really a feasible option...
EDIT 2: Some testing resulted in me finding out that specifically disabling smallPropertyStorage
in FoamFix's coremod
section fixes the crash.
I suspect this has to do with these lines:
return new CompositeModel(
baseModels.get(baseModelLocations.get(blockState)),
redFlagModels.get(redFlagModelLocations.get(blockState)),
whiteFlagModels.get(whiteFlagModelLocations.get(blockState))
);
Perhaps using the blockstate as a map key fails with FoamFix's changes?
The maps are generated from blockIn.getBlockState().getValidStates(), which is generated by the code that FoamFix replaces.
I don't seem to be able to run FoamFix in my dev environment, so fixing this will be difficult.
Pinging @asiekierka
I've largely quit Minecraft modding by the end of last year, and FoamFix is also in a state of mild disrepair as a result. I may find some time to have a look, but no promises.
EDIT: However, I am fairly certain I don't break using BlockStates as map keys. A lot of places rely on that capability. It might be something more subtle.