Project

General

Profile

Actions

Bug #996

open

Illegal value -1 for tile relationship requirement.

Added by Marko Lindqvist about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
General
Target version:
Start date:
10/20/2024
Due date:
% Done:

0%

Estimated time:

Description

On turn change I got a lot of:
in is_tile_rel_req_active() [../../src/common/requirements.c::5094]: assertion 'FALSE' failed.
Illegal value -1 for tile relationship requirement.
Please report this message at https://redmine.freeciv.org/projects/freeciv

This is a custom ruleset (close to variant2). There's also some local code changes, but I find it unlikely (but not impossible) that those are at fault here.

I'll try to come up with reproducible case.

I already noticed that is_tile_rel_req_active() does, at least seemingly, some "breaks;" from the switch -case instead of returning in every case, meaning it might fall to this fc_assert(FALSE) after the switch. But that doesn't explain why requirement value is -1.

Actions #1

Updated by Marko Lindqvist about 1 month ago

I think the error is in the ruleset, but also in the ruleset loading code that let's invalid ruleset to pass. My ruleset has TileRel requirement with value "Same Class" whereas it should read "Same Terrain Class"

Actions

Also available in: Atom PDF