bug report, which mod?

Looking for a mod? Have a review on a mod you'd like to share?
Post Reply
Sneak555
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Jul 10, 2016 10:44 pm
Contact:

bug report, which mod?

Post by Sneak555 »

I randomly got "[FI Error] Assembling machine (unit number 48373) has become invalid. Please report this error to the mod author"

1): I don't even know which mod this is coming from, how can I figure that out?
2): how do I figure out what that unit number is?

bonus: does somebody know what this bug is per-chance?

attached world save if that helps.

bonus-bonus: this is my first post here (edit: I guess my second? whatever), feel free to tell me I posted wrong somehow.
Attachments
save2.zip
world save.
(7.49 MiB) Downloaded 38 times

Pi-C
Smart Inserter
Smart Inserter
Posts: 1654
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: bug report, which mod?

Post by Pi-C »

Sneak555 wrote:
Sat Jul 08, 2023 8:30 pm
I randomly got "[FI Error] Assembling machine (unit number 48373) has become invalid. Please report this error to the mod author"

1): I don't even know which mod this is coming from, how can I figure that out?
I went by the assumption that "FI" might be initials of a mod name, so I looked at the list of active mods for names starting with "FI", or names consisting of two significant words, the first starting with 'F', the second with 'I'. The name "factory-inspector" looked promising, so I unpacked it and grepped recursively for "FI":

Code: Select all

$ ugrep -n FI
…
script/logger.lua:20:    game.print("[FI Error] "..string)
…
Not bad! Now if only we could find some part of the error message you've posted:

Code: Select all

$ ugrep -n "has become invalid"
script/production-tracker.lua:37:            logger.error(string.format("Assembling machine (unit number %d) has become invalid. Please report this error to the mod author", unit_number))
There you have it, looks like we've struck gold!
2): how do I figure out what that unit number is?
Every entity that is created in the game gets a unit_number; the unit_number of the first entity is 1, that of the second is 2, etc. As unit_numbers are unique, they can be used to identify a particular assembling machine, rocket silo, belt segment -- about everything that can be placed by players. Mods usually use the unit_numbers to keep track of entities they manage; as a player, you usually don't have to care about them.
bonus: does somebody know what this bug is per-chance?
The error occured in the function updateProductionAndConsumptionStatsAM, and one of the assembling-machines that were checked had become invalid -- it could have been mined by a player or bot, killed by an enemy, removed by a mod, or it could have been created by a mod that was removed from the game.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Post Reply

Return to “Questions, reviews and ratings”