[Klonan] [1.1.61] crash in production_score.generate_price_list when entity has mineable_properties but no products
Posted: Tue Aug 30, 2022 9:28 pm
I received a crash report on my fork of Fill4Me, that instead seems linked to an interaction between Sea Block and the core function production_score.generate_price_list. Sea Block changes the "coal" entity to lack a field that the function requires.
Reproduced reliably: I tracked it down to the entity having mineable_properties set, but mineable_properties.products unset, which get_raw_resources doesn't defend against.
I don't know if the settings Sea Block sets are sane for this entity, but I expect the function not to crash when called by another mod (Fill4Me here), since the calling mod has no way to anticipate the issue or defend against it.
Maybe get_raw_resources should skip entities with no mining products ? Or maybe this is a forbidden state for the entity, that Factorio should detect after mods are loaded ?
Seems similar to this existing report without being identical: a value set by a mod breaks a core function called by Fill4Me.
Reproduced reliably: I tracked it down to the entity having mineable_properties set, but mineable_properties.products unset, which get_raw_resources doesn't defend against.
I don't know if the settings Sea Block sets are sane for this entity, but I expect the function not to crash when called by another mod (Fill4Me here), since the calling mod has no way to anticipate the issue or defend against it.
Maybe get_raw_resources should skip entities with no mining products ? Or maybe this is a forbidden state for the entity, that Factorio should detect after mods are loaded ?
Seems similar to this existing report without being identical: a value set by a mod breaks a core function called by Fill4Me.