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 when creating a blueprint from map mode

2 years ago
(updated 2 years ago)

Just got the following error:

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

Error while running event miniloader::on_player_setup_blueprint (ID 69)
miniloader/lualib/blueprint.lua:160: attempt to index local 'bp' (a nil value)
stack traceback:
miniloader/lualib/blueprint.lua:160: in function 'filter_miniloaders'
miniloader/control.lua:326: in function 'handler'
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 was trying to take a new blueprint while holding "Shift" of an existing rail network piece, nothing but rails, signals, roboports, large power poles, and lights in the blueprint, and I got the above error

2 years ago
(updated 2 years ago)

Same/Similar behavior after updating to 1.14.3 (vas previously on 1.13.0).

I can reproduce this error with no other mods running. after having reset all default (deleted C:\Users\<USER>\AppData\Roaming\Factorio).

Same error MSG as poster above
The mod Miniloader (1.14.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event miniloader::on_player_setup_blueprint (ID 69)
miniloader/lualib/blueprint.lua:160: attempt to index local 'bp' (a nil value)
stack traceback:
miniloader/lualib/blueprint.lua:160: in function 'filter_miniloaders'
miniloader/control.lua:326: in function 'handler'
miniloader/lualib/event.lua:15: in function <miniloader/lualib/event.lua:13>

I start a new game with default settings and no existing profile/mods.
I created a new blueprint containing only one furnace (so it does not happened when creating a new blueprint, only when updating and existing blueprint).
Then updated the blueprint from normal world view with anything.
Then the mod crash happens

Modlist:
Basemod
Miniloader

Edit: Note! The updated blueprint is till being saved with new content and is stored propperly even if game crashes.

2 years ago
(updated 2 years ago)

Can you provide more detailed reproduction steps? I tried creating a new blueprint, and then updating the blueprint with new contents from the main world view, and no crash.

Are you creating and/or updating the blueprint directly from inside the blueprint library? Unfortunately, this is not supported for mods.

2 years ago

I can't speak for @clorine, but for me, I was updating a blueprint that is in a blueprint book, stored in my character inventory

2 years ago
(updated 2 years ago)

Can you provide more detailed reproduction steps? I tried creating a new blueprint, and then updating the blueprint with new contents from the main world view, and no crash.

I can not reproduce the crash in any way with a blueprint or blueprint book that is stored inside my character inventory.
For me the crash only happens when updating from the library.

These are the steps i need to do to recreated the crash:

  1. Already have a blueprint with something (any entity) inside it, stored in "My Blueprints" or "Game Blueprints". There has to be at least one entity inside the blueprint, I get no crash if the blueprint is purposefully stored blank before updating it.

  2. I Open the stored blueprint from the library and press the "Select New Contents for the blueprint" button.

  3. I find an entity i want blueprinted (any kind that can be blueprinted). From either inside World view or Map view, does not make a difference. Any entity that can be blueprinted causes the problem, even tiles. It does not have to be a loader.

  4. I Click and Drag with the selection tool over the entity. There has to be an entity inside the selected area, if the are only contains entities that can't be blueprinted like the crashed ship at the starting area or trees/grass/dessert then there will be no crash.

  5. I release the mouse button to complete the selection and update the blueprint content.

  6. And crash *

Are you creating and/or updating the blueprint directly from inside the blueprint library? Unfortunately, this is not supported for mods.

I'm unsure of what you mean, I update/change blueprints from within the library a all the time,
and I normally run tons of mods and modded entities (that i also blueprint).
What makes this case special?

Good luck with the bug-hunting :)

2 years ago
(updated 2 years ago)

There is a hook in the API that mods can use to alter a freshly created blueprint. This is required for Miniloaders since they consist of 3-9 distinct entities in the same tile. This hook does not work when updating an existing blueprint.

(https://forums.factorio.com/viewtopic.php?p=517287#p517287)

There is a workaround that was implemented in Miniloader 1.14.3, by finding the updated blueprint in the player’s inventory, but this doesn’t work for blueprints in the blueprint library. Mods have no access at all to the blueprint library.

I am trying to find an even uglier workaround for blueprint books, but the blueprint library appears to be a lost cause without changes to the Factorio core.

My recommendation is to move blueprints from the library into the character inventory before updating them, or preferably to avoid the Select New Contents function for blueprints entirely since it is (in the dev’s words) a “giant hack.”

2 years ago
(updated 2 years ago)

.

New response