If you put the factory side-by-side and select item relay to link the two together, you will get an error. The error seems to came from an attempt to set the inventory limits on non-existence item relay (perhaps the function can't found its item relay pair?)
Anyway, I tried to put some null checking on the inventory-limit setting and the problem is solved.
Here the code (the code replace the original code from line 154-163 on file "/factory/input_relays/items.lua"):
<pre>
local cinven
if (self.input ~= nil and self.output ~= nil) then
cinven = {
self.input.get_inventory(defines.inventory.chest) ,
self.output.get_inventory(defines.inventory.chest) ,
}
else
cinven = { (self.input or self.output).get_inventory(defines.inventory.chest) }
end
for _, inven in pairs(cinven) do
local slots = #inven
if (free_real_estate.config.item_relay_bar < slots) then
inven.setbar(free_real_estate.config.item_relay_bar)
end
end
</pre>