Applied Energistics 2

Applied Energistics 2

137M Downloads

ChainedIterator ConcurrentModificationException

PrototypeTrousers opened this issue ยท 2 comments

commented

ChainedIterator ConcurrentModificationException happening in storeItems in CraftingCPUCluster

Describe the bug
Canceling a craft can cause a CME in certain situations, usually on low space

To Reproduce
Attached are two zipped worlds. One will crash on load with the CME, the other one
can crash by ask for 10 vibration chambers and then cancelling the crafting on the crafting status gui.

Expected behavior
Not crashing

Additional context
Crash log
https://gist.github.com/PrototypeTrousers/5140b1b2de38e08abab9227587f6bd74#file-chainediteratorcme
The CME can be avoided by copying the list before iterating but maybe there is a proper solution

IItemList<IAEItemStack> iList = Api.instance().storage().getStorageChannel(IItemStorageChannel.class).createList();
this.inventory.getItemList().forEach(iList::add);
for( IAEItemStack is : iList ) {

Environment
AdoptopenJDK 8u275
version: 0bdc408

Ask to craft then cancel craft to crash.zip
Chained CME on load.zip

commented

We sadly cannot support custom builds.

commented

Yeah usually that is correct, I did verify this is a bug though.