Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Crash when previewing new track segment (45-slope & 90-degree-bend) #23

Open
Tachrayonic opened this issue Jan 2, 2023 · 4 comments
Open
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed soon soon stale

Comments

@Tachrayonic
Copy link

Tachrayonic commented Jan 2, 2023

A crash isn't really surprising here, but since even Shalz was running into it I thought I'd document my findings here.
This crash immediately kicks the player out of the world, and will kick them upon relogging as the crash conditions will still be met.

There are two requirements for the crash to happen:

  • At least one end of the rail segment you're placing must be a 45-degree slope. This can the the new tile you're placing, or the piece you're connecting from.
  • You must start a rail from a 45-degree sloped block.
  • You must end the rail as a flat segment, rotated 90 degrees. From North/South to East/West or vice versa.

Note that you do not need to right-click to place the new segment, simply getting the preview to appear for such a track segment will usually crash your game immediately.
There are some segments that meet these conditions that don't crash, usually very short segments.

Now, to deal with this crash and get back into your world you need to get your player looking away from the offending location.

  • You can modify your player's file, such as with an nbt editor, to change their position or destroy the rail item in their hand.
  • You can delete the player's file. A bit overkill in this case, but an option nonetheless.
  • In Multiplayer, you should be able to simply break the block the crashed player was looking at when they disconnected. I haven't had the chance to try this, let me know if this does or doesn't work.

Hope this helps!

@Tachrayonic Tachrayonic added the bug Something isn't working label Jan 2, 2023
@Tachrayonic
Copy link
Author

crash-2023-01-03_16.46.56-client.txt
Crash log from such a crash

@Tachrayonic
Copy link
Author

2023-01-03_17 05 13
Just examined this a bit more thoroughly, it is more directional than I realized.

Connecting from the Red flat track pieces to the Green sloped track pieces Works every time
Connecting from the Green sloped track pieces to the Red flat track pieces Crashes every time

Replacing the Red pieces with slopes Worked every time, so Slope -> Slope seems to work every time
Rotating the entire structure had no effect, so it doesn't seem to be limited by rotation

It seems like you simply cannot connect from a slope to a flat tile around a 90-degree bend. I thought it was worse than that, but that's what my data shows.

Schematic for my test rig
track_ntl_crash_test.zip

@tizu69
Copy link
Owner

tizu69 commented Jan 3, 2023

Oh my god, thank you so much for all this information!
This will definitely be patched in the next release, most likely by reintroducing the error message when trying to start from a slope (unless I can somewhat easily fix the bug directly).
While I'm still on my holidays, I'll try to fix this as soon as possible, as I want to avoid all crashes.
Honestly, thanks. This helps me so much!

@tizu69 tizu69 added help wanted Extra attention is needed soon soon labels Jan 3, 2023
@tizu69 tizu69 self-assigned this Jan 3, 2023
@github-actions
Copy link

This issue has been marked as stale because it has been inactive for 3 weeks. It will be closed if it remains inactive for another 3 weeks.

@github-actions github-actions bot added the stale label Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed soon soon stale
Projects
None yet
Development

No branches or pull requests

2 participants