
AE2 Export Bus Voiding Items
jude123412 opened this issue ยท 21 comments
When I auto-craft any item, amount doesn't matter it will randomly void at least 1 item.
Describe the bug
I request an item to be crafted. for instance I request to craft 7 Platinum plates from Greg Tech and only 6 items show up in my ME system. This is even more apparent when I request a Lapotronic Energy Orb from Greg Tech. The ME system also recognizes that all the items have been received and the craft finishes in the Crafting CPU.
To Reproduce
Place an export bus with a fuzzy card in it. then filter any Hot ingot from Greg tech into the export bus. Have the export bus exporting into any Greg Tech Input Bus with an Ore Dictionary Filter on the same side the Export Bus is exporting into. Make the Ore Dictionary Filter Only Accept ingotHot*. Then the ME system will take random items with the name gregtech:meta_item_1 and void them, They won't end up in the Input Hatch and they leave the system
Expected behavior
Auto-crafting will randomly void 1 return item when the craft has finished
Additional context
This video shows what the bug does.
https://user-images.githubusercontent.com/104434396/216282561-f2ed54da-cb9c-4a33-aba1-d0f461352cfc.mp4
Environment
I'm using the latest AE2 Unofficial Extended Life version 0.54.20,
AE2 Fluid Crafting rework mod v2.4.12
Greg tech Community Edition 1.10.2.566.
- Minecraft Version: 1.12.2
- AE2 Version: rv6-stable-7-extended_life-v0.54.20
- Forge Version: 14.23.5.2847
Ok, I have found the bug and it can be reproduced in a test world using the same versions as I have stated above.
To Reproduce
Place an export bus with a fuzzy card in it. then filter any Hot ingot from Greg tech into the export bus. Have the export bus exporting into any Greg Tech Input Bus with an Ore Dictionary Filter on the same side the Export Bus is exporting into. Make the Ore Dictionary Filter Only Accept ingotHot*. Then the ME system will take random items with the name gregtech:meta_item_1 and void them, They won't end up in the Input Hatch and they leave the system
As mentioned in the linked issue, I have noticed this happening too, mainly when someone is logged out. doesn't only happen when exporting into a GTC storage bus, and happens with multiple containers, fuzzy card may or may not be related?
After skimming the code I'm fairly confident the issue remains in PartExportBus.java
From semantics alone, I have nailed it down to PROBABLY these lines
for (final IAEItemStack o : ImmutableList.copyOf(inv.getStorageList().findFuzzy(ais, fzMode))) {
this.pushItemIntoTarget(destination, energy, inv, o);
if (this.itemToSend <= 0) {
break;
}
}
However, I'm not sure if its an issue of logic or something doing something naughty.
If this happens w/o the fuzzy export bus, I would suspect there's an issue in pushItemIntoTarget, where poweredExtraction() is called, but never inserted because itemsToAdd == null for one reason or another
Alternatively it could be an issue with the tickrate modulation. Or the GridAccessAcception which... does not log errors
@jude123412 Do you know if this happens without fuzzy on the export bus?
sorry for pinging on an older issue lol
I just just re-created it in my test world and it only happens with the fuzzy card. Its a bit weird why I couldn't re-create this in a brand new world?
hmmm. I have testing it with and without a fuzzy card and nothing seems to be voiding?
hmmm. I have testing it with and without a fuzzy card and nothing seems to be voiding?
Thanks for the reply. Now that I think about it I don't think I have encountered that either. The only difference between the two then would be one uses findFuzzy, the problem is that that's a search only function. it then calls the results of that into pushItemIntoTarget.
My only two theories is as follows:
-
issue in findFuzzy, where it identifies duplicate items, errors on a duplicate item, then does not insert whatever follows because it throws it out when an error is found. This could be tested by using acceleration cards, as in the error shouldn't occur when you use them (they work in batches of higher amounts)
-
There's an issue in pushItemIntoTarget, where it will subtract the item from the system before adding it to the system and some error happens, maybe because of race conditions? This is less likely the case because the ticking seems to be a robust system. I doubt this is it because its only observed on fuzzies, which aren't the only ones to use pushItemIntoTarget.
Bonus theory that's almost definitely incorrect: These lines cause an issue where it routinely inserts 1 less than it is supposed to https://github.com/PrototypeTrousers/Applied-Energistics-2/blob/ceee1f181f3a1326edb55059d77d28e025fa263d/src/main/java/appeng/parts/automation/PartExportBus.java#L146
through all my testing this issue only happened to me when exporting all gregtech:meta_item_1 items into an ore dictionary filter that only allows items with the tag ingotHot. it basically allows any item with gregtech:meta_item_1 to be inserted into any container but other items with that name but not that tag will disappear.
hmm when I tested it without acceleration cards it would only void 1 item then it would stop but with 3 acceleration cards it kept voiding items when they entered the ae system.
ok it doesn't happen with GTCEU items because all the hot ingots are gregtech:meta_ingot_hot. Just testing with GTCE.
ok it doesn't happen with GTCEU items because all the hot ingots are gregtech:meta_ingot_hot. Just testing with GTCE.
Are you saying it doesn't void specifically hot ingots with oredict? if so awesome.
I was mainly talking about fuzzy export upgrade, since it likes to delete
For me this bug also happens with GTCEU using:
appliedenergistics2-rv6-stable-7-extended_life-v0.55.12
gregtech-1.12.2-2.6.0-beta
My setup is an export bus with a fuzzy card into an LV input bus (no covers on the input bus, 4 empty slots) using any hot ingot as filter item and setting it to any damage.
I have narrowed it down to this:
- if I craft the ingots while the export bus is connected some items get lost
- if I disconnect the export bus and craft all hot ingots first (they are all visible in the terminal) and then connect the export bus - nothing gets lost
So it appears to be a race condition? when an items gets ingested by the ME system (I tried with both import bus and ME interface - both directly from an LV output bus or using an EIO conduit as an intermediary) and a fuzzy export bus is present.
ok this bug voids GTCEU items, the container doesn't matter. I just tested it with a minecraft chest and the item still voids...
ok that bug is even more strange because the ae2 system doesn't even complete the craft, it goes straight into the lv input bus and disappears.