ChainedIterator ConcurrentModificationException
PrototypeTrousers opened this issue ยท 2 comments
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