[Freeciv-Dev] (PR#40666) 2_2 savegame glitch

2009-01-16 Thread Madeline Book

http://bugs.freeciv.org/Ticket/Display.html?id=40666 >

> [markmet...@yahoo.ca - Sat Jan 17 05:32:43 2009]:
> 
> 2_2, At revision 15422. Running under Fedora Core 9 on 32-bit Dell
> Optimax or Optima or some such name.
>
> The popup saying to report the bug wasn't amenable to the normal
> Xwindows copy/paste facility so I don't have it in my paste buffer.
> Something about '?' and ascii character 63.

Confirmed, the server aborts when loading the game:

2: Loading rulesets
0: Detected fatal error in savegame.c line 306:
0: Unknown ascii value for num: '?' 63
civserver: shared.c:772: real_die: Assertion `0' failed.

Attached is the full backtrace.


---
私のベッドに横たわっているこのものは何だ。
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Core was generated by `/home/book/src/freeciv/freeciv/git-svn/server/civserver'.
Program terminated with signal 6, Aborted.
#0  0xe410 in __kernel_vsyscall ()
#0  0xe410 in __kernel_vsyscall ()
No symbol table info available.
#1  0x401aee49 in raise () from /lib/tls/libc.so.6
No symbol table info available.
#2  0x401b0872 in abort () from /lib/tls/libc.so.6
No symbol table info available.
#3  0x401a8718 in __assert_fail () from /lib/tls/libc.so.6
No symbol table info available.
#4  0x08153eb6 in real_die (file=0x81ad2c6 "savegame.c", line=306, 
format=0x81b0360 "Unknown ascii value for num: '%c' %d") at shared.c:772
__PRETTY_FUNCTION__ = "real_die"
#5  0x080c67e0 in player_load_units (plr=0x82d7b6c, plrno=0, file=0xbf87f1b4, 
savefile_options=0x83e1de0 " attributes client_worklists diplchance_percent 
embassies improvement_order known32fix map_editor new_owner_map orders 
resources rulesetdir rulesets spacerace2 startoptions startunits 
technology_order"..., base_order=0x8bbc1b0) at savegame.c:306
order = (struct unit_order *) 0x83881d8
pbase = 
orders_buf = 0x85a523c "m"
dir_buf = 0x85a5270 "11141"
act_buf = 0x85a52ac "?"
base_buf = 0x85a52e4 "?"
len = 5
pcity = 
nat_y = 
type = 
pbase = 
punit = (struct unit *) 0x8388118
nat_x = 
type_name = 
base = 
nunits = 18
i = 3
j = 0
activity = 
#6  0x080cafb7 in game_load_internal (file=0xbf87f1b4) at savegame.c:4642
pplayer = 
MY_i = 
loaded_players = 0
i = 
k = 
rstate = {v = {110858037, 2888192473, 1139810201, 922988615, 
4268674650, 2842322444, 
1080591574, 116647236, 1566443572, 357263454, 491471216, 1648595539, 
3616012815, 
1960519608, 704667697, 1811311063, 180225025, 2000445886, 1599656126, 
2490614580, 
3396414574, 1728984743, 2859657269, 3512921241, 474990447, 2663290215, 
1158859838, 
1633866398, 635464404, 3849400742, 1654856301, 2945604131, 2151016655, 
2669993821, 
1771682283, 520853819, 3175951126, 3171690031, 2141565956, 2136977119, 
4228626736, 
3977012155, 2178530021, 3660295052, 158459624, 3901430931, 3327550106, 
1261799287, 
524691850, 1677292037, 2396604893, 18397818, 3382944109, 3759248431, 
3775909077, 
2928576877}, j = 4, k = 35, x = 3, is_init = true}
string = 
improvement_order_size = 79
technology_order_size = 182
civstyle = 
improvement_order = (char **) 0x83b4cb0
technology_order = (char **) 0x8412f58
special_order = (enum tile_special_type *) 0x83e1cf0
base_order = (struct base_type **) 0x8bbc1b0
savefile_options = 0x83e1de0 " attributes client_worklists 
diplchance_percent embassies improvement_order known32fix map_editor 
new_owner_map orders resources rulesetdir rulesets spacerace2 startoptions 
startunits technology_order"...
#7  0x080cdf35 in game_load (file=0xbf87f1b4) at savegame.c:4050
was_send_city_suppressed = false
was_send_tile_suppressed = false
#8  0x0805d975 in load_command (caller=0x0, filename=0xbf87f82c "bad", 
check=false)
at stdinhand.c:3454
testfile = 
"bad.sav.bz2\000\207¿èc\027\b\031\000\000\000±\221\...@èÑ\207¿3Ú\027\b\000\000\000\000è o\b\006\000\000\000\000\000&@\000\000\000\0004Ó\207¿\000Ò\207¿a\213\...@\001\000\000\000\003\000\000\000\000\000\000\000\200\a*@\000Ó\207¿üï)@8Ò\207¿mð\030\b\214Ô\207¿\b²o\bÈÒ\207¿e[\030\b\000\000\000\000tÓ\207¿´Ý\207¿a\213\...@\000\000\000\000\000\0009@ØÒ\207¿(£o\b\000\000\000\000\000\0...@hÒ\207¿(£o\bhÒ\207¿Üw\030\b\000\000\000\000\000\0...@\000\000\000\000\000\0009@\000\000\000\000\000\000&@\000\000\000\000ÄÓ"...
exts = {0x81977a5 "sav", 0x8198005 "gz", 0x819800c "bz2", 0x8198001 
"sav.gz", 
  0x8198008 "sav.bz2", 0x0}
