#46136: Failing "15 > pos->ref_count" assert Open Date: 2022-11-28 15:22 Last Update: 2022-12-01 05:04 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/46136 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46136 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-12-01 05:04 Updated by: cazfi Comment: One bug there is that pf_fuel_pos cost overflows. It should be 'signed int' like the node cost that gets assigned to it. That's something we missed in #46039. While the field has always been too narrow, it was a dormant bug until #46039 fix made it to trigger. As I encountered this in a ruleset with not-so-high granularity, it indicates that wider fields ( #46039 & co ) would actually be needed even for such rulesets (normal granularity, but with UTYF_COAST units) -> need to be backported to S3_0. Changing that field to 'unsigned int' makes the autogame to go through without that failed assert. Yet, I don't think that's the actual bug of interest in this ticket. Seems more likely that fixing that part causes the autogame to proceed differently, so that it never triggers the assert case. --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: (None) Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: I've got a pf_fuel_pos_ref() assert against too big ref count failing. This is with an AI caravan traveling with a UTYF_COAST boat, i.e., combination of amphibious (land unit + sea unit) path finding and fuel path finding. I'm not convinced that the assert is right. It seems to consider only the fact that one can enter the tile from 8 different directions (neighboring tiles) max. But won't also the refuel points count here? One can came from the same direction but with different refuel history. Of course the assert is right in that the 4 bit field can't hold bigger values than 15 -> maybe we need to make that wider. OTOH amphibious PF makes some move cost multiplication magic that fuel path finding may not be completely compatible with. -- 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/46136 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46136