Miniloader (Redux)


UPS-friendly 1x1 loaders.

Content
a month ago
2.0
12.1K
Logistics

b Crash

14 days ago

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

Error while running event miniloader-redux::on_robot_built_entity (ID 17)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'newindex'
__miniloader-redux
/scripts/controller.lua:588: in function 'reconfigure'
miniloader-redux/scripts/snapping.lua:195: in function 'updateNeighborLoaders'
miniloader-redux/scripts/snapping.lua:202: in function 'updateLoaders'
miniloader-redux/scripts/event-setup.lua:170: in function 'handler'
miniloader-redux/stdlib/event/event.lua:345: in function 'pcall'
miniloader-redux/stdlib/event/event.lua:362: in function 'dispatch_event'
miniloader-redux/stdlib/event/event.lua:441: in function <miniloader-redux/stdlib/event/event.lua:399>

Crash occurred after using an upgrade planner to upgrade blue belts, undergrounds, and splitters to turbo on Vulcanus. Loaders weren't included in the upgrade. Saved right before the crash, it should occur after ~1 minute. Save file uploaded to Mega.
https://mega.nz/file/7QJxQTjZ#D0n8dEV6kMBr8psYyp28dMPD9dkfPfbc-LDNDQ-LJ5g

14 days ago

I suspect the culprit may be my mod (quality control). I'm still investigating, but here's what I think happened:

Quality control upgraded a hidden entity (one of the sub-entities of a mini loader); by doing that it would have probably messed up references in miniloaders ml_entity.inserters table.

This could cause the problem when miniloader tries to access inserter.direction on line 588, it would fail with "LuaEntity was invalid"

Sorry Xaal, I hate that this broke a save in a bad way that would be hard to recover from. It was surprise to me that hidden/compound entities exist.

I'm working on a migration in quality control to look for and fix the broken entities, along with the change to prevent quality control from touching miniloader entities specifically.

Investigating this problem made me aware of the destructible flag on entities, and the selectable_in_game property on prototypes; which will be good generic ways to prevent issues like this re-occurring from my mod.

This all assumes I understand what happened correctly.

14 days ago
(updated 14 days ago)

I actually made a bug report there too, I didn't connect the dots on the crash that the issues are related. https://mods.factorio.com/mod/quality-control/discussion/68a61a181b2ab5cc743f43e6

Edit: Oh wait you're the QC dev lol

13 days ago
(updated 13 days ago)

That's meee :D

Ok, patch for quality-control is up, this does work on the save you posted here, so the game should continue after you update.

Unfortunately it removes the bad loaders (67 total, 17 on nauvis, 50 on vulcanus). I tried for hours to figure out how to fix or replace them properly, but miniloader does some magic when they are placed that I couldn't replicate from quality control's perspective.

Hopefully it didn't slow down your base building too much today!

11 days ago

Yes, sorry, there is not a lot that can be done from the miniloader PoV; if the internal entities get changed / removed, then all bets are off.

New response