Rail Signal Planner


[QoL] Automatically place rail signals on rails and intersections.

Utilities
4 days ago
0.17 - 2.1
49.7K
Logistics Trains

b Bug Report Analysis for Rail Signal Planner Mod (v2.0.3)

8 months ago

Summary:
The mod crashes with a non-recoverable error when the event on_player_selected_area is triggered, due to an invalid implicit API call in the graph-building logic.

Error Details:

Error Message:
"implicitly API call when implicitly was invalid."

Location in Code:
RailSignalPlanner/scripts/logic/build_graph.lua:169 inside function revive_ghost_signals.

Triggering Event:
on_player_selected_area (Event ID 57).

Impact:
Causes a multiplayer server to fail and shut down, deleting the active scenario.

Stack Trace Highlights:

[C]: in function '_index'

build_graph.lua:169 in revive_ghost_signals

build_graph.lua:180 in build_graph

control.lua:126 (or control.lua:68) in build_signals

control.lua:172 in on_player_selected_area

Possible Causes:

The mod attempts to call a Factorio API method that is not available or is in an invalid state when processing ghost signals.

A race condition or invalid internal state during area selection and signal graph construction.

The revive_ghost_signals function may be accessing game entities or properties that no longer exist or are not fully initialized.

Reproduction Steps (Inferred):

Play in multiplayer (or single-player) with Rail Signal Planner enabled.

Use the mod’s area selection tool to select a region for signal planning.

The error occurs immediately upon selection, crashing the game session.

Suggested Fixes for Developer:

Validate API availability before implicit calls in revive_ghost_signals.

Add defensive checks for entity validity and game state in the graph-building process.

Review the _index metamethod usage at line 169 in build_graph.lua.

4 days ago

Fuck AI. I know this mod better than AI, why not ask me directly instead of going through a dumb LLM that has no idea about the mod and very little knowledge about factorio mods.

It would have been much more useful if you just put the stacktrace instead of whatever AI thinks the problem is. I have no idea what you're trying to report. Only the line of code and that it is likely due to an invalid entity.

New response