[Freeciv-Dev] (PR#39328) Reproducible Crash When Changing Tech Goal (2.1.0-b4 and SVN Head)

2007-04-10 Thread Jason Short

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

I don't get it.  The args parameter is being modified inside the vsnprintf 
function?  I had always 
thought it was the other way around - va_start could only be called once per 
function but once 
called the vargs list was safe to be passed around as needed.

Can you come up with some definitive documentation on this?  What platform are 
you on 
anyways?

-jason


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


Re: [Freeciv-Dev] Fix for PR#39328 and Related Crash

2007-04-10 Thread Jason Dorje Short
Make sure all your replies get sent to the bug tracker.  We can give
you an account there (tell us what username you want) but it's hardly
needed if you use the email interface.

I'm out of town til next week so you'll have to get someone else to
commit any relevant patches.

-jason


On 4/9/07, Eric McDonald <[EMAIL PROTECTED]> wrote:
> Greetings,
>
>Yesterday I added a fix for PR#39328 to its ticket. I later found a
> related crash, which I have also fixed with the patch attached to this
> message. This patch incorporates the one attached to the ticket.
>
>Description of problem and fix are at:
> http://bugs.freeciv.org/Ticket/Display.html?id=39328
>
> Eric
>
> Index: server/plrhand.c
> ===
> --- server/plrhand.c(revision 12911)
> +++ server/plrhand.c(working copy)
> @@ -768,14 +768,14 @@
>  {
>va_list args;
>
> -  va_start(args, format);
>players_iterate(other_player) {
> +va_start(args, format);
>  if (!players_on_same_team(pplayer, other_player)) {
>continue;
>  }
>  vnotify_conn(other_player->connections, ptile, event, format, args);
> +va_end(args);
>} players_iterate_end;
> -  va_end(args);
>  }
>
>  /
> @@ -792,13 +792,13 @@
>struct player_research *research = get_player_research(pplayer);
>
>/* This function is structured just like notify_team. */
> -  va_start(args, format);
>players_iterate(other_player) {
> +va_start(args, format);
>  if (get_player_research(other_player) == research) {
>vnotify_conn(other_player->connections, NULL, event, format, args);
>  }
> +va_end(args);
>} players_iterate_end;
> -  va_end(args);
>  }
>
>  /**
>
> ___
> 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#39334) Assertion Failure During Tile Update (GTK Client; SVN Head)

2007-04-10 Thread Jason Short

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

Very likely related to 39330.  Whatever you are doing with treaties is unusual 
and is triggering 
some little-used code path that reveals bugs.

-jason


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


[Freeciv-Dev] (PR#39335) Re: Fix for PR#39330

2007-04-10 Thread Jason Short

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

On 4/10/07, Eric McDonald <[EMAIL PROTECTED]> wrote:
> Hi,
>
>Attached to this message is a patch to fix the issue reported in
> PR#39330. Basically, the problem seems to be that cities can see unknown
> terrain, and this is considered acceptable and normal. But, in at least
> one place in the code that possibility is overlooked. In a player's view
> of a tile, the terrain ptr may be NULL (indicating it is unknown).
> Attempts to reference a member, such as 'type', of such a NULL ptr
> obviously results in a segfault.

Good catch but the bug is deeper.  We do NEED to know the terrain type
here since the tile is being sent as TILE_KNOWN_FOGGED.  Can you find
a way to reproduce the problem and figure out why a "known" tile has
unknown terrain type?  That should not be possible.

P.S. Send future reports to the bug tracker.

-jason



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


Re: [Freeciv-Dev] (PR#39333) 2.0.9 White Bar Appears After Crash

2007-04-10 Thread Jason Short

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

On 4/10/07, Lauri Uotinen <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39333 >
>
> Hi!
>
> We continued our main game today. At one point of the game the game
> suddenly froze for Kimmo (2.0.9, gtk2-client, Windows). When he
> restarted the client, everything seemed to work normally. However, when
> the next turn changed, a strange white bar appeared in the center of the
> view and stuck there. It remained there until the turn changed when the
> City Dialog was open. You can see a screenshot illustrating the issue
> here: http://130.233.28.150/freeciv/white_bar.jpg (323 KB).

That is extremely strange!

First, any idea why the freeze happened in the first place?  Any way
you know to reproduce it?

Secondly, the 'white bar' error is odd.  When you scrolled he game,
did it stay in place in the window or did it scroll with the map?

-jason



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


Re: [Freeciv-Dev] (PR#39334) Assertion Failure During Tile Update (GTK Client; SVN Head)

2007-04-10 Thread Jason Short

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

On 4/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39334 >
>
> civclient: packhand.c:2051: handle_tile_info: Assertion
> `unit_list_size(ptile->units) == 0' failed.
>
> The client log reports the following culprit:
> 1: 0x24c6a30 729 Archers at (101,129) Vitaut
>
> Unfortunately, I don't have a stack trace, since I wasn't running the
> client in a debugger. Will do so from now on.
>
> Also, I was unable to reproduce the problem from the saved game.
> It happened around the time Gunpowder was researched (i.e., when
> Barracks I are obsoleted), which is suspicious, because that is when
> the 2.0.9 client usually crashes on me as well.
>
> Sorry if this is a duplicate report. My searches of the bug reports
> didn't turn up anything recent like it.

This indicates the  presence of a "ghost unit": the client believes a
unit is present incorrectly, and is never told of its removal which
triggers an assertion when the tile is fogged.

Such bugs crop up periodically in the development code (this assertion
is disabled for the 2.0 branch and should not be a problem there; it
will be disabled for 2.1 before release).  To track it down however
generally requires you to be able to reproduce it from a savegame.
Most such bugs happen because of unit/city exchange or through shared
vision or alliance changes.

-jason



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


[Freeciv-Dev] (PR#39333) 2.0.9 White Bar Appears After Crash

2007-04-10 Thread Lauri Uotinen

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

Hi!

We continued our main game today. At one point of the game the game 
suddenly froze for Kimmo (2.0.9, gtk2-client, Windows). When he 
restarted the client, everything seemed to work normally. However, when 
the next turn changed, a strange white bar appeared in the center of the 
view and stuck there. It remained there until the turn changed when the 
City Dialog was open. You can see a screenshot illustrating the issue 
here: http://130.233.28.150/freeciv/white_bar.jpg (323 KB).

Lauri Uotinen (relaying the bug report by Kimmo Tanskanen)



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


[Freeciv-Dev] Fix for PR#39330

2007-04-10 Thread Eric McDonald

Hi,

  Attached to this message is a patch to fix the issue reported in 
PR#39330. Basically, the problem seems to be that cities can see unknown 
terrain, and this is considered acceptable and normal. But, in at least 
one place in the code that possibility is overlooked. In a player's view 
of a tile, the terrain ptr may be NULL (indicating it is unknown). 
Attempts to reference a member, such as 'type', of such a NULL ptr 
obviously results in a segfault.


Eric
Index: server/maphand.c
===
--- server/maphand.c(revision 12911)
+++ server/maphand.c(working copy)
@@ -476,9 +476,9 @@
   struct player_tile *plrtile = map_get_player_tile(ptile, pplayer);
 
   info.known = TILE_KNOWN_FOGGED;
-  info.type = plrtile->terrain->index;
+  info.type = plrtile->terrain ? plrtile->terrain->index : -1;
   for (spe = 0; spe < S_LAST; spe++) {
-   info.special[spe] = BV_ISSET(plrtile->special, spe);
+info.special[spe] = BV_ISSET(plrtile->special, spe);
   }
   info.resource = plrtile->resource ? plrtile->resource->index : -1;
   info.continent = ptile->continent;
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39332) lt.po is broken! (S2_1)

2007-04-10 Thread Jason Short

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

On 4/10/07, Egor Vyscrebentsov <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39332 >
>
> Good daytime!
>
> branches/S2_1
> Revision: 12914
>
> `make dist` failed due to:
>
> lt.po:9412: number of format specifications in 'msgid' and 'msgstr' does
> not match
>
> Therefore snapshot building does not work...
>
> So I ask Andrius Stikonas to fix lt.po as soon as possible.
>
> PS. All po files are regenerated during `make dist` so line number may differ.
> Problem lines:
>
> #. TRANS: "Republic of the Polish"
> #: client/text.c:1095
> #, c-format
> msgid "%s of the %s"
> msgstr ".;"
>
> PPS. `msgfmt -c lt.po` shows all problems.

I don't have development access right now but when I see
errors/warnings like this I usually just mark the string as fuzzy and
move on.

-jason



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


[Freeciv-Dev] (PR#39332) lt.po is broken! (S2_1)

2007-04-10 Thread Egor Vyscrebentsov

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

Good daytime!

branches/S2_1
Revision: 12914

`make dist` failed due to:

lt.po:9412: number of format specifications in 'msgid' and 'msgstr' does
not match

Therefore snapshot building does not work...

So I ask Andrius Stikonas to fix lt.po as soon as possible.

PS. All po files are regenerated during `make dist` so line number may differ.
Problem lines:

#. TRANS: "Republic of the Polish"
#: client/text.c:1095
#, c-format
msgid "%s of the %s"
msgstr ".;"

PPS. `msgfmt -c lt.po` shows all problems.

-- 
Thanks, evyscr



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