bugFreeciv - Bugs: bug #20541, in auto_arrange_workers()...

Show feedback again

bug #20541: in auto_arrange_workers() [cityturn.c::397]: assertion 'city_size_get(pcity) - spe == sum' failed

Submitted by:  pepeto <pepeto>
Submitted on:  Wed Feb 20 14:51:59 2013  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Jacob Nevins <jtn>Open/Closed: Closed
Release: trunk r22403Operating System: Any
Planned Release: 2.5.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Tue Mar 26 01:51:21 2013, SVN revision 22598:

Fix calculation of unhappiness due to citizens of nation at war not to
exceed total number of citizens.

Reported by pepeto@gna.

See gna bug #20541.

(Browse SVN revision 22598)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat Mar 23 17:31:25 2013, comment #2:

The problem is that the nationality happiness calculation added in patch #3628 does not preserve the number of citizens in cases of extreme unhappiness.
On the turn after this savegame (file #17282), pirates take over Westminster; if you then look at its Happiness tab in the client, you can see that from Nationality onwards, there are more citizens shown than there really are in the city.
This can also been seen with Linz in file #17386 (immediately on load -- it has recently been taken over).

The accounting in citizen_happiness_nationality() seems incomplete. Attached patch copies the logic from citizen_happy_units(): "First make content => unhappy, then happy => unhappy, then happy => content."
It also has the same property of not creating angry citizens (notwithstanding the comment /* FIXME: Why not? - Per */).

Is that the behaviour we want for nationality?

(file #17524)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Fri Mar 8 08:10:41 2013, comment #1:

I'm not entirely sure, but it seems a bit that cma now (after patch #3620) gives results where some people are specialists of currently unavailable type.

Marko Lindqvist <cazfi>
Project Administrator
Wed Feb 20 14:51:59 2013, original submission:

Autogame with ruleset "experimental", lot of assertion failures like:

Attached previous turn savegame.

pepeto <pepeto>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #17524:  trunk-nationality-unhappiness-accounting.patch added by jtn (2kB - text/x-diff - trunk r22533)
file #17282:  freeciv-T0067-Y-0825-auto.sav.gz added by pepeto (65kB - application/x-gzip)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jtn (Updated the item)
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by pepeto (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Mar 26 01:51:43 2013jtnStatusReady For Test=>Fixed
      Operating SystemNone=>Any
    Sat Mar 23 17:31:25 2013jtnStatusNone=>Ready For Test
      Assigned toNone=>jtn
      Planned Release=>2.5.0
    Sat Mar 23 17:31:24 2013jtnAttached File-=>Added trunk-nationality-unhappiness-accounting.patch, #17524
    Wed Feb 20 14:51:59 2013pepetoAttached File-=>Added freeciv-T0067-Y-0825-auto.sav.gz, #17282
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup