Autobuild

by therax

Autobuild allows your character to automatically build, deconstruct, and upgrade nearby ghosts. A more efficient alternative to mods like Bluebuild.

Utilities
8 months ago
0.17 - 2.0
22.1K

g Crash when laying paving whole fulgora island with concrete

5 months ago
(updated 5 months ago)

I thought I had found a clever way to get rid of excess concrete... Pave the whole world!
I don't know what I was doing at the time it crashed. Reloading the autosave and turning off autobuild avoided the issue the second time around.

3796.796 Error MainLoop.cpp:1449: Exception at tick 5963820: The mod Autobuild (0.6.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event autobuild::on_nth_tick(10)
autobuild/control.lua:329: attempt to index local 'entity' (a nil value)
stack traceback:
autobuild/control.lua:329: in function 'insert_or_spill'
autobuild/control.lua:356: in function 'try_revive_with_stack'
autobuild/control.lua:422: in function <autobuild/control.lua:410>
(...tail calls...)
autobuild/control.lua:967: in function 'do_autobuild'
autobuild/control.lua:1082: in function 'handle_player_update'
autobuild/control.lua:1088: in function <autobuild/control.lua:1086>

The code that crashed:

if entity then
  entity.surface.spill_item_stack { position = entity.position, stack = stack }
else
  player.surface.spill_item_stack { position = entity.position, stack = stack }
end

The second spill_item_stack uses entity.position after determining that entity is nil.
I'm guessing that you wanted to use the player character position there.

4 months ago

I'm sorry. Currently a bit out of the loop. Didn't touch factorio in a while.
I would guess, your assessment is correct and you can fix it yourself?
But I'm not sure, when I get around, fixing that... :/

4 months ago

I posted a merge request (#18) that should fix the issue.
Since I could not reproduce this easily, testing was limited.

New response