NotEnoughItems Unofficial 1.7.10

NotEnoughItems Unofficial 1.7.10

436k Downloads

[2.1.2-GTNH] Crash right clicking recipe outputs

xJon opened this issue ยท 11 comments

commented

Hi,
There seems to be a bug/conflict where right clicking on recipe outputs causes the game to crash.
This has been reported to my modpack over xJon/The-1.7.10-Pack#1942. Crash report: https://paste.ubuntu.com/p/wHXCN3zGgm/.
Any idea what's causing this?
Thanks!

commented

It looks like this a pack/recipe issue, not a NEI issue. You'll need to track down the recipe that has a null result, as that's what is causing this issue. The only interaction w/ NEI is some of the NEI ASM grabbing the onClick event to hijack it, and then pass it along.

Your other option would be to fork FairyLights and fix these lines to properly check for a NULL instead of assuming the result is valid: https://github.com/pau101/Fairy-Lights/blob/1.7.10/src/main/java/com/pau101/fairylights/item/crafting/RecipeDyeColorNBT.java#L98-L99

image

The later versions look to be licensed under the MIT license, but there's no clear indicator on the 1.7.10 branch.

commented

Thank you for the response, it's still odd to me that this crash does not happen without GTNH's NEI installed but I understand this is a Fairy Lights bug!

commented

I was looking to see if there was any obvious place NEI could add another safety check, but didn't see one. It looks like it's interaction is limited to passing the onClick event along...

commented

I see, well thank you nonetheless for the replies and the guiding :)

commented

Hi, is there an expected solution for this apart from removing Fairy Lights? Thank you!

commented

Interesting, this error in particular seems to be specifically a fairylights crash, have you tried disabling the mod and seeing if you can reproduce it with another?

commented

The log indicates you're on NotEnoughItems{2.0.9-GTNH} not 2.1.2. Also as tyrael93 indicated, it looks like it's a crash coming from Fairylights tcom.pau101.fairylights.item.crafting.RecipeDyeColorNBT.func_77569_a(RecipeDyeColorNBT.java:99)

A few things I'd suggest

  1. Try with the latest GTNH NEI 2.1.2
  2. Try with non GTNH NEI (1.x) from chickebone
  3. Try without fairylights
commented

It's crashing in this method

	@Override
	public boolean matches(InventoryCrafting inventoryCrafting, World world) {
		result = recipeOutput.copy();
		result.setTagInfo("color", new NBTTagInt(11));
		for (int i = 0; i <= 3 - recipeWidth; i++) {
			for (int j = 0; j <= 3 - recipeHeight; j++) {
				if (checkMatch(inventoryCrafting, i, j, true)) {
					return true;
				}

				if (checkMatch(inventoryCrafting, i, j, false)) {
					return true;
				}
			}
		}
		result = null;
		return false;
	}

It looks like it might be an invalid/null recipe result?

commented

It's crashing on the same line tcom.pau101.fairylights.item.crafting.RecipeDyeColorNBT.func_77569_a(RecipeDyeColorNBT.java:99) for all of the versions of NEI you've provided a crash log for.

It's looking like a null recipe output (pack issue), or fairylights bug (not handling null properly).

commented

Hi, thanks for the quick replies!

  • Sorry for the wrong log, it does still crash with 2.1.2 - https://pastebin.com/afx5a1bB
  • With 1.0.5.120 it does not crash consistently, but still sometimes, with a different report - https://pastebin.com/z7Edjz75
  • I can confirm the game does not crash when Fairy Lights is not present.
  • I can also confirm that the game does not crash when NEI is not present (and Fairy Lights is) - it also behaves differently, by not crafting an entire stack when right clicking the output, but only 1 unit.
commented

Pretty sure it's a Fairy Lights bug, but as I mentioned it does not cause a crash when NEI is not installed.
Could there be any workaround so we can have both? I already asked and Fairy Lights doesn't really offer support for 1.7.10.