Skip to content

Stack overflow when breaking long rails #711

@CacPixel

Description

@CacPixel

Before submitting a bug, please make sure following checks.

  • You have finished loading all model packs before login to world/server.
  • You're using the latest stable, snapshot, or daily-snapshot version of fixRTM.
  • You're using correct version of RTM and NGTLib for your fixRTM.
  • You couldn't find same bag in the issues.

Descrive the bug

Stack overflow when breaking long rails.
I noticed it will judge the breaking field in jp.ngt.rtm.rail.TileEntityLargeRailCore to avoid recursion too many layers, but it may not work in the latest commit of fixRTM.
The full crash report is here (ubuntu pastebin)

To Reproduce

Make a long rail in a world(hundreds of meters, such as 200m, 300m...) and break the rail (instead of breaking the rail core, breaking the rail base will cause stack overflow).
Long rail may requires more viewing distance and longer marker search distance, so adjust the horizontal line to make the rail long is possible.

Expected Behavior

The rail should break entirely in a short time without stopping the server thread.

Actual Behavior

The server thread stops processing ticks (such as player can not send messages), and StackOverflowError was thrown.
You can see many rail bases and the core still exists on the server when re-entering the game (bases doesn't exist was rendered as bedrock here):
Screenshot_2024-02-26_21-17-36

OS

Windows 10 Pro 22h2

Minecraft Forge Version

2859

fixRTM Version

commit 9eeff27: 9eeff27

Other Mods

Optifine, smoothfont, vanillafix, malisisdoors, squeedometer and more(see crash report for more details)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working in fixRTMneeds-triageThe issues without maintainer's check

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions