bugFreeciv - Bugs: bug #21703, penalty applied when change...

 
 
Show feedback again

bug #21703: penalty applied when change between city improvements

Submitted by:  None
Submitted on:  Fri 21 Feb 2014 04:57:18 PM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOriginator Email: -unavailable-
Open/Closed: OpenRelease: 2.4.2
Operating System: GNU/LinuxPlanned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Sun 23 Feb 2014 06:52:02 PM UTC, comment #12:

Got additional information for it. The penalty is only applied after finishing a wonder in the city. Whenever I change the production for the first post-wonder city improvement to some other improvement, the penalty is applied. Like finishing Pyramids, starting to build Library, changing Library to Temple - penalty. If I do it later on in the same city (finish Pyramids, finish Library, start building Temple, change Temple to Marketplace - no penalty).

So it seems that at the time the wonder has finished and the next build starts, something is not reset. Or, as you pointed out, on the network communication to/from the server when running on ARM, something is misinterpreted/lost.

Anonymous
Sun 23 Feb 2014 06:24:43 PM UTC, comment #11:

My random guess is it'll not turn out to be an FPU issue (I don't think there's any floating point arithmetic nearby), but us naughtily trying to stuff an int in an enum-shaped hole, or something like that.

Jacob Nevins <jtn>
Project Administrator
Sun 23 Feb 2014 04:29:02 PM UTC, comment #10:

neon is for floating point

Starting program: /usr/local/bin/freeciv-server
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0xb6178820 in _armv7_neon_probe () from /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0
(gdb) bt
#0 0xb6178820 in _armv7_neon_probe () from /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0
#1 0xb6175008 in OPENSSL_cpuid_setup () at armcap.c:69
#2 0xb6fe9124 in ?? () from /lib/ld-linux.so.3
#3 0xb6fff000 in ?? () from /lib/ld-linux.so.3
Cannot access memory at address 0x0
#4 0xb6fff000 in ?? () from /lib/ld-linux.so.3
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Christian Knoke <chrisk>
Project Member
Sun 23 Feb 2014 04:17:28 PM UTC, comment #9:

chris@sheva:~/freeciv/play$ gdb freeciv-server
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.

This GDB was configured as "arm-linux-gnueabi".

Reading symbols from /usr/local/bin/freeciv-server...done.
(gdb) run
Starting program: /usr/local/bin/freeciv-server
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0xb6178820 in ?? () from /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0
(gdb)
(gdb) bt
#0 0xb6178820 in ?? () from /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0
Cannot access memory at address 0x0
#1 0xb6175008 in OPENSSL_cpuid_setup () from /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0
#2 0xb6fe9124 in ?? () from /lib/ld-linux.so.3
#3 0xb6fff000 in ?? () from /lib/ld-linux.so.3
Cannot access memory at address 0x0
#4 0xb6fff000 in ?? () from /lib/ld-linux.so.3
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Only 1 hint there is a problem with libssl1.0.0:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623085

There are problems with fpu and emulation in Debian ARM, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623085

Has this effect on Freeciv? There are two flavours of Debian ARM.
armel and armhf. I have armel. Does Freeciv run on both?

sheeva has no fpu

Linux sheva 3.2.0-4-kirkwood #1 Debian 3.2.54-2 armv5tel GNU/Linux

Has this to do with threads?

Christian Knoke <chrisk>
Project Member
Sun 23 Feb 2014 03:18:36 PM UTC, comment #8:

> > Even if I change it back to Library, I won't get 22 stones
> > back.


> I'm wondering if loading the "changed_from" target from a savefile (or maybe sending it over the network?) is going wrong, possibly in a platform-dependent way.
> I think this would explain all symptoms: if it thinks the production at the start of the turn was something other than a building, changing from Library to Temple will make it notice, and changing back to Library will not help.


OK. I changed to Palace, since no wonder is available (Palace counts as wonder in this respect?) and the penalty goes away, stones are stored back. The production of other cities behave "normal". Meaning? The player might very well have built wonders (say Colossus) before he switched to libraries. He built a lot of them. So, the server switched from colossus to library but didn't apply the penalty. But you say, it didn't switch, it only thinks it has (from wonder class) and keeps (?) the penalty if you change further on (sending the reduced shields to the client now), right?

Savegame doesn't support this. The (only) 4 cities affected have all built libraries before. 3 cities (not affected) have switched from wonder to barracks. Switching them to Palace give them no stones back. But then, city production is higher then shields, so they wouldn't have suffered from a penalty. Is there a penalty, when switching from a wonder witch is no longer available?

Christian Knoke <chrisk>
Project Member
Sun 23 Feb 2014 01:11:31 PM UTC, comment #7:

OP:

> I've attached a saved file. Playing Saxionians. In 4 Cities I
> currently building a Library. If I change production in anyone
> of those cities into Temple, I am losing stones.

