Create

Create

86M Downloads

LockSupport.parkNanos high CPU usage when driving a train

learnedtim opened this issue ยท 3 comments

commented

Describe the Bug

When driving a train, all of my CPU cores will spike to 100%. All actions, like walking, shifting, jumping, etc. are delayed massively. I get FPS drops aswell.

After generating a report with Spark (https://spark.lucko.me/G1MqJhyk97), I saw LockSupport.parkNanos was taking up the entire server thread. Trying with less mods, just Create, Chipped, SteamNRails & FramedBlocks, the issue still occured.

Reproduction Steps

  1. Create a new profile with Create, FramedBlocks, SteamNRails and Chipped installed
  2. Create a train using those blocks, make it 3+ carriages long.
  3. Assemble and attempt to drive the train
    ...

(schematic below is the worst offender, although it happens with all trains I build)
fulltrain_1.zip

Expected Result

I can walk around normally, my CPU does not spike to 100% usage, nor does LockSupport.parkNanos take up the entire server thread.

Screenshots and Videos

chrome_e576pdulZ6
Taskmgr_KM3N3qHzkf

Crash Report or Log

https://gist.github.com/kaibeckers/1a77bf2bb7dd18718dc5d742382bda7c

Operating System

Windows 11

Mod Version

0.5.0i

Minecraft Version

1.18.2

Forge Version

40.2.4

Other Mods

Chipped
FramedBlocks
Steam 'N Rails

Additional Context

Driving trains (and sometimes riding them) is practically impossible.

commented

duplicate issue

commented

Removing all addons and upgrading to Create 0.5.1b helps, but definitely hasn't resolved the issue. I still get spikes when driving trains, just not as bad as before.

commented

It seems train doors and trapdoors are the culprit. When you interact with a double, assembled train door, a CPU spike occurs. The more doors you have, the worse the spikes.

Also applies to stations; the more doors you have, the worse the CPU spike is when you arrive.