MinimalWire - Clean Power Networks


MinimalWire is a quality of life mod that eliminates spaghetti and keeps your factory wires clean by enforcing efficient connections, using Kruskal's algorithm to produce a minimum spanning tree each time a power pole is added to the network. Check out my other mod for a much more relaxed approach to this idea: OneWire

Tweaks
a day ago
2.0
596
Circuit network Power

b Robots placing substation crash

2 days ago

Bots tried to place a substation, causing a crash.

Crash log:

7457.304 Error MainLoop.cpp:1435: Exception at tick 11379949: The mod MinimalWire - Clean Power Networks (1.0.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event minimalwire::on_robot_built_entity (ID 15)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__minimalwire
/control.lua:290: in function 'rebuild_mst_for_subnetwork'
minimalwire/control.lua:395: in function <minimalwire/control.lua:392>

2 days ago

I'm seeing the same error in 1.0.6, traceback line numbers are a bit different though:

1039.441 Error MainLoop.cpp:1435: Exception at tick 34080635: The mod MinimalWire - Clean Power Networks (1.0.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event minimalwire::on_robot_built_entity (ID 15)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    [C]: in function '__index'
    __minimalwire__/control.lua:284: in function 'rebuild_mst_for_subnetwork'
    __minimalwire__/control.lua:432: in function <__minimalwire__/control.lua:429>
1039.441 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod MinimalWire - Clean Power Networks (1.0.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event minimalwire::on_robot_built_entity (ID 15)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    [C]: in function '__index'
    __minimalwire__/control.lua:284: in function 'rebuild_mst_for_subnetwork'
    __minimalwire__/control.lua:432: in function <__minimalwire__/control.lua:429>"
1039.441 Info ServerMultiplayerManager.cpp:806: updateTick(34080635) changing state from(InGame) to(Failed)
1039.442 Info SteamContext.cpp:531: Leaving lobby...
1045.855 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
a day ago
(updated a day ago)

Hey, thanks for reporting this! Strangely that traceback leads to a part of the code that does check for entity.valid, so I'll need to look further into this. I can't recreate this by just having a bot place a substation, would one of you be able to provide me with a blueprint or screenshot that causes the crash? Thanks, SleepyStew

a day ago

I didn't try to place a blueprint, rather my bots tried to place a substation which had been destroyed by a pentapod, this also happens when it gets destroyed by a biter.

New response