I still can't reproduce from this savegame with 2.4.2 (server running on x86_64 Ubuntu 12.04). All four cities (Johanngeorgenstadt, Zittau, Chemnitz, Wittenberg) are well behaved if I change production from Library to Temple and back, either from the city dialog or from the cities report (F4).

Christian:

> In the last weeks I have played all branches, and have noticed
> some kind of penalty when changing between city improvements
> (not wonders or untis) - but rare, not in all cases,
> irregurarly it seemed. But I wasn't focused on that. Before
> pondering further I'd like to ask, whether such penalty is
> implemented in any branch or ruleset of today. (I'm not
> the OP)

I don't recall any deliberate behaviour change in this area for a long time.
The relevant function, city_change_production_penalty(), hasn't changed at all for ages (back to at least 2.3.4).

> Can reproduce in Freeciv Version 2.4.2+ (r24482) on ARM.
> (Server)

Hm. So both you and the OP are on ARM, right? Interesting.

> Even if I change it back to Library, I won't get 22 stones
> back.

I'm wondering if loading the "changed_from" target from a savefile (or maybe sending it over the network?) is going wrong, possibly in a platform-dependent way.
I think this would explain all symptoms: if it thinks the production at the start of the turn was something other than a building, changing from Library to Temple will make it notice, and changing back to Library will not help.

Jacob Nevins <jtn>
Project Administrator
Sun 23 Feb 2014 11:16:13 AM UTC, comment #6:

Can reproduce in Freeciv Version 2.4.2+ (r24482) on ARM. (Server)

Client on i386.

Options to autogen.sh were (most probably):
--enable-svnrev
--enable-client=gtk2
--enable-fcmp=yes
--with-readline
--with-efence
--enable-fcdb=all
--enable-ipv6=yes
--with-xawrd
--enable-mapimg=magickwand

Client caps: +Freeciv-2.4-network rules_finished trademindist_size actcount_range wonder_city_id bulbs_size
Server caps: +Freeciv-2.4-network rules_finished trademindist_size actcount_range wonder_city_id bulbs_size

--debug 3 log attached.

Christian

(file #20149)

Christian Knoke <chrisk>
Project Member
Sun 23 Feb 2014 11:00:07 AM UTC, comment #5:

Cannot reproduce in Version 2.4.2+ (r24530).

> Even if I change it back to Library, I won't get 22 stones back.


Think this 2nd bug. Seen this too, But don't know where.

Christian

Christian Knoke <chrisk>
Project Member
Sun 23 Feb 2014 06:04:28 AM UTC, comment #4:

I've attached a saved file. Playing Saxionians. In 4 Cities I currently building a Library. If I change production in anyone of those cities into Temple, I am losing stones.

(file #20144)

Anonymous
Sun 23 Feb 2014 02:57:42 AM UTC, comment #3:

Running the self compiled server on raspberry pi. The client is Gtk2, installed on windows. The production change was from Library to Temple (stones going down from 22 to 11). Even if I change it back to Library, I won't get 22 stones back.
Changing from wonder to wonder does not cause penalties. Changing from unit to unit does not cause penalties.

Anonymous
Sat 22 Feb 2014 06:55:58 PM UTC, comment #2:

In the last weeks I have played all branches, and have noticed some kind of penalty when changing between city improvements (not wonders or untis) - but rare, not in all cases, irregurarly it seemed. But I wasn't focused on that. Before pondering further I'd like to ask, whether such penalty is implemented in any branch or ruleset of today. (I'm not the OP)

Thought this was a copy from civ2 which for good reasons had been deleted.

Christian

Anonymous
Sat 22 Feb 2014 12:04:36 PM UTC, comment #1:

Can't reproduce with 2.4.2.

Which specific two buildings are you changing between?
(Note that "small wonders" such as the Palace count as wonders for the purposes of this penalty.)

Jacob Nevins <jtn>
Project Administrator
Fri 21 Feb 2014 04:57:18 PM UTC, original submission:

When the to be built item in a city is changed, and the build category stays the same (unit/wonder/city improvement), there was no penalty applied in earlier versions. Whenever you changed to an item from a different category, a penalty was applied (e.g. reducing the already produced stones to half).

In 2.4.2 whenever I change from unit to unit, no penalty. When I change from unit to unit, no penalty. But when I change from city improvement to city improvement, a penalty is applied - stones are reduced to 1/2.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20149:  buglog.bz2 added by chrisk (10kB - application/x-bzip)
file #20144:  freeciv-T0070-Y-0750-auto.sav.gz added by None (114kB - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by chrisk (Posted a comment)
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by None (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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 23 Feb 2014 11:16:13 AM UTCchriskAttached File-=>Added buglog.bz2, #20149
    Sun 23 Feb 2014 06:04:28 AM UTCNoneAttached File-=>Added freeciv-T0070-Y-0750-auto.sav.gz, #20144
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup