#42944: assert failure in is_goods_type_in_range() Open Date: 2021-09-29 02:17 Last Update: 2021-10-07 07:32 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/42944 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=42944 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2021-10-07 07:32 Updated by: cazfi * Milestone Update from (None) to 3.0.0 * Component Update from (None) to General Comment: 1) req_from_str() accepts both "City" and "Traderoute" ranges for "Good" requirement when the ruleset is loaded 2) is_goods_type_in_range() does not have implementation for Traderoute range, giving the assert seen in this ticket instead 3) doc/README.effects list only "City" as a supported range. In S3_0 (d3f) I would say that the correct behavior is what the documentation (README.effects) says -> fix req_from_str() In later branches we could look in to supporting Traderoute range -> change is_goods_type_in_range() and documentation --------------------------------------------------------------------- Ticket Status: Reporter: ddeanbrown Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: 3.0.0 Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: 3.0.0-beta2 Playing with my custom ruleset, got this error msg at runtime (ruleset loaded OK) - Please report this message at https://osdn.net/projects/freeciv/ticket/ in is_goods_type_in_range() [../../freeciv-3.0.0/common/requirements.c::1792]: assertion 'FALSE' failed. Invalid range 4. Cause is this effect in my effects.ruleset - ; Make minimum trade from a traderoute >= 1; change down-round to up-round by ; adding 1 to city center. [effect_traderoute_minimum0\] type = "Output_Add_Tile" value = 1 reqs = { "type", "name", "range" "Good", "Goods", "Traderoute" "CityTile", "Center", "Local" "OutputType", "Trade", "Local" } This line looks like the trigger. I think it should be OK, according to the wiki page https://freeciv.fandom.com/wiki/Requirements - "Good", "Goods", "Traderoute" game.ruleset has - [goods_0\] name=_("Goods") from_pct=0 to_pct=0 onetime_pct=0 -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/42944 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=42944