Applied Energistics 2

Applied Energistics 2

172M Downloads

Server crash when storing Ars Nouveau Skyweave block in AE2 Spatial Storage

WeizenClown opened this issue · 8 comments

commented

Describe the bug

When attempting to capture or move an Ars Nouveau Skyweave (Mirrorweave) block inside an Applied Energistics 2 Spatial Storage cell, the server hangs and eventually crashes.

The crash occurs inside MirrorWeaveBlock.neighborChanged(), which seems to enter an infinite update loop during block placement triggered by Spatial Storage.

How to reproduce the bug

Place an Ars Nouveau Skyweave block in the world.

Set up an AE2 Spatial Storage network with a Spatial Cell.

Capture and release the Skyweave block into the Spatial Cell for the first time → works as expected.

Wait a short time after retrieving the region from the cell.

Attempt to capture the same region again using the same Spatial Cell → the server hangs and crashes.

If you instead use a brand new Spatial Cell, the process works again for the first capture/release cycle, but fails once reused.

Expected behavior

The Skyweave block should be stored and restored normally, or be rejected gracefully, regardless of whether the Spatial Cell was reused. It should never cause a server hang.

Additional details

Actual Behavior

With a fresh Spatial Cell: First capture/release works fine.

On reusing the same cell: The server hangs indefinitely and the watchdog kills the server.

Crash log shows MirrorWeaveBlock.neighborChanged() repeatedly firing until the tick never completes.

Which minecraft version are you using?

1.21

On which mod loaders does it happen?

NeoForge

Crash log

https://mclo.gs/GlC9Sc0

commented

It looks more like the Ars stuff chunk loading an adjacent chunk and it hanging on that? that definitely shouldn't happen.

@WeizenClown Can you check your debug.log / latest.log to see if there's any exceptions logged right before this happens?

Relevant server stack trace (more for our internal reference):

"Server thread" prio=8 Id=403 TIMED_WAITING on java.lang.String@48b791e
	at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
	-  waiting on java.lang.String@48b791e
	at [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.waitForTasks(BlockableEventLoop.java:143)
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:133)
	at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.managedBlock(ServerChunkCache.java:533)
	at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:159)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.getChunk(Level.java:202)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.LevelReader.getChunk(LevelReader.java:130)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.getChunk(Level.java:196)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.getBlockState(Level.java:382)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.updateNeighbourForOutputSignal(Level.java:1071)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.block.entity.BlockEntity.setChanged(BlockEntity.java:200)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.block.entity.BlockEntity.setChanged(BlockEntity.java:193)
	at TRANSFORMER/[email protected]/com.hollingsworth.arsnouveau.common.block.tile.ModdedTile.updateBlock(ModdedTile.java:42)
	at TRANSFORMER/[email protected]/com.hollingsworth.arsnouveau.common.block.MirrorWeave.neighborChanged(MirrorWeave.java:184)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.handleNeighborChanged(MixinBlockStateBase.java:693)
	at TRANSFORMER/[email protected]/appeng.spatial.SpatialStorageHelper$TriggerUpdates.visit(SpatialStorageHelper.java:250)
	at TRANSFORMER/[email protected]/appeng.spatial.SpatialStorageHelper.transverseEdges(SpatialStorageHelper.java:129)
	at TRANSFORMER/[email protected]/appeng.spatial.SpatialStorageHelper.swapRegions(SpatialStorageHelper.java:206)
	at TRANSFORMER/[email protected]/appeng.items.storage.SpatialStorageCellItem.doSpatialTransition(SpatialStorageCellItem.java:145)
	at TRANSFORMER/[email protected]/appeng.blockentity.spatial.SpatialIOPortBlockEntity.lambda$transition$1(SpatialIOPortBlockEntity.java:173)
	at TRANSFORMER/[email protected]/appeng.blockentity.spatial.SpatialIOPortBlockEntity$$Lambda/0x000015222546a848.accept(Unknown Source)
	at TRANSFORMER/[email protected]/appeng.api.networking.IManagedGridNode.ifPresent(IManagedGridNode.java:102)
	at TRANSFORMER/[email protected]/appeng.blockentity.spatial.SpatialIOPortBlockEntity.transition(SpatialIOPortBlockEntity.java:159)
	at TRANSFORMER/[email protected]/appeng.blockentity.spatial.SpatialIOPortBlockEntity.lambda$new$0(SpatialIOPortBlockEntity.java:53)
	at TRANSFORMER/[email protected]/appeng.blockentity.spatial.SpatialIOPortBlockEntity$$Lambda/0x00001522250c48c0.call(Unknown Source)
	at TRANSFORMER/[email protected]/appeng.hooks.ticking.TickHandler.processQueue(TickHandler.java:419)
	at TRANSFORMER/[email protected]/appeng.hooks.ticking.TickHandler.onServerTickEnd(TickHandler.java:309)
	at TRANSFORMER/[email protected]/appeng.hooks.ticking.TickHandler$$Lambda/0x0000152221126f88.accept(Unknown Source)
	at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.ConsumerEventHandler.invoke(ConsumerEventHandler.java:27)
	at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:360)
	at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:328)
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.event.EventHooks.fireServerTickPost(EventHooks.java:1020)
	at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:943)
	at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:707)
	at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267)
	at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer$$Lambda/0x0000152224b62d88.run(Unknown Source)
	at [email protected]/java.lang.Thread.runWith(Unknown Source)
	at [email protected]/java.lang.Thread.run(Unknown Source)
commented

debug-2.log.gz
might be thisone

commented

@WeizenClown

I think this is the actual root cause. It crashes while trying to load an adjacent chunk, and then the server thread just sits there and waits forever. Now to figure out why the lighting engine crashes...

Do you have any lighting related mods?

[31Aug2025 18:02:44.426] [Worker-Main-47/ERROR] [net.minecraft.Util/]: Caught exception in thread Thread[#385,Worker-Main-47,4,main]
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.chunk.DataLayer.get(int, int, int)" because "$$2" is null
	at TRANSFORMER/[email protected]/net.minecraft.world.level.lighting.LayerLightSectionStorage.getStoredLevel(LayerLightSectionStorage.java:102) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.world.level.lighting.LightEngine.propagateIncreases(LightEngine.java:169) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.world.level.lighting.LightEngine.runLightUpdates(LightEngine.java:157) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.world.level.lighting.LevelLightEngine.runLightUpdates(LevelLightEngine.java:53) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.server.level.ThreadedLevelLightEngine.runUpdate(ThreadedLevelLightEngine.java:185) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.server.level.ThreadedLevelLightEngine.lambda$tryScheduleUpdate$27(ThreadedLevelLightEngine.java:164) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.ProcessorMailbox.pollTask(ProcessorMailbox.java:91) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.ProcessorMailbox.pollUntil(ProcessorMailbox.java:146) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102) ~[server-1.21.1-20240808.144430-srg.jar%23566!/:?]
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(Unknown Source) [?:?]
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) [?:?]
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) [?:?]
[31Aug2025 18:03:40.495] [Server Watchdog/ERROR] [net.minecraft.server.dedicated.ServerWatchdog/FATAL]: A single server tick took 60.00 seconds (should be max 0.05)
commented

Dont really know I just Play the normal All the mods 10 pack.

commented

@shartte There are no other lighting mods in the pack besides the official ones.

commented

Any progress on the issue yet?

commented

I can't repro this in ATM10.

commented

So I got a video where it crashes but cant upload it here. Can I sent it to you through discord? Here is also the latest crash report. https://mclo.gs/z6ow2rK