Lazy Builder

by Morgott

Another mod for auto-construction/upgrade of ghost structures and auto-dismantling of objects, but as non-cheaty as possible.

Utilities
a month ago
2.0
3.83K
Blueprints Cheats

g [CLOSE]Error - scan / modules / ghosts

a month ago

The mod Lazy Builder (1.1.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event auto-build-and-deconstruct::on_tick (ID 0)
Index out of inventory bounds.
stack traceback:
[C]: in function 'index'
__auto-build-and-deconstruct
/control.lua:196: in function 'process_module_slots'
auto-build-and-deconstruct/control.lua:536: in function <auto-build-and-deconstruct/control.lua:516>
(...tail calls...)
auto-build-and-deconstruct/control.lua:584: in function 'process_all'
auto-build-and-deconstruct/control.lua:620: in function 'scan'
auto-build-and-deconstruct/control.lua:632: in function <auto-build-and-deconstruct/control.lua:629>

Happened when I had a ghost in my cursor of U-235, I was trying to place some into a assembler 2 building Atomic Bombs`, but I didn't realize I was out, so I pressed Q on the slot in the assembler's recipe and then left clicked to place it (not realizing I was out, so it turned into a ghost in my cursor) and upon left clicking, it threw this error. Error does not occur if I DO have the U235.

If I do the ghost cursor from map view, the crash doesn't happen until after I exit it.

I started a new world and used the editor to place down an assembler 2 and set the recipe, but using a ghost cursor of U235 here does NOT cause the error......... so not sure what about my main save was causing the issue?
I even tested with having robots in a network and in a personal roboport.

the assembler was in my big mall. But none of the machines around me in the mall have any module slots that are awaiting fulfillment or anything. I'm definitely not a modder or lua fluent at all but it looks like something was bugging out while it was scanning nearby machines?

I do have a lot of mods. But I couldn't replicate this outside of my particular instance of that moment in my main save.
I can send you the save if you want, just don't judge my gameplay. Lol. I'm a... lazy builder.
Mod List: https://pastebin.com/s9TvLLPh
Factorio Log: https://pastebin.com/R8ZJxPam

a month ago

Hi, thanks for the report and for attaching the log - that made this easy to track down.

The crash ("Index out of inventory bounds") happened when the mod processed module insert/upgrade requests on a machine. In some cases a requested module slot pointed outside that machine's module inventory (this can be triggered by item requests coming from other mods), and the game threw a hard error instead of just skipping it.

I've fixed it in version 1.1.2 - the mod now checks the slot is within bounds before touching it, so those requests are safely skipped. Please update to 1.1.2 and it should be gone. Let me know if you still run into it!

11 days ago

Definitely fixed for that save file and situation! Great! Thanks!

New response