ext = 
paths = {0x81cbc96 "", 0x8197ff7 "scenario/", 0x0}
path = 
found = 
loadtimer = (struct timer *) 0x83b4df8
uloadtimer = (struct timer *) 0x83b47a8
file = {filename = 0x82fb628 "./bad.sav.bz2", num_entries = 14815, 
  sections = 0x

[Freeciv-Dev] (PR#40666) 2_2 savegame glitch

2009-01-16 Thread Mark Metson

http://bugs.freeciv.org/Ticket/Display.html?id=40666 >

This transaction appears to have no content
2_2, At revision 15422. Running under Fedora Core 9 on 32-bit Dell Optimax or 
Optima or some such name.

The popup saying to report the bug wasn't amenable to the normal Xwindows 
copy/paste facility so I don't have it in my paste buffer. Something about '?' 
and ascii character 63.

(I posted it to forum last time it happened.. will go grab it from there; is 
the lack of copy/paste a deliberate feature or some stupid bug of the widgets 
system or what? Wesnoth has same stupid problem, cannot copy/paste its 
storyline text to report typos in storylines. But not being able to copy/paste 
bug/error reports that specifically ask you to report them seems particularly 
maladroit.)

Okay, found it in forum: "Unknown ascii value for num: '?' 63."

book said to submit a savefile here exhibiting the problem, so I have attached 
the example that I just got, a fresh new world created from scratch 16th Jan 
2009 using the SVN version mentioned above. I didn't hack the savefiles or 
anything, I even let it generate the saves automatically once I realised it was 
defaulting to one save per turn without my having to manually ask for a save 
each turn.

-MarkM-




  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/2_2, At revision 15422. Running under Fedora Core 9 on 32-bit Dell Optimax or Optima or some such name.The popup saying to report the bug wasn't amenable to the normal Xwindows copy/paste facility so I don't have it in my paste buffer. Something about '?' and ascii character 63.(I posted it to forum last time it happened.. will go grab it from there; is the lack of copy/paste a deliberate feature or some stupid bug of the widgets system or what? Wesnoth has same stupid problem, cannot copy/paste its storyline text to report typos in storylines. But not being able to copy/paste bug/error reports that specifically ask you to report them seems particularly maladroit.)Okay, found it in forum: "Unknown ascii value for num: '?' 63."book said to submit a savefile here exhibiting the problem, so I have attached the
 example that I just got, a fresh new world created from scratch 16th Jan 2009 using the SVN version mentioned above. I didn't hack the savefiles or anything, I even let it generate the saves automatically once I realised it was defaulting to one save per turn without my having to manually ask for a save each turn.-MarkM-
   

  









 

  Yahoo! 
Canada Toolbar : Search from anywhere on 
the web and bookmark your favourite sites. Download it now!  


civgame-0675.sav.bz2
Description: BZip2 compressed data
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#40663) island generator fails for size 2

2009-01-16 Thread Brendon Oram

http://bugs.freeciv.org/Ticket/Display.html?id=40663 >

It's been like that for as long as I can remember, the code that does
it checks the size x and size y of the map (if you go over ~80%
landmass it reverts too).
Think it was because it had trouble placing all the islands in such a
small space on a high land percentage.
When I removed the check a few months ago when I was trying to set up
a server it had no trouble with 35% landmass and size 2.

If you play topology 3 (wraps NS and EW) it makes islands on size 2.

IMO there should be 2 settings for size:
1. Number of starting tiles per player.
2. Number of extra land tiles per player.

(add the two together) X number of players X ocean percentage
multipler = total map tiles
Then figure out approximate map size in X and Y and generate.

That way you can have more control over the layout, tiny little
islands (< 6 cities) to start with with large landmasses in between to
fight over. Or no extra land mass besides what you start with.

On continent generator the starting tiles is the minimum the landmass
has to be to support 1 player, x2 for 2 players etc.

It would also scale easier for lots of players, right down to 2.

Hopefully someone will make some well balanced maps for duels & 3 or 4
players once the terrain editor is complete.
I'm sure they'll be annoyed that they're restricted to 1000, 2000,
3000 tiles when creating them though without hacking the source
code...

~Brendon
On Fri, Jan 16, 2009 at 8:03 PM, Brandon J. Van Every
 wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=40663 >
>
> In Freeciv 2.1.8 on Vista in single player mode, the island generator
> does not work with a map size of 2.  It simply switches to the fractal
> generator without warning.
> 1) start the civclient.exe
> 2) select Start New Game
> 3) type "/set generator 3".  (the island generator)
> 4) type "/set size 2"
> 5) select Start
> 6) type "/show generator".  It will read:
>  "/show: generator   2 (1,3)  Method used to generate map"
>  Visual inspection will also show that the island generator hasn't been used.
>
>
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#40665) [Patch] Document --announce at man pages

2009-01-16 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=40665 >

 $subject


 - ML

diff -Nurd -X.diff_ignore freeciv/doc/man/civclient.6 
freeciv/doc/man/civclient.6
--- freeciv/doc/man/civclient.6 2008-10-27 04:13:33.0 +0200
+++ freeciv/doc/man/civclient.6 2009-01-16 20:42:13.0 +0200
@@ -9,7 +9,7 @@
 .\"   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 .\"   GNU General Public License for more details.
 .\"
-.TH FREECIV 6 "April 16th 2008"
+.TH FREECIV 6 "January 16th 2009"
 .SH NAME
 civclient \- The client for the Freeciv game
 .SH SYNOPSIS
@@ -27,6 +27,10 @@
 [ \-S|\-\-Sound \fIfilename\fP ] \
 [ \-t|\-\-tiles \fIstring\fP ] \
 [ \-v|\-\-version ]
+
+IPv6 aware clients have additional parameter:
+.B [ \-A|\-\-announce \fIprotocol\fP ]
+
 .SH DESCRIPTION
 Freeciv is a free turn-based multiplayer strategy game, in which each player
 becomes the leader of a civilization, fighting to obtain the ultimate goal:
@@ -58,6 +62,16 @@
 hyphen and single letter) and a long form (double hyphen and a complete word);
 their effects are identical.
 .TP
+.BI "\-A, \-\-announce \fIprotocol\fP"
+Uses \fIprotocol\fP when searching game from LAN.
+Possible values for \fIprotocol\fP are:
+
+\fBIPv4\fP
+
+\fBIPv6\fP
+
+\fBnone\fP
+.TP
 .BI "\-a, \-\-autoconnect"
 Skips the connect dialog, automatically inserting the default values. This is
 quite convenient when all has been set up properly.
diff -Nurd -X.diff_ignore freeciv/doc/man/civserver.6 
freeciv/doc/man/civserver.6
--- freeciv/doc/man/civserver.6 2008-10-27 04:13:34.0 +0200
+++ freeciv/doc/man/civserver.6 2009-01-16 20:42:09.0 +0200
@@ -9,7 +9,7 @@
 .\"   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 .\"   GNU General Public License for more details.
 .\"
-.TH FREECIV 6 "April 16th 2008"
+.TH FREECIV 6 "January 16th 2009"
 .SH NAME
 civserver \- The server for the Freeciv game
 .SH SYNOPSIS
@@ -36,6 +36,9 @@
 [ \-G|\-\-Guests ] \
 [ \-N|\-\-Newusers ]
 
+IPv6 aware servers have additional parameter:
+.B [ \-A|\-\-announce \fIprotocol\fP ]
+
 .SH DESCRIPTION
 Freeciv is a free turn-based multiplayer strategy game, in which each player
 becomes the leader of a civilization, fighting to obtain the ultimate goal:
@@ -65,6 +68,17 @@
 options have a short form (single hyphen and single letter) and a long form
 (double hyphen and a complete word); their effects are identical.
 .TP
