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

This subforum contains all the issues which we already resolved.
madmath
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Jun 04, 2016 11:34 pm
Contact:

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

Post 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.
Attachments
factorio-current.log
(66.39 KiB) Downloaded 114 times
Post Reply

Return to “Resolved Problems and Bugs”