Applied Energistics 2

Applied Energistics 2

156M Downloads

ConcurrentModificationException in NetworkStorage.extract

yu-re-ka opened this issue ยท 2 comments

commented

Describe the bug

A stacktrace was printed to the server console (see the crash log section).
After that, the terminals did not show any stored items. I removed and re-added all storage disks and disk drives, but only a server restart would fix that.

How to reproduce the bug

I'm not sure

Expected behavior

The terminals should show all stored items. There should be no ConcurrentModificationException.

Additional details

Minecraft 1.18, AE2 fabric commit d645eda

Which minecraft version are you using?

1.18

On which mod loaders does it happen?

Fabric

Crash log

https://termbin.com/j73j

commented

Thanks for the report, since CMEs are notoriously hard to track down, I've added a fail fast guard in 05fe848 in case it happens again.

commented

With the additional guards in place, I was able to reproduce this in my test world when I had an annihilation plane pick up a block immediately followed by water.

Stack trace:

 net.minecraft.ReportedException: Ticking GridNode
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:883) ~[[email protected]:?]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:823) ~[[email protected]:?]
	at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:99) ~[[email protected]:?]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:684) ~[[email protected]:?]
	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:270) ~[[email protected]:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IllegalStateException: Trying to unmount storage Creative ME Item Cell while an operation is in progress.
	at appeng.me.storage.NetworkStorage.unmount(NetworkStorage.java:77) ~[Fabric.main/:?]
	at appeng.me.service.StorageService$ProviderState.unmount(StorageService.java:308) ~[Fabric.main/:?]
	at appeng.me.service.StorageService$ProviderState.unmount(StorageService.java:302) ~[Fabric.main/:?]
	at appeng.me.service.StorageService$ProviderState.update(StorageService.java:291) ~[Fabric.main/:?]
	at appeng.me.service.StorageService.refreshNodeStorageProvider(StorageService.java:191) ~[Fabric.main/:?]
	at appeng.api.storage.IStorageProvider.requestUpdate(IStorageProvider.java:52) ~[Fabric.main/:?]
	at appeng.blockentity.storage.DriveBlockEntity.recalculateDisplay(DriveBlockEntity.java:268) ~[Fabric.main/:?]
	at appeng.blockentity.storage.DriveBlockEntity.blinkCell(DriveBlockEntity.java:377) ~[Fabric.main/:?]
	at appeng.blockentity.storage.DriveBlockEntity.lambda$updateStateForSlot$0(DriveBlockEntity.java:332) ~[Fabric.main/:?]
	at appeng.me.storage.DriveWatcher.insert(DriveWatcher.java:49) ~[Fabric.main/:?]
	at appeng.me.storage.NetworkStorage.insert(NetworkStorage.java:128) ~[Fabric.main/:?]
	at appeng.me.service.NetworkInventoryMonitor.insert(NetworkInventoryMonitor.java:122) ~[Fabric.main/:?]
	at appeng.api.storage.StorageHelper.poweredInsert(StorageHelper.java:165) ~[Fabric.main/:?]
	at appeng.parts.automation.AnnihilationPlanePart.insertIntoGrid(AnnihilationPlanePart.java:235) ~[Fabric.main/:?]
	at appeng.parts.automation.FluidPickupStrategy.storeFluid(FluidPickupStrategy.java:99) ~[Fabric.main/:?]
	at appeng.parts.automation.FluidPickupStrategy.tryStartPickup(FluidPickupStrategy.java:75) ~[Fabric.main/:?]
	at appeng.parts.automation.AnnihilationPlanePart.tickingRequest(AnnihilationPlanePart.java:208) ~[Fabric.main/:?]
	at appeng.me.service.TickManagerService.unsafeTickingRequest(TickManagerService.java:325) ~[Fabric.main/:?]
	at appeng.me.service.TickManagerService.tickQueue(TickManagerService.java:116) ~[Fabric.main/:?]
	at appeng.me.service.TickManagerService.tickLevelQueue(TickManagerService.java:93) ~[Fabric.main/:?]
	at appeng.me.service.TickManagerService.onLevelEndTick(TickManagerService.java:78) ~[Fabric.main/:?]
	at appeng.me.Grid.onLevelEndTick(Grid.java:253) ~[Fabric.main/:?]
	at appeng.hooks.ticking.TickHandler.onServerLevelTickEnd(TickHandler.java:252) ~[Fabric.main/:?]
	at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$6(ServerTickEvents.java:108) ~[fabric-lifecycle-events-v1-1.4.10+c15ca33514.jar:?]
	at net.minecraft.world.level.Level.handler$zol000$tickWorldAfterBlockEntities(Level.java:2614) ~[[email protected]:?]
	at net.minecraft.world.level.Level.tickBlockEntities(Level.java:483) ~[[email protected]:?]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:362) ~[[email protected]:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:879) ~[[email protected]:?]
	... 5 more