WearBlackAllDay / DimensionalThreading

An attempt to optimize the fabric server, by assigning each dimension their own thread.
MIT License
257 stars 22 forks source link

1.19.2 Create train tick error #81

Open LittleLigr opened 1 year ago

LittleLigr commented 1 year ago

Hello! If Create train has a schedule server will fall after launch.

---- Minecraft Crash Report ---- // I just don't know what went wrong :(

Time: 2022-12-14 23:55:48 Description: Exception ticking world

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 129 at it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.rehash(LongLinkedOpenHashSet.java:1253) at net.minecraft.class_3554$1.rehash(class_3554.java:52) at it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.removeFirstLong(LongLinkedOpenHashSet.java:614) at net.minecraft.class_3554.method_15492(class_3554.java:207) at net.minecraft.class_3204$class_4077.method_18746(class_3204.java:513) at net.minecraft.class_3204.method_15892(class_3204.java:126) at net.minecraft.class_3215.method_16155(class_3215.java:283) at net.minecraft.class_3215.getChunkBlocking(class_3215.java:2215) at net.minecraft.class_3215.method_12121(class_3215.java:2177) at net.minecraft.class_1937.method_8402(class_1937.java:197) at net.minecraft.class_1937.method_22350(class_1937.java:5068) at net.minecraft.class_3218.handler$cpo000$shouldTickEntity(class_3218.java:13717) at net.minecraft.class_3218.method_37118(class_3218.java) at com.simibubi.create.content.logistics.trains.entity.CarriageEntityHandler.isActiveChunk(CarriageEntityHandler.java:39) at com.simibubi.create.content.logistics.trains.entity.Carriage.manageEntities(Carriage.java:267) at com.simibubi.create.content.logistics.trains.entity.Carriage.travel(Carriage.java:197) at com.simibubi.create.content.logistics.trains.entity.Train.tick(Train.java:368) at com.simibubi.create.content.logistics.trains.GlobalRailwayManager.tickTrains(GlobalRailwayManager.java:222) at com.simibubi.create.content.logistics.trains.GlobalRailwayManager.tick(GlobalRailwayManager.java:196) at com.simibubi.create.events.CommonEvents.onWorldTick(CommonEvents.java:153) at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$6(ServerTickEvents.java:108) at net.minecraft.class_3218.handler$ben000$endWorldTick(class_3218.java:6729) at net.minecraft.class_3218.method_18765(class_3218.java:384) at net.minecraft.server.MinecraftServer.md0be202$lambda$tickWorlds$0$4(MinecraftServer.java:4815) at wearblackallday.dimthread.DimThread.swapThreadsAndRun(DimThread.java:34) at net.minecraft.server.MinecraftServer.md0be202$lambda$tickWorlds$1$3(MinecraftServer.java:4813) at wearblackallday.util.ThreadPool.lambda$execute$1(ThreadPool.java:49) at wearblackallday.util.ThreadPool.lambda$execute$0(ThreadPool.java:43) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

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

-- Head -- Thread: Server thread Stacktrace: at it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.rehash(LongLinkedOpenHashSet.java:1253) at net.minecraft.class_3554$1.rehash(class_3554.java:52) at it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.removeFirstLong(LongLinkedOpenHashSet.java:614) at net.minecraft.class_3554.method_15492(class_3554.java:207) at net.minecraft.class_3204$class_4077.method_18746(class_3204.java:513) at net.minecraft.class_3204.method_15892(class_3204.java:126) at net.minecraft.class_3215.method_16155(class_3215.java:283) at net.minecraft.class_3215.getChunkBlocking(class_3215.java:2215) at net.minecraft.class_3215.method_12121(class_3215.java:2177) at net.minecraft.class_1937.method_8402(class_1937.java:197) at net.minecraft.class_1937.method_22350(class_1937.java:5068) at net.minecraft.class_3218.handler$cpo000$shouldTickEntity(class_3218.java:13717) at net.minecraft.class_3218.method_37118(class_3218.java) at com.simibubi.create.content.logistics.trains.entity.CarriageEntityHandler.isActiveChunk(CarriageEntityHandler.java:39) at com.simibubi.create.content.logistics.trains.entity.Carriage.manageEntities(Carriage.java:267) at com.simibubi.create.content.logistics.trains.entity.Carriage.travel(Carriage.java:197) at com.simibubi.create.content.logistics.trains.entity.Train.tick(Train.java:368) at com.simibubi.create.content.logistics.trains.GlobalRailwayManager.tickTrains(GlobalRailwayManager.java:222) at com.simibubi.create.content.logistics.trains.GlobalRailwayManager.tick(GlobalRailwayManager.java:196) at com.simibubi.create.events.CommonEvents.onWorldTick(CommonEvents.java:153) at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$6(ServerTickEvents.java:108) at net.minecraft.class_3218.handler$ben000$endWorldTick(class_3218.java:6729) at net.minecraft.class_3218.method_18765(class_3218.java:384)