+.BI "\-A, \-\-announce \fIprotocol\fP"
+Uses \fIprotocol\fP when announcing game in LAN.
+Possible values for \fIprotocol\fP are:
+
+\fBIPv4\fP
+
+\fBIPv6\fP
+
+\fBnone\fP
+
+.TP
 .BI "\-a, \-\-auth"
 Enables server authentication and allows access to registered players only.
 .TP
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#40664) [Patch] Clear borders when base pillaged

2009-01-16 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=40664 >

 Borders are not always cleared when pillage is used against base.

 Fix attached.

 Applies on top of #40636.


 - ML

diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c
--- freeciv/server/unittools.c  2009-01-16 19:47:00.0 +0200
+++ freeciv/server/unittools.c  2009-01-16 19:44:49.0 +0200
@@ -641,6 +641,26 @@
 }
 
 /**
+  Pillages base from tile
+**/
+static void unit_pillage_base(struct tile *ptile, struct base_type *pbase)
+{
+  if (territory_claiming_base(pbase)) {
+/* Clearing borders will take care of the vision providing
+ * bases as well. */
+map_clear_border(ptile);
+  } else if (pbase->vision_sq >= 0) {
+/* Base provides vision, but no borders. */
+struct player *owner = tile_owner(ptile);
+if (owner) {
+  map_refog_circle(owner, ptile, pbase->vision_sq, -1,
+   game.info.vision_reveal_tiles, V_MAIN);
+}
+  }
+  tile_remove_base(ptile, pbase);
+}
+
+/**
   progress settlers in their current tasks, 
   and units that is pillaging.
   also move units that is on a goto.
@@ -729,20 +749,7 @@
 
if (what != S_LAST) {
   if (what == S_PILLAGE_BASE) {
-if (territory_claiming_base(first_base)) {
-  /* Clearing borders will take care of the vision providing
-   * bases as well. */
-  map_clear_border(ptile);
-  map_claim_ownership(ptile, NULL, NULL);
-} else if (first_base->vision_sq >= 0) {
-  /* Base provides vision, but no borders. */
-  struct player *owner = tile_owner(ptile);
-  if (owner) {
-map_refog_circle(owner, ptile, first_base->vision_sq, -1,
- game.info.vision_reveal_tiles, V_MAIN);
-  }
-}
-tile_remove_base(ptile, first_base);
+unit_pillage_base(ptile, first_base);
   } else {
 tile_clear_special(ptile, what);
   }
@@ -763,7 +770,7 @@
 base_type_iterate(pbase) {
   if (tile_has_base(ptile, pbase)) {
 /* Remove first base */
-tile_remove_base(ptile, pbase);
+unit_pillage_base(ptile, pbase);
 break; /* but only first */
   }
 } base_type_iterate_end;
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#40637) [Patch] Buoy

2009-01-16 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=40637 >

2009/1/7 Brandon J. Van Every:
> On Wed, Jan 7, 2009 at 2:15 PM, Marko Lindqvist wrote:
>>
>> 2009/1/7 Brandon J. Van Every:
>>> I mean, come on, what's a real sonar buoy for...
>>
>>  Got better name for this thing?
>
> You could call it "radar station," and turn blind eye to fact that
> it's sitting in the water.  Anybody asks it's "naval" radar station.
> ;-)  I mean come on, if sonar doesn't work to detect things
> underwater, then it is totally stupid.  Sonar is for water.  If you do
> radar stations, put them on land also.

 I just dropped "Sonar" from the name.

 At the moment we can't have anything like this on land tiles, since
gui has no way to select between more than two types of bases. For
land tiles those two types are "Fortress" and "Airbase".


 - ML

diff -Nurd -X.diff_ignore freeciv/data/default/terrain.ruleset 
freeciv/data/default/terrain.ruleset
--- freeciv/data/default/terrain.ruleset2009-01-16 19:20:49.0 
+0200
+++ freeciv/data/default/terrain.ruleset2009-01-16 19:21:10.0 
+0200
@@ -941,3 +941,19 @@
 build_time= 3
 native_to = "Air", "Helicopter", "Missile"
 flags = "NoStackDeath", "DiplomatDefense", "ParadropFrom"
+
+[base_buoy]
+name  = _("Buoy")
+graphic   = "base.buoy"
+graphic_alt   = "base.fortress"
+activity_gfx  = "unit.fortress"
+reqs  =
+{ "type", "name", "range"
+  "Tech", "Radio", "Player"
+  "TerrainClass", "Oceanic", "Local"
+  "UnitFlag", "Airbase", "Local"
+}
+gui_type  = "Fortress"
+build_time= 3
+border_sq = 0
+vision_sq = 5
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev