Miniloader

by therax

Compact and UPS-friendly 1x1 loaders. Works with train cargo wagons, circuits, filters, and modded belts from Bob's, Krastorio, FactorioExtended Plus, Space Exploration, and Ultimate Belts.

Content
7 months ago
0.15 - 1.1
177K
Logistics

b Miniloader causing crash with landfill

2 years ago
(updated 2 years ago)

Was just putting down landfill from the map screen and got the following error

The mod Miniloader (1.14.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event miniloader::on_pre_build (ID 9)
miniloader/control.lua:242: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
miniloader/control.lua:242: in function <miniloader/control.lua:231>
(...tail calls...)
miniloader/lualib/event.lua:15: in function <miniloader/lualib/event.lua:13>

I'm currently running a Space Exploration playthrough, and a full list of mods is below (all are up to date to the latest released versions)

AAI Containers & Warehouses
AAI Industry
AAI Signal Transmission
Afraid of the Dark
Alien Biomes
Auto Deconstruct
Bottleneck
Even Distribution
Factorio Library
Flow Control
FENI
InformaTron
Jetpack
LTN
LTN Cleanup
Miniloader
Robot Attrition
Santa's Nixie Tube Display
Space Exploration
Space Exploration Graphics
Space Exploration HR Graphics
Space Exploration Post Process
Vehicle Snap
Waterfill

I also don't currently use any miniloaders in my base

2 years ago

Hi,

I also have this same error, I was not placing landfill so I assume it is unrelated to that.
I do however have an extensive set of mini loaders throughout my base. The error message is identical to the one shown above.

My mods list is as below:
base
Advanced-Solar
Aircraft
AutoDeconstruct
BeltRouter
bigtruck
Bottleneck
color-coding
Crafting_Speed_Research
DragonIndustries
ElectricTrain
Factorissimo2
FARL
flib
Flow Control
HelicopterRevival
helmod
KS_Power
Long_Range_Radar
miniloader
MiscLib
Power Armor MK3
power-grid-comb
qol_research
RateCalculator
Robot_Battery_Research
Squeak Through
stdlib
TreePlant
UltimateBelts
WaterWell

Im also running on a Linux headless server if that makes any difference at all.

2 years ago

Just did some further testing, I was placing down Hazard Concrete at the time and it seems that as soon as i place the concrete in the same place the game crashes with the above error. This is reproducible in my world.

2 years ago

More testing later and specifically using copy and paste to place concrete triggers the game crash. If the concrete is placed by hand or by proper blueprint then the issue is not present.

2 years ago

Crash happens with space platform as well in space exploration.

https://i.imgur.com/lLSkHhV.png

2 years ago
(updated 2 years ago)

I've also encountered this bug.

Repro:

Copy and paste a section of space of the platform, or just place the space platform blueprint in the empty space, that is highlighted. Like so: https://imgur.com/99aiZ9F

Save file:
https://drive.google.com/file/d/1w4yKuDCpEFHkUPZBbClmYvOLrkA09sg_/view?usp=sharing

2 years ago

I was copying an pasting some beacons and got the same error.

2 years ago

Looks like the crash happens here:
https://github.com/mspielberg/factorio-miniloader/blob/master/control.lua#L242

seems like bp.get_blueprint_entities returns nil, if blueprint has no entities (like in case of blueprint with landfill or space platform or just tiles. but apparently blueprinting just trains works...)

2 years ago

in the meanwhile, a workaround for the impatient, that seems to work, is to modify:
Factorio\mods\miniloader_1.14.1.zip\miniloader_1.14.1\control.lua lines 242-247 and wrap them in:

if bp.get_blueprint_entities() then
...
end

like so:

if bp.get_blueprint_entities() then
for _, bp_entity in pairs(bp.get_blueprint_entities()) do
if util.is_miniloader_inserter_name(bp_entity.name) then
blueprint_contained_miniloader = true
break
end
end
end

2 years ago

looks like its now fixed in 1.14.2. Thanks for the quick fix!

New response