Drathonix / LoadMyChunks

A server friendly chunk loading mod
MIT License
4 stars 0 forks source link

Game Crashes when activating more than one piston at a time #5

Closed xardius closed 1 week ago

xardius commented 1 week ago

The game crashes with the following error message:

`The game crashed whilst exception ticking world
Error: java.util.ConcurrentModificationException`

Without the mod everything works fine. Reinstalling the mod crashes the game again when activating the pistons. Sometimes the world crashes on load after the crash occurs once.

I don't have to acutally place any chunk loader in my world, installing the mod is enough.

---- Minecraft Crash Report ----
// My bad.

Time: 2024-06-21 20:24:53
Description: Exception ticking world

java.util.ConcurrentModificationException
    at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1605)
    at java.base/java.util.HashMap$ValueIterator.next(HashMap.java:1633)
    at net.minecraft.class_2818.loadMyChunks$tick(class_2818.java:1768)
    at net.minecraft.class_1937.handler$bck000$loadmychunks$tickChunkWise(class_1937.java:2603)
    at net.minecraft.class_1937.method_18471(class_1937.java:480)
    at net.minecraft.class_3218.method_18765(class_3218.java:413)
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1021)
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:912)
    at net.minecraft.class_1132.method_3748(class_1132.java:114)
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697)
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281)
    at java.base/java.lang.Thread.run(Thread.java:1583)

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
    at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1605)
    at java.base/java.util.HashMap$ValueIterator.next(HashMap.java:1633)
    at net.minecraft.class_2818.loadMyChunks$tick(class_2818.java:1768)
    at net.minecraft.class_1937.handler$bck000$loadmychunks$tickChunkWise(class_1937.java:2603)
    at net.minecraft.class_1937.method_18471(class_1937.java:480)

-- Affected level --
Details:
    All players: 1 total; [class_3222['Daniel_0815'/6, l='ServerLevel[TEST]', x=8.99, y=-57.00, z=-8.59]]
    Chunk stats: 2601
    Level dimension: minecraft:overworld
    Level spawn location: World: (0,-60,0), Section: (at 0,4,0 in 0,-4,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511)
    Level time: 4297 game time, 4297 day time
    Level name: TEST
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Commands: true
    Level weather: Rain time: 110702 (now: false), thunder time: 70709 (now: false)
    Known server brands: fabric, vanilla
    Removed feature flags: 
    Level was modded: true
    Level storage version: 0x04ABD - Anvil
    Loaded entity count: 28
Stacktrace:
    at net.minecraft.class_3218.method_8538(class_3218.java:1693)
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1024)
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:912)
    at net.minecraft.class_1132.method_3748(class_1132.java:114)
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697)
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281)
    at java.base/java.lang.Thread.run(Thread.java:1583)

