Planet Pelagos


Visit Pelagos, an insular planet of coconuts. Use calciners to refine resources, and cargo ships as the perfect way to connect its scattered shores

Content
3 days ago
2.0
8.40K
Factorio: Space Age Icon Space Age Mod
Planets Environment Mining Fluids Manufacturing

b Crash on startup: No icon size defined for icon (lubricant.png)

7 days ago

Hi there! Crash when starting up Factorio:


37.030 Error ModManager.cpp:1764: Failed to load mod "pelagos": core/lualib/util.lua:361: No icon size defined for icon
{
icon = "base/graphics/icons/fluid/lubricant.png"
}
stack traceback:
[C]: in function 'error'
core/lualib/util.lua:361: in function 'combine_icons'
pelagos/prototypes/recipes/barreling.lua:147: in function 'generate_barrel_recipe_icons'
pelagos/prototypes/recipes/barreling.lua:168: in function 'create_fill_barrel_recipe'
pelagos/prototypes/recipes/barreling.lua:241: in function 'get_or_create_barrel_recipes'
pelagos/prototypes/recipes/barreling.lua:331: in function 'process_fluid'
pelagos/prototypes/recipes/barreling.lua:343: in function 'process_fluids'
pelagos/prototypes/recipes/barreling.lua:347: in main chunk
[C]: in function 'require'
pelagos/data-updates.lua:53: in main chunk


Probably because of a combination with some other mods, otherwise more people would report that problem I guess, and you haven't updated... Don't know which though, I've got a ton of mods installed (many planets and QoLs, no major overhauls though). Please let me know if I can provice additional info to help you track this down.

When I comment out line 147 locally, Factorio starts without the error...

7 days ago

maybe to narrow it down; I've updated my mods; last time I played was Nov 30th, today (Dec 2nd) these mods updated, presumably they've changed something that now raises the error in your mod...?

I can't see anything obvious messing up fluids or lubricant, but maybe you have a hunch...

Paracelsin_1.6.12.zip
dea-dia-system_0.30.20.zip
rubia_0.69.127.zip
agricultural-roboport_1.1.0.zip
alloy-smelting_0.5.0.zip
Arcanyx_0.1.6.zip
Voidcraft_2.6.1.zip
ballistic_missile_0.1.22.zip
Cerys-Moon-of-Fulgora_4.18.3.zip
color-coded-pipes_1.6.0.zip
crushing-industry_0.4.21.zip
cupric-asteroids_1.5.5.zip
cycle-quality-on-clipboard_1.0.1.zip
enemyracemanager_2.0.55.zip
erm_terran_2.1.10.zip
erm_unit_control_1.1.9.zip
foliax-two_0.1.3.zip
foliax_0.5.2.zip
IridescentIndustry_0.7.2.zip
planet-muluna_2.1.68.zip
pump_2.1.16.zip
linox_0.6.3.zip
skewer_planet_vesta_2.1.3.zip
skewer_planet_vesta_assets_1.0.9.zip
skewer_planet_vesta_assets_2_1.0.2.zip
PlanetsLib_1.14.7.zip
redrawn-space-compat-fixes_1.0.28.zip
se-space-trains_1.0.11.zip
terrapalus_0.2.6.zip
condensing-agricultural-tower_1.1.0.zip

7 days ago
(updated 7 days ago)

Code that fails is code responsible for creating recipes for fluid barreling.
And lubricant is fluid present in base game. So it should just always work.

Which means that it is possible that some mod tinkers with it.
This is first time I see something like that.
I wil try to check it out.

If you want to help me
You can divide your mod list in half and launch it and repeat untill you find exact commbination that fails

7 days ago

It's very strange. I tried to track it down by disabling the new/updates mods above, and when disabling condensing-agricultural-tower, there's no crash and everything works.

However, enabling only the bare minimum vanilla+pelagos(+deps)+condensing-agri does NOT crash, too.

So it's a more complicated interaction.

I added a few more loglines to Pelagos' barreling, and what I noticed when I deactivate condensing-agri (but with my original full mod list), there does not even occur a barreling handling from Pelagos' scripts for lubricant where it enters https://github.com/Talandar99/pelagos/blob/1183939508c178106312e6de04023ab40308dd9f/prototypes/recipes/barreling.lua#L147.

After some more logging and digging and diffing the outputs of Factorio's logs between working and non-working output, I've noticed that when I add condensing-agricultural-tower, there's quality lubricant fluids added. uncommon-lubricant, rare-lubricant etc.

But those are introduced by the mod quality-plants, or at least that mod adds a ton of plants with quality, and I believe they wrongly pick up lubricant. That's probably a bug there, I'll report it as soon as I understand it.

So, when I EITHER deactivate condensing OR quality-plants, with all other mods the same including Pelagos, Factorio starts. Just with both combined it crashes.

So it's gotta be this: https://github.com/Syen-ce/condensing-agricultural-tower/blob/main/data-updates.lua; for each of these three, there's those "quality-fluids" added (uncommon-lubricant, uncommon-steam, uncommon-water).

condensing-agri adds those fluids as minable results, then probably quality-plants thinks that's a seed of a plant, and then they create their quality variants.

And then, e.g. uncommon-lubricant's icon properties look like this when Pelagos is processing them:


icons = {
{
icon = "base/graphics/icons/fluid/lubricant.png"
},
{
icon = "quality/graphics/icons/quality-uncommon.png",
scale = 0.25,
shift = {
-10,
10
}
}
},


(because, of course, quality-plants adds the quality-icon).

Now, it's an array, whereas for vanilla lubricant, it's just icon = "__base__/graphics/icons/fluid/lubricant.png". Thus, Pelagos enters https://github.com/Talandar99/pelagos/blob/1183939508c178106312e6de04023ab40308dd9f/prototypes/recipes/barreling.lua#L147.

And vanilla lubricant hat no icon_size set (which I find a bit strange), so uncommon-lubricant doesn't, too.

But in https://github.com/Talandar99/pelagos/blob/1183939508c178106312e6de04023ab40308dd9f/prototypes/recipes/barreling.lua#L147, you pass the fluid's icon_size as 4th argument to util.combine_icons. But this is nil

So, this https://github.com/wube/factorio-data/blob/5ab7a49559f59edb3527c52166055d00d8b7a92a/core/lualib/util.lua#L361 crashes, because icon_to_add.icon_size is nil and the fallback default_icon_size is nil, too.

I'm not sure if it's correct for Pelagos to pass fluid.icon_size this way when it's nil, it probably should pass a valid value. If you want to support liquids with an icons array set but having no icon_size set (don't know whether one could argue that this is even valid according to Factorio's APIs or not).

But the root cause is in the other mods I would say. I mean quality fluids are ridiculous in the first place, but I think those are not intentionally created by them.

Soooo... I think you could mull over the default_icon_size thing, but I don't see more than that... Maybe you come up with other aspects though and can use this chance to improve something. I'll report it in the other mods.

Thanks for your time. :-D

7 days ago

I know author of new agri tower mod. I will reach him and try to figure out how to fix this.

Thx a lot for all info so far

7 days ago

Yeah maybe there's something to do on their side; I haven't really tried their mod yet, it's interesting to have a fluid as minable result. If that works in all cases, i think they're fine and quality-plants could fix it by not introducing quality fluids. :-)

New response