Skip to content

Crash / disconnect when connecting RailX small-angle curved track to an existing Create train line #6

@jasonbrinkley5-ops

Description

@jasonbrinkley5-ops

Environment

Minecraft Forge 1.20.1
Create 6.0.8
Steam 'n' Rails 1.7.2+forge-mc1.20.1
RailX 0.2.0-build.4

Problem
I found a reproducible crash/disconnect involving RailX small-angle curved tracks.

My rail line was originally a normal working Create railway.
I placed a train on that normal track first, and everything was fine.

After that, I tried to connect a RailX small-angle curved track section to the existing line.
From that point on, the world became unstable.

What happens

If I aim at / try to use track-targeting railway items on that area, the game can crash.
If I start the train, I immediately get disconnected with:
Internal Exception: java.lang.IndexOutOfBoundsException: readerIndex(11) + length(1) exceeds writerIndex(11)
In singleplayer this shows up as a “connection lost” screen, but it is a local singleplayer world, not a multiplayer server.
The issue seems tied to train movement or track graph recalculation after adding the small-angle RailX curve.

What I think is happening
It looks like the existing valid Create train graph becomes invalid after connecting the RailX small-angle curved track to a line that already has a train on it.
The rail may look connected visually, but when the game recalculates the train path / graph location / reattachment, it crashes or sends invalid sync data.

Relevant crash information
I also got crashes involving:

Create TrackTargetingBlockItem.withGraphLocation(...)
TrackTargetingClient.clientTick(...)
mixins from both RailX and Steam 'n' Rails appearing in the stack

And another crash path involving train reattachment / track graph logic, where RailX appeared in the stack as well.

Steps to reproduce

Create a normal working Create railway.
Place a train on that railway.
Connect a RailX small-angle curved track to that existing line.
Try to start the train or interact with railway placement/targeting near that connection.
Crash or disconnect occurs.

Expected behavior
The small-angle RailX curve should either connect safely to the existing graph, or fail gracefully without corrupting / crashing the train network.

Actual behavior
After adding the RailX small-angle curve to a line with an existing train, train movement or track interaction causes crashes / disconnects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions