[Freeciv-Dev] [bug #14889] The Slovenians have started building The Lighthouse(w) in 000156.

2009-12-08 Thread pepeto

Update of bug #14889 (project freeciv):

Category:None => client 


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14889] The Slovenians have started building The Lighthouse(w) in 000156.

2009-12-08 Thread pepeto

Update of bug #14889 (project freeciv):

  Status:  Ready For Test => Fixed  
 Assigned to:None => pepeto 
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14889] The Slovenians have started building The Lighthouse(w) in 000156.

2009-12-06 Thread pepeto

Follow-up Comment #3, bug #14889 (project freeciv):

I am very uncertain about this could be a cheat.  Anyway, there are also many
other places wonder city ids are known, and maybe it shouldn't be known.  What
do you think it would be the correct design?


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14889] The Slovenians have started building The Lighthouse(w) in 000156.

2009-12-05 Thread Jacob Nevins

Follow-up Comment #2, bug #14889 (project freeciv):

That fix looks like it ought to clear up the symptom.

> Unfortunately I failed to reproduce, but I attached a fix. Could you test
it?

Like I said, I couldn't reproduce it from the savegames either. I have seen
this three times in this session, though. I'll run with the patch applied,
but I doubt I'll ever be able to positively confirm a fix.

What do you think about the "information leak"? As a cheat, it's pretty
obscure; I'm mostly interested as it seems to suggest something's wrong with
the design somewhere.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14889] The Slovenians have started building The Lighthouse(w) in 000156.

2009-12-05 Thread pepeto

Update of bug #14889 (project freeciv):

  Status:None => Ready For Test 
 Planned Release:None => 2.2.0  

___

Follow-up Comment #1:

Very good analysis!  Unfortunately I failed to reproduce, but I attached a
fix.  Could you test it?

> if the client makes the link clickable, where's it going to go
> if the client's placeholder city doesn't include its location?

Nowhere.  It doesn't find it, that's all.  Maybe a message should be added.


(file #7452)
___

Additional Item Attachment:

File name: trunk_S2_2_city_link.diff  Size:0 KB


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14889] The Slovenians have started building The Lighthouse(w) in 000156.

2009-12-05 Thread Jacob Nevins

Additional Item Attachment, bug #14889 (project freeciv):

File name: weird-city-name-cropped.pngSize:700 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14889] The Slovenians have started building The Lighthouse(w) in 000156.

2009-12-05 Thread Jacob Nevins

URL:
  

 Summary: The Slovenians have started building The
Lighthouse(w) in 000156.
 Project: Freeciv
Submitted by: jtn
Submitted on: Saturday 05/12/09 at 22:56
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: None

___

Details:

A couple of times recently I've been greeted by wonders messages in the
Messages window like:

"The Slovenians have started building The Lighthouse(w) in 000156."

It looks like this is a city I don't yet know about.

I think this is an interaction between featured text and some client-side
placeholder city structure. I don't know what the right fix is.

The message comes from ai_city_choose_build(), which calls city_link() to add
featured text markup including the ID (156) and the name (looking at
savefiles, this will be "Nova Gorica").

I think the client interprets this through featured_text_to_plain_text(),
which calls text_tag_replace_text() on the link. That function tries to look
up the city name by ID in the client's notion of what cities it knows about,
and falls back to the name in the featured text ("Nova Gorica") if the city
is completely unknown.

However, it looks like the client invents placeholder cities with names of
the form %06u if it sees a tile worked by a city ID it doesn't know about. I
think this is where "000156" must have come from -- looking at the savename,
this city is close enough to land I've seen that I could plausibly have seen
a tile it works. The existence of this placeholder prevents the client
falling back to the server-supplied name, which would give a better result.

As I say, I don't know what the right fix is. The symptom could be made to go
away by having text_tag_replace_text() not attempt to look up the city -- the
server always provides the name in the featured text anyway. However, I guess
this might interact sub-optimally with renamed cities, and it feels like it's
papering over the problem -- if the client makes the link clickable, where's
it going to go if the client's placeholder city doesn't include its
location?

I think there's a theoretical (minor) information leak here -- city IDs leak
to the client through tile worked info, and the ID-to-name mapping leaks
through the wonder featured text; a clever client could put this information
together to get an approximate idea where the city with the wonder is (and
the player could focus their efforts there), which seems wrong -- from
hearing about a wonder, we should only discover the name of the city, I
think.

I suppose the server could censor featured text on a per-player basis just
before sending it, perhaps in send_packet_chat_msg().

This is with S2_2 r16461. Attached a screenshot, and the two savegames
bracketing the event. I haven't had any luck reproducing it from the
savegames, I think at least partly because the AI's behaviour wrt wonders
changes over save/load, bug #13557.



___

File Attachments:


---
Date: Saturday 05/12/09 at 22:56  Name: canadians-T103-Y60AD.sav.bz2  Size:
33kB   By: jtn
Numeric city name reports, S2_2 r16461

---
Date: Saturday 05/12/09 at 22:56  Name: canadians-T104-Y80AD.sav.bz2  Size:
33kB   By: jtn
Numeric city name reports, S2_2 r16461


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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