-- System Details --
Details:
    Minecraft Version: 1.21
    Minecraft Version ID: 1.21
    Operating System: Windows 11 (amd64) version 10.0
    Java Version: 21.0.3, Microsoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
    Memory: 312359312 bytes (297 MiB) / 973078528 bytes (928 MiB) up to 2147483648 bytes (2048 MiB)
    CPUs: 32
    Processor Vendor: GenuineIntel
    Processor Name: 13th Gen Intel(R) Core(TM) i9-13900K
    Identifier: Intel64 Family 6 Model 183 Stepping 1
    Microarchitecture: Raptor Lake
    Frequency (GHz): 3.00
    Number of physical packages: 1
    Number of physical CPUs: 24
    Number of logical CPUs: 32
    Graphics card #0 name: NVIDIA GeForce RTX 4090
    Graphics card #0 vendor: NVIDIA
    Graphics card #0 VRAM (MiB): 24564.00
    Graphics card #0 deviceId: VideoController1
    Graphics card #0 versionInfo: 31.0.15.5186
    Memory slot #0 capacity (MiB): 32768.00
    Memory slot #0 clockSpeed (GHz): 6.40
    Memory slot #0 type: Unknown
    Memory slot #1 capacity (MiB): 32768.00
    Memory slot #1 clockSpeed (GHz): 6.40
    Memory slot #1 type: Unknown
    Virtual memory max (MiB): 69372.94
    Virtual memory used (MiB): 20054.21
    Swap memory total (MiB): 4096.00
    Swap memory used (MiB): 0.00
    Space in storage for jna.tmpdir (MiB): available: 857399.31, total: 1906828.00
    Space in storage for org.lwjgl.system.SharedLibraryExtractPath (MiB): available: 857399.31, total: 1906828.00
    Space in storage for io.netty.native.workdir (MiB): available: 857399.31, total: 1906828.00
    Space in storage for java.io.tmpdir (MiB): available: 857399.31, total: 1906828.00
    Space in storage for workdir (MiB): available: 857399.31, total: 1906828.00
    JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
    Fabric Mods: 
        animal_feeding_trough: Animal Feeding Trough 1.1.1+1.21
        appleskin: AppleSkin 3.0.2+mc1.21
        architectury: Architectury 13.0.1
        auto-workstations: Auto Workstations 1.0-rc.24
        betterf3: BetterF3 11.0.1
        cloth-config: Cloth Config v15 15.0.127
            cloth-basic-math: cloth-basic-math 0.6.1
        compact_storage: CompactStorage 8.0.74
        cooldown-coordinator: Cooldown Coordinator 0.7.2
        copperhopper: Copper Hopper 0.9.1+1.21
        ductwork: Ductwork 0.9.1
        fabric-api: Fabric API 0.100.3+1.21
            fabric-api-base: Fabric API Base 0.4.42+6573ed8cd1
            fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.67+b5597344d1
            fabric-biome-api-v1: Fabric Biome API (v1) 13.0.28+6fc22b99d1
            fabric-block-api-v1: Fabric Block API (v1) 1.0.22+0af3f5a7d1
            fabric-block-view-api-v2: Fabric BlockView API (v2) 1.0.10+6573ed8cd1
            fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.52+0af3f5a7d1
            fabric-client-tags-api-v1: Fabric Client Tags 1.1.15+6573ed8cd1
            fabric-command-api-v1: Fabric Command API (v1) 1.2.48+f71b366fd1
            fabric-command-api-v2: Fabric Command API (v2) 2.2.27+6a6dfa19d1
            fabric-commands-v0: Fabric Commands (v0) 0.2.65+df3654b3d1
            fabric-content-registries-v0: Fabric Content Registries (v0) 8.0.13+b5597344d1
            fabric-convention-tags-v1: Fabric Convention Tags 2.0.14+7f945d5bd1
            fabric-convention-tags-v2: Fabric Convention Tags (v2) 2.3.1+8a3b5617d1
            fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.29+0af3f5a7d1
            fabric-data-attachment-api-v1: Fabric Data Attachment API (v1) 1.1.23+6a6dfa19d1
            fabric-data-generation-api-v1: Fabric Data Generation API (v1) 20.2.8+16c4ae25d1
            fabric-dimensions-v1: Fabric Dimensions API (v1) 4.0.0+6fc22b99d1
            fabric-entity-events-v1: Fabric Entity Events (v1) 1.6.12+6fc22b99d1
            fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.7.10+e633f883d1
            fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.52+6573ed8cd1
            fabric-item-api-v1: Fabric Item API (v1) 11.0.0+afdfc921d1
            fabric-item-group-api-v1: Fabric Item Group API (v1) 4.1.1+cb5ced13d1
            fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.47+0af3f5a7d1
            fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.45+df3654b3d1
            fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.3.11+8f3583aed1
            fabric-loot-api-v2: Fabric Loot API (v2) 3.0.10+6573ed8cd1
            fabric-message-api-v1: Fabric Message API (v1) 6.0.13+6573ed8cd1
            fabric-model-loading-api-v1: Fabric Model Loading API (v1) 2.0.0+fe474d6bd1
            fabric-networking-api-v1: Fabric Networking API (v1) 4.2.0+ab7edbacd1
            fabric-object-builder-api-v1: Fabric Object Builder API (v1) 15.1.11+d1321076d1
            fabric-particles-v1: Fabric Particles (v1) 4.0.2+6573ed8cd1
            fabric-recipe-api-v1: Fabric Recipe API (v1) 5.0.9+6573ed8cd1
            fabric-registry-sync-v0: Fabric Registry Sync (v0) 5.0.22+ab7edbacd1
            fabric-renderer-api-v1: Fabric Renderer API (v1) 3.2.16+fe474d6bd1
            fabric-renderer-indigo: Fabric Renderer - Indigo 1.6.4+48fb1586d1
            fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.66+df3654b3d1
            fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.48+73761d2ed1
            fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.1.6+b5597344d1
            fabric-rendering-v0: Fabric Rendering (v0) 1.1.69+df3654b3d1
            fabric-rendering-v1: Fabric Rendering (v1) 5.0.3+d1321076d1
            fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 4.2.1+d153f344d1
            fabric-resource-loader-v0: Fabric Resource Loader (v0) 1.1.4+cb5ced13d1
            fabric-screen-api-v1: Fabric Screen API (v1) 2.0.24+b5597344d1
            fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.3.79+b5597344d1
            fabric-sound-api-v1: Fabric Sound API (v1) 1.0.23+6573ed8cd1
            fabric-transfer-api-v1: Fabric Transfer API (v1) 5.1.14+b5597344d1
            fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 6.0.12+6573ed8cd1
        fabric-language-kotlin: Fabric Language Kotlin 1.11.0+kotlin.2.0.0
            org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 2.0.0
            org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 2.0.0
            org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 2.0.0
            org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 2.0.0
            org_jetbrains_kotlinx_atomicfu-jvm: atomicfu-jvm 0.24.0
            org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.8.1
            org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.8.1
            org_jetbrains_kotlinx_kotlinx-datetime-jvm: kotlinx-datetime-jvm 0.6.0
            org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm: kotlinx-serialization-cbor-jvm 1.6.3
            org_jetbrains_kotlinx_kotlinx-serialization-core-jvm: kotlinx-serialization-core-jvm 1.6.3
            org_jetbrains_kotlinx_kotlinx-serialization-json-jvm: kotlinx-serialization-json-jvm 1.6.3
        fabricloader: Fabric Loader 0.15.11
            mixinextras: MixinExtras 0.3.5
        inventoryprofilesnext: Inventory Profiles Next 2.0.0
        jamlib: JamLib 1.0.9+1.21
            blue_endless_jankson: jankson 1.2.3
        java: OpenJDK 64-Bit Server VM 21
        libipn: libIPN 5.0.0
        loadmychunks: Load My Chunks 1.0.2-hotfix2
        minecraft: Minecraft 1.21
        modmenu: Mod Menu 11.0.1
        mousetweaks: Mouse Tweaks 2.26
        placeholder-api: Placeholder API 2.4.0-pre.2+1.21
        polymer-bundled: Polymer 0.9.2+1.21
            polymer-blocks: Polymer (Textured Blocks) 0.9.2+1.21
            polymer-common: Polymer (Common) 0.9.2+1.21
                packet_tweaker: Packet Tweaker 0.5.4+1.20.6
        rightclickharvest: Right Click Harvest 4.2.0+1.21
        roughlyenoughitems: Roughly Enough Items 16.0.729
            error_notifier: Error Notifier 1.0.9
        universal-graves: Universal Graves 3.4.1+1.21
            common-protection-api: Common Protection API 1.0.0
            fabric-permissions-api-v0: fabric-permissions-api 0.2-SNAPSHOT
            polymer-core: Polymer (Core) 0.9.2+1.21
                polymer-networking: Polymer (Networking) 0.9.2+1.21
                polymer-registry-sync-manipulator: Polymer (Registry Sync Manipulator) 0.9.2+1.21
            polymer-resource-pack: Polymer (Resource Pack) 0.9.2+1.21
            polymer-virtual-entity: Polymer (Virtual Entity) 0.9.2+1.21
            predicate-api: Predicate API 0.5.1+1.21
            server_translations_api: Server Translations API 2.3.1+1.21-pre2
            sgui: sgui 1.6.0+1.21
    Server Running: true
    Player Count: 1 / 8; [class_3222['Daniel_0815'/6, l='ServerLevel[TEST]', x=8.99, y=-57.00, z=-8.59]]
    Active Data Packs: vanilla, fabric, animal_feeding_trough, auto-workstations, compact_storage, copperhopper, ductwork, fabric-convention-tags-v2, loadmychunks, rightclickharvest, server_translations_api, universal-graves, $polymer-resources
    Available Data Packs: $polymer-resources, animal_feeding_trough, auto-workstations, bundle, compact_storage, copperhopper, ductwork, fabric, fabric-convention-tags-v2, loadmychunks, rightclickharvest, server_translations_api, trade_rebalance, universal-graves, vanilla
    Enabled Feature Flags: minecraft:vanilla
    World Generation: Stable
    World Seed: 1396698212165509946
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric'
    Launched Version: fabric-loader-0.15.11-1.21
Drathonix commented 1 week ago

I think I know what the problem is, will need a patch in all versions unfortunately (for me).

Expected cause of the problem:

Piston activation adds a new block entity to the chunk block entity list for the piston head, the loop assumes that this list is unchanged and crashes due to that misassumption. Likely impacts other mods, I'll need to fix this ASAP.

Drathonix commented 1 week ago

Alright did some testing and some edits to the loop code.

I was right about what I said before and have a patch for the problem already wrote and ready to publish. Will close this issue when all versions have been fully updated.

Drathonix commented 1 week ago

Patch is now fully uploaded to all platforms.

xardius commented 1 week ago

Just testet it, works fine. Thank you very much :)