-- Affected level -- Details: All players: 0 total; [] Chunk stats: 2781 Level dimension: minecraft:overworld Level spawn location: World: (-539,69,-72), Section: (at 5,5,8 in -34,4,-5; chunk contains blocks -544,-64,-80 to -529,319,-65), Region: (-2,-1; contains chunks -64,-32 to -33,-1, blocks -1024,-64,-512 to -513,319,-1) Level time: 36120023 game time, 18388859 day time Level name: creatopico_test5 Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false Level weather: Rain time: 9855 (now: false), thunder time: 6187 (now: false) Known server brands: fabric Level was modded: true Level storage version: 0x04ABD - Anvil Stacktrace: at wearblackallday.dimthread.util.CrashInfo.crash(CrashInfo.java:11) at net.minecraft.server.MinecraftServer.handler$bba000$tickWorlds(MinecraftServer.java:4825) at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:864) at net.minecraft.class_3176.method_3813(class_3176.java:289) at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:819) at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:665) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) at java.base/java.lang.Thread.run(Thread.java:833)

-- System Details -- Details: Minecraft Version: 1.19.2 Minecraft Version ID: 1.19.2 Operating System: Linux (amd64) version 5.15.0-53-generic Java Version: 17.0.2, Private Build Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Private Build Memory: 1546174672 bytes (1474 MiB) / 3422552064 bytes (3264 MiB) up to 8589934592 bytes (8192 MiB) CPUs: 4 Processor Vendor: GenuineIntel Processor Name: Intel(R) Xeon(R) CPU E3-1220 v3 @ 3.10GHz Identifier: Intel64 Family 6 Model 60 Stepping 3 Microarchitecture: Haswell (Client) Frequency (GHz): 3.10 Number of physical packages: 1 Number of physical CPUs: 4 Number of logical CPUs: 4 Graphics card #0 name: unknown Graphics card #0 vendor: unknown Graphics card #0 VRAM (MB): 0.00 Graphics card #0 deviceId: unknown Graphics card #0 versionInfo: unknown Virtual memory max (MB): 12076.77 Virtual memory used (MB): 5732.75 Swap memory total (MB): 4096.00 Swap memory used (MB): 452.15 JVM Flags: 20 total; -Xmx8192M -Xms1024M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 Fabric Mods: alternate-current: Alternate Current 1.4.0 another_furniture: Another Furniture 1.2.1-1.19 antixray: AntiXray 1.2.6 com_moandjiezana_toml_toml4j: toml4j 0.7.2 appleskin: AppleSkin 2.4.1+mc1.19 architectury: Architectury 6.3.56 artifacts: Artifacts 7.1.1+fabric expandability: ExpandAbility 6.0.0 step-height-entity-attribute: Step Height Entity Attribute 1.0.0 balm-fabric: Balm 4.5.2+0 brewery: Brewery 0.2.3+1.19.2 hologram-api: Hologram API 0.2.2+1.19 more_codecs: More Codecs 0.2.2+1.18 net_objecthunter_exp4j: exp4j 0.4.8 polymer: Polymer (Core) 0.2.18+1.19.2 polymer-registry-sync-manipulator: Polymer Registry Sync Manipulator 0.0.3+1.19.2 server_translations_api: Server Translations API 1.4.18+1.19.2 packet_tweaker: Packet Tweaker 0.3.0+1.18.2 sgui: sgui 1.1.5+1.19.1 byg: Oh The Biomes You'll Go 2.0.0.13 com_electronwill_night-config_core: core 3.6.6 com_electronwill_night-config_toml: toml 3.6.6 chunky: Chunky 1.3.38 cloth-config: Cloth Config v8 8.2.88 cloth-basic-math: cloth-basic-math 0.6.1 collective-fabric: Collective (Fabric) 5.16 fiber: fiber 0.23.0-2 computercraft: CC: Restitched 1.101.2 io_netty_netty-codec-http: netty-codec-http 4.1.77.Final org_squiddev_cobalt: Cobalt 0.5.5 connectivity: Connectivity Mod 1.19-3.3 create: Create 0.5.0g-796+1.19.2 com_google_code_findbugs_jsr305: jsr305 3.0.2 fake-player-api: Fake Player API 0.5.0 forgeconfigapiport: Forge Config API Port 4.2.6 milk: Milk Lib 1.0.51 dripstone_fluid_lib: Dripstone Fluid Lib 2.0.1 porting_lib: Porting Lib 2.1.623+1.19.2 forge_tags: Porting Lib Tags 3.0 porting_lib_base: Porting Lib Base 2.1.623+1.19.2 com_github_llamalad7_mixinextras: MixinExtras 0.1.1 mm: Manningham Mills 2.3 serialization_hooks: Serialization Hooks 0.3.26 porting_lib_entity: Porting Lib Entity 2.1.623+1.19.2 porting_lib_lazy_registration: Porting Lib Lazy Register 2.1.623+1.19.2 porting_lib_model_generators: Porting Lib Model Generators 2.1.623+1.19.2 porting_lib_models: Porting Lib Models 2.1.623+1.19.2 porting_lib_networking: Porting Lib Networking 2.1.623+1.19.2 porting_lib_obj_loader: Porting Lib Obj Loader 2.1.623+1.19.2 porting_lib_model_loader: Porting Lib Model Loader 2.1.623+1.19.2 porting_lib_transfer: Porting Lib Transfer 2.1.623+1.19.2 porting_lib_extensions: Porting Lib Extensions 2.1.623+1.19.2 porting_lib_accessors: Porting Lib Accessors 2.1.623+1.19.2 porting_lib_attributes: Porting Lib Attributes 2.1.623+1.19.2 porting_lib_constants: Porting Lib Constants 2.1.623+1.19.2 porting_lib_common: Porting Lib Common 2.1.623+1.19.2 reach-entity-attributes: Reach Entity Attributes 2.3.0 registrate-fabric: Registrate for Fabric 1.1.44-MC1.19.2 create_crystal_clear: Create: Crystal Clear 1.0+1.19.2 deathlog: DeathLog 0.2.11+1.19 decorative_blocks: Decorative Blocks 3.0.0 dimthread: DimensionalThreading 1.2.7 com_github_wearblackallday_javautils: JavaUtils bd58640372 emotecraft: Emotecraft 2.2.5 player-animator: Player Animator 0.3.5 fabric-api: Fabric API 0.68.0+1.19.2 fabric-api-base: Fabric API Base 0.4.13+0d0f210290 fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.12+93d8cb8290 fabric-biome-api-v1: Fabric Biome API (v1) 9.0.20+0d0f210290 fabric-block-api-v1: Fabric Block API (v1) 1.0.1+12bfe4ea90 fabric-command-api-v1: Fabric Command API (v1) 1.2.13+f71b366f90 fabric-command-api-v2: Fabric Command API (v2) 2.1.9+93d8cb8290 fabric-commands-v0: Fabric Commands (v0) 0.2.30+df3654b390 fabric-containers-v0: Fabric Containers (v0) 0.1.38+df3654b390 fabric-content-registries-v0: Fabric Content Registries (v0) 3.4.3+6064db2a90 fabric-convention-tags-v1: Fabric Convention Tags 1.1.3+93d8cb8290 fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.7+aeb40ebe90 fabric-data-generation-api-v1: Fabric Data Generation API (v1) 5.3.2+ad31814d90 fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.33+0d0f210290 fabric-entity-events-v1: Fabric Entity Events (v1) 1.5.2+9244241690 fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.31+6eb9a2a190 fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.31+df3654b390 fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.23+c6af733c90 fabric-item-api-v1: Fabric Item API (v1) 1.6.1+fa140d5990 fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.35+9244241690 fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.2.2+9244241690 fabric-loot-api-v2: Fabric Loot API (v2) 1.1.9+83a8659290 fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.1.12+9e7660c690 fabric-message-api-v1: Fabric Message API (v1) 5.0.5+93d8cb8290 fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.1.20+33fbc73890 fabric-networking-api-v1: Fabric Networking API (v1) 1.2.8+3b1d070f90 fabric-networking-v0: Fabric Networking (v0) 0.3.25+df3654b390 fabric-object-builder-api-v1: Fabric Object Builder API (v1) 4.1.2+06e0e25190 fabric-particles-v1: Fabric Particles (v1) 1.0.12+79adfe0a90 fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.9.29+9244241690 fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.17+0d0f210290 fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.0.9+c6af733c90 fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.1.1+aae9039d90 fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.8.1+0d0f210290 fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.3.4+1cc24b1b90 fabric-transfer-api-v1: Fabric Transfer API (v1) 2.1.3+9d081d6490 fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 1.3.2+42d99c3290 fabric-language-kotlin: Fabric Language Kotlin 1.8.6+kotlin.1.7.21 org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.7.21 org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.7.21 org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.7.21 org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.7.21 org_jetbrains_kotlinx_atomicfu-jvm: atomicfu-jvm 0.18.5 org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.6.4 org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.6.4 org_jetbrains_kotlinx_kotlinx-datetime-jvm: kotlinx-datetime-jvm 0.4.0 org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm: kotlinx-serialization-cbor-jvm 1.4.1 org_jetbrains_kotlinx_kotlinx-serialization-core-jvm: kotlinx-serialization-core-jvm 1.4.1 org_jetbrains_kotlinx_kotlinx-serialization-json-jvm: kotlinx-serialization-json-jvm 1.4.1 fabricloader: Fabric Loader 0.14.10 fabricproxy-lite: FabricProxy Lite 2.3.0 fabrictailor: Fabric Tailor 2.0.1 config2brigadier: Config to Brigadier 1.2.1 farmersdelight: Farmer's Delight 1.19.2-1.3.7 ferritecore: FerriteCore 5.0.3 frameless: Frameless 1.0.1 geckolib3: Geckolib 3.1.37 com_eliotlash_mclib_mclib: mclib 20 iammusicplayer: Iam Music Player 3.19.2 image2map: Image2Map 0.3.0 map-canvas-api: Map Canvas API 0.2.0+1.19.1 invview: InvView 1.4.9-1.19+ java: OpenJDK 64-Bit Server VM 17 krypton: Krypton 0.2.1 com_velocitypowered_velocity-native: velocity-native 3.1.2-SNAPSHOT lazydfu: LazyDFU 0.1.3 ledger: Ledger 1.2.5 lithium: Lithium 0.10.2 luckperms: LuckPerms 5.4.46 fabric-permissions-api-v0: fabric-permissions-api 0.2-SNAPSHOT memoryleakfix: memory Leak Fix 1.19.1-0.7.0 minecraft: Minecraft 1.19.2 multiworldborders: Multi World Borders 1.5-fabric-1.19 netherportalfix: NetherPortalFix 10.0.0 nochatreports: No Chat Reports 1.19.2-v1.13.12 otyacraftengine: Otyacraft Engine 3.1.0 plasmo_voice: Plasmo Voice 1.2.19 servercore: ServerCore 1.3.3-1.19.2 me_lucko_spark-api: spark-api 0.1-SNAPSHOT placeholder-api: Placeholder API 2.0.0-pre.1+1.19.2 simplechunkloader: Simple Chunkloader 1.0.2 libgui: LibGui 6.0.0-beta.5+1.19-pre1 jankson: Jankson 4.1.1+j1.2.1 blue_endless_jankson: jankson 1.2.1 libninepatch: LibNinePatch 1.1.0 smoothchunk: Smooth chunk save Mod 1.19.1-2.0 sound_physics_remastered: Sound Physics Remastered 1.19.2-1.0.15 spark: spark 1.9.45 starlight: Starlight 1.1.1+fabric.ae22326 styled-nicknames: Styled Nicknames 1.1.2+1.19 styledchat: Styled Chat 2.0.2+1.19.2 player-data-api: Player Data API 0.2.2+1.19.2 predicate-api: Predicate API 0.1.0+1.19.2 styledplayerlist: Styled Player List 2.2.2+1.19.1 terrablender: TerraBlender 2.0.1.127 trinkets: Trinkets 3.4.0 cardinal-components-base: Cardinal Components API (base) 5.0.0-beta.1 cardinal-components-entity: Cardinal Components API (entities) 5.0.0-beta.1 walllanterns: Lanterns Belong on Walls 1.4.0-1.19 yigd: You're in Grave Danger 1.4.5 Server Running: true Player Count: 0 / 20; [] Data Packs: vanilla, Fabric Mods, file/remove_items (incompatible), file/netherratio_datapack, file/lightblock, file/Limbo World Generation: Stable Is Modded: Definitely; Server brand changed to 'fabric' Type: Dedicated Server (map_server.txt)

kristibektashi commented 1 year ago

When will this be fixed?