Railcraft Reborn

Railcraft Reborn

3M Downloads

Server crash: ArrayIndexOutOfBoundsException

evhub opened this issue ยท 4 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Bug

Apparently random server crash; see included snippet from debug.log.

Railcraft Reborn version

1.1.5

NeoForge/Forge version

Forge 47.3.0

Minecraft version

1.20.1

Minecraft server

Yes

To Reproduce

Apparently random server crash.

Expected behavior

N/A

Logs & Environment

[14Jul2024 20:25:43.028] [Server thread/ERROR] [net.minecraft.util.thread.BlockableEventLoop/FATAL]: Error executing task on Chunk source main thread executor for minecraft:overworld
net.minecraft.ReportedException: Feature placement
	at net.minecraft.server.level.ChunkMap.m_214912_(ChunkMap.java:658) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.m_6367_(ServerChunkCache.java:541) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.m_7245_(ServerChunkCache.java:549) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.level.ServerChunkCache.m_8466_(ServerChunkCache.java:269) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:758) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:747) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:115) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:732) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:665) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at java.lang.Thread.run(Thread.java:1570) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at java.util.Arrays$ArrayList.set(Arrays.java:4232) ~[?:?]
	at net.minecraft.core.NonNullList.set(NonNullList.java:54) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.SimpleContainer.m_6836_(SimpleContainer.java:140) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at mods.railcraft.util.container.AdvancedContainer.m_7797_(AdvancedContainer.java:95) ~[railcraft-reborn-1.20.1-1.1.5.jar%231633!/:1.20.1-1.1.5]
	at mods.railcraft.world.level.block.entity.ManualRollingMachineBlockEntity.m_142466_(ManualRollingMachineBlockEntity.java:58) ~[railcraft-reborn-1.20.1-1.1.5.jar%231633!/:1.20.1-1.1.5]
	at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.m_230328_(StructureTemplate.java:251) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.level.levelgen.structure.pools.SinglePoolElement.m_213695_(SinglePoolElement.java:124) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.m_226509_(PoolElementStructurePiece.java:89) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.m_213694_(PoolElementStructurePiece.java:85) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.level.levelgen.structure.StructureStart.m_226850_(StructureStart.java:90) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.level.chunk.ChunkGenerator.m_223080_(ChunkGenerator.java:320) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[guava-31.1-jre.jar%2374!/:?]
	at net.minecraft.world.level.chunk.ChunkGenerator.m_213609_(ChunkGenerator.java:319) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.level.chunk.ChunkStatus.m_279978_(ChunkStatus.java:108) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.level.chunk.ChunkStatus$SimpleGenerationTask.m_214024_(ChunkStatus.java:309) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.world.level.chunk.ChunkStatus.m_280308_(ChunkStatus.java:252) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$27(ChunkMap.java:643) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar%2377!/:?]
	at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$29(ChunkMap.java:634) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
	at net.minecraft.server.level.ChunkTaskPriorityQueueSorter.m_143188_(ChunkTaskPriorityQueueSorter.java:62) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.util.thread.ProcessorMailbox.m_18759_(ProcessorMailbox.java:91) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.util.thread.ProcessorMailbox.m_18747_(ProcessorMailbox.java:146) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102) ~[server-1.20.1-20230612.114412-srg.jar%231883!/:?]
	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1726) ~[?:?]
	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1717) ~[?:?]
	at java.util.concurrent.ForkJoinTask$InterruptibleTask.exec(ForkJoinTask.java:1641) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507) ~[?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491) ~[?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073) ~[?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035) ~[?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187) ~[?:?]

Screenshots & Video

No response

commented

Can't you tell me more in detail?

commented

What specifically are you looking for? Nobody on the server was doing anything railcraft-related at the time of the craft. Looking at the traceback, it looks like it probably came from new chunk generation.

commented

Oh ok, I get why. It's about this bug #228 I fixed and the rolling machines that were spawned before are crashing the server. If you rejoin it shouldn't happen again.

commented

I released a new version, I put a check to avoid the crush