Bulk Rail Loader

by therax

Bulk train loader/unloader with buffer.

Content
2 years ago
0.16 - 1.1
58.6K
Logistics

b Crash with /editor?

3 years ago
(updated 3 years ago)

I don't know how I get into such a state yet, it seems to be working fine for quite a while then "sometime later" whenever I try to copy (with or without rail) all copy/blueprint operations start failing with this error.

log is: https://gist.github.com/admalledd/696a9b18226f222c9da46c0015ea9357

I will note that I am attempting to sandbox/editor-mode create some blueprints for me to use in normal gameplay, but from reading the on_blueprint() code I am unsure why entities[index] is returning nil in any of these cases... If there is any extra info/context I can provide let me know. I currently am hitting this on a space-eploration modded save, but I have reproduced in a more vanilla save as well randomly. I am still unsure what the initial context is besides I am in editor mode cut/copying/moving things (sometimes rails, sometimes not) around.

I am currently testing a patch of changing the if statement to:
if bp_entity and (bp_entity.name == "railloader-chest" or bp_entity.name == "railunloader-chest") then
(basically check that bp_entity is valid)

Though I worry this is hacky/hiding something else because "why would that ever not index correctly", hrm.

3 years ago

Are you using the BP GUI's button to replace the contents of a blueprint? (It has a tooltip something like "select new contents for this blueprint.")

3 years ago

At most I (in prior BPs/clip-board content) removed entities (such as "remove all rail signals so I can flip")? I haven't actually gotten to the point in my template blueprint building to start replacing things.

I do know that it is some chain of events at least, that it isn't a clear "blueprint/copy this and error" since I can sometime bp things fine, but if I get into a "bad state" I cannot bp anything again. Due to the auto-saves and that there is no recovery, I can't think of anyway to easily extract what exactly that bad state is yet though.

PS: that attempted hack/patch made things worse/errors elsewhere now down the line, so guess for now in editor-mode I am removing BRL, drat.
PPS: I can throw a few hours trying more reproduction cases at it this weekend in a vanilla+BRL state taking more notes on what I am doing, and maybe even a save with steps, though that depends on me figuring out clear reproduction :)

3 years ago

Any luck reproducing the issue?

3 years ago

Work has been crazy busy, sorry. I will attempt to dig into this again this week.

3 years ago

I have been trying to recreate with just this mod stand-alone and I am unsuccessful. I am going to make a guess that one of the many extra mods (some of Bobs+Space Exp+some QoL) was conflicting with blueprint/copying in some manner, so all I can do is shrug at this for now, and point to my list of mods and hope if someone else has an identical error we can start to compare mods and actions/steps. I also briefly tried to rule out mods, but the inconsistency is my downfall, in that with the full mod list I can reproduce (sometimes) but if I remove even one or two of the more suspect mods (attach notes, construction drones, jetpack, module inserter, picker-dollies) I can't seem to reproduce and I can't tell if because it is those combined that is a problem, or if I just fail and figuring out consistent ways to trigger this.

I can confirm though that editing a BP (or taking a copy-to-blueprint then editing that) seems to be a required intermediary step along the way though.

For ref if/when this is ever seen again, here is the full list of mods I was playing with when this blew up: https://gist.github.com/admalledd/b25fff42beca36112a3a093401452da5

3 years ago

I found a bug related to blueprint creation that is related when other mods alter blueprints during the blueprint creation process. Perhaps this caused your problem. Anyway, the fix for that should be out in the next release.

New response