Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division by zero crash when checking out modded creative tabs #32

Open
copygirl opened this issue Jun 29, 2018 · 8 comments
Open

Division by zero crash when checking out modded creative tabs #32

copygirl opened this issue Jun 29, 2018 · 8 comments

Comments

@copygirl
Copy link

Full crash log: https://paste.ee/p/AjGyy

java.lang.ArithmeticException: / by zero
	at com.elytradev.fruitphone.FruitPhone$1.func_151244_d(FruitPhone.java:138)
	at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:921)
	at net.minecraft.client.gui.inventory.GuiContainerCreative.func_146976_a(GuiContainerCreative.java:758)
	at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:75)
	at net.minecraft.client.renderer.InventoryEffectRenderer.func_73863_a(InventoryEffectRenderer.java:51)
	at net.minecraft.client.gui.inventory.GuiContainerCreative.func_73863_a(GuiContainerCreative.java:643)
	at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:368)
	[...]

Minecraft: 1.12.2
Minecraft Forge: 14.23.4.2705
Fruit Phone: 2.84

TheCodedOne pushed a commit to TheCodedOne/FruitPhone that referenced this issue Aug 2, 2018
@copygirl
Copy link
Author

copygirl commented Aug 2, 2018

I'm confused about this, iTicks/20 should not cause a devision by zero regardless of what the value of iTicks is..? If that's the right line, wouldn't it be % FruitRecipes.craftableColors.size()? Since I ran the mod in optional mode, I suppose craftableColors is empty. The creative tab should not be added in the first place.

@unascribed
Copy link
Contributor

unascribed commented Aug 2, 2018

🤷‍♀️
I'm not maintaining it, just looked over the PR briefly and it didn't add any viruses so I merged it.

@unascribed unascribed reopened this Aug 2, 2018
@unascribed
Copy link
Contributor

unascribed commented Aug 2, 2018

But yeah, paying more attention to that diff there's no way it'd fix this issue. Div by zero is caused by "x/0" not "0/x".

I assumed the PR was tested. Silly me.

@TheCodedOne
Copy link
Contributor

I had tested the PR and couldn't reproduce the issue after the fix, i just assumed it was the issue

@TheCodedOne
Copy link
Contributor

Although i hadn't tested it in optional mode, since that wasn't specified i didn't think to test that

@unascribed
Copy link
Contributor

🤷‍♀️

Sorry for the salt, lots of ambient stress for me lately.

@alexbobp
Copy link
Member

alexbobp commented Aug 7, 2018

gotta reproduce before the fix

@unascribed
Copy link
Contributor

(didn't mean to close, commit rewrites confuse github)

@unascribed unascribed reopened this Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants