Project Cybersyn - Logistics Train Dispatcher


Creates a feature-rich train logistics network through cybernetic combinators. With just this mod you can coordinate the economic inputs and outputs of your entire megabase.

Content
3 days ago
1.1 - 2.0
25.6K
Logistics Trains Circuit network

b Bot-deconstructed refueler combinator crashes when reattached

1 year, 11 months ago
(updated 1 year, 11 months ago)

If you deconstruct a refueler combinator with bots, the station that it was attached to gets put in a state where it crashes the game if you try to build another cybersyn combinator for it, or deconstruct the station.

I fixed it locally by adding a simple if (network) check in main.lua:88, but the real issue is probably the fact that the network data doesn't get cleared when the combinator is deconstructed.

The crash looks like this:

Error while running event cybersyn::on_pre_player_mined_item (ID 11)
__cybersyn__/scripts/main.lua:88: attempt to index local 'network' (a nil value)
stack traceback:
    __cybersyn__/scripts/main.lua:88: in function 'on_refueler_broken'
    __cybersyn__/scripts/main.lua:519: in function 'on_stop_broken'
    __cybersyn__/scripts/main.lua:601: in function <__cybersyn__/scripts/main.lua:596>
1 year, 11 months ago

I seem unable to replicate this bug currently, although it looks very similar to one or two I encountered several days ago, which have been fixed. It's not quite the same bug though. I tried replicating as you instructed, specifically using 1) a personal roboport and then 2) a regular roboport as well as by hand, so that's very strange. Are you certain this was on the latest version?

1 year, 11 months ago

Here's a save file. The player character is standing right next to the station. Try to put a Cybernetic Combinator next to it and you'll get the crash. http://cdn.modo.lv/temp/bug.zip

1 year, 11 months ago
(updated 1 year, 11 months ago)

I could not reproduce this bug either, and unfortunately your world download file link does not load for me so I can't test in your world. There is a small chance you managed to download a version of the mod I uploaded by mistake to the mod portal for a few minutes. If that is the case either redownloading the mod or waiting for my next update today will fix it.
I really appreciate the thorough bug report, sorry I can't seem to download your world.

1 year, 11 months ago

Did you try to open the link in a new tab? It doesn't download for me either just clicking on it (not sure why), but it works in a separate tab.

1 year, 11 months ago

I found the issue, your file is hosted without encryption or authentication so my browser is blocking it. I will lift these restrictions only this one time but please for your sake don't host file downloads without authentication, it is incredibly easy for someone to maliciously replace the file download with whatever they want while it is in transit.

1 year, 11 months ago

Sorry, my bad. The link also works with HTTPS, I just copy pasted the insecure variant.

1 year, 11 months ago

oh dear this world is somehow crashing my debugger. I have successfully reproduced the crash thankfully, so I am on track to actually tracking down and fixing the bug, but I'm sorry to say it's going to take me a while to fix this. Thank you for the report.

1 year, 11 months ago

Should be fixed in version 1.2.0.

New response