Page 1 of 1

[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
by madmath
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:
  1. Install Sea Block and Fill4Me.
  2. Try to start a singleplayer freeplay game with default settings.
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.

Re: [Klonan] [1.1.61] crash in production_score.generate_price_list when entity has mineable_properties but no products

Posted: Fri Sep 02, 2022 8:59 am
by Klonan
Thanks for the report

Its fixed for the next release

Re: [Klonan] [1.1.61] crash in production_score.generate_price_list when entity has mineable_properties but no products

Posted: Fri Sep 02, 2022 8:46 pm
by madmath
Thank you very much Klonan !