Re: [Freeciv-Dev] (PR#40601) bad char in city name crashes GTK civclient 2.1.7 and 2.1.8

2008-12-17 Thread Brandon J. Van Every

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

On Wed, Dec 17, 2008 at 5:42 PM, Madeline Book  wrote:
>
> What I suspect is that when the string is placed into the
> entry box, gtk tries to convert it to an encoding other
> than utf-8, or chops off the last character resulting
> in the invalid utf-8.
>
> This could be proven if you turn off the "prompt for city
> name" option and build a city with the Perpinya settler.
> If the name is not garbled and the program does not
> crash then we would know it is a problem with the string
> being put into the entry, and hence a bug in the particular
> gtk libraries used by the freeciv exe on windows.

I turned off "prompt for city name."  When building the settler, the
game now simply crashes.  So, the string is being corrupted before it
is delivered to the dialog box.

> You could also try inputting other valid utf-8 (e.g. my
> sig) into the name suggestion box, the city rename popup,
> or just the chat input line to see what it does. On linux
> these all work fine, so they should too on windows.
>
> ---
> 私のためにいい家を見つけてください。

Your .sig is truncated for length, but it inputs just fine.



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


Re: [Freeciv-Dev] (PR#40601) bad char in city name crashes GTK civclient 2.1.7 and 2.1.8

2008-12-17 Thread Brandon J. Van Every

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

On Wed, Dec 17, 2008 at 4:28 PM, Jordi Negrevernis i Font
 wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=40601 >
>
>
>I must say that this only happens on Windows GTK2 client... not on
> gtk2 linux client...

So it's probably an #ifdef in a name generation string handler.  Ring
any bells anyone?



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


Re: [Freeciv-Dev] (PR#40601) bad char in city name crashes GTK civclient 2.1.7 and 2.1.8

2008-12-17 Thread Jordi Negrevernis i Font

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


I must say that this only happens on Windows GTK2 client... not on 
gtk2 linux client...



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


Re: [Freeciv-Dev] (PR#40601) bad char in city name crashes GTK civclient 2.1.7 and 2.1.8

2008-12-17 Thread Brandon J. Van Every

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

On Wed, Dec 17, 2008 at 1:33 PM, Brandon Van Every  wrote:
>
> 4) build the Settler.  The "What should we call our new city?"
> dialogue box appears.  It contains the garbled string "Perpiny[X]".

Additional weirdness: if you try to edit the "Perpiny[X]" string,
"Perpiny" is editable but the garbled "[X]" is not.  You cannot erase
it, the cursor will not move over it.  A workaround is to hit "Cancel"
and then take the next city name selection, in this case "La Seu
d'Urgell".



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


Re: [Freeciv-Dev] (PR#40601) bad char in city name crashes GTK civclient 2.1.7 and 2.1.8

2008-12-17 Thread Brandon J. Van Every

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

Forgot the attachment.



catalan-1400.sav.gz
Description: GNU Zip compressed data
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#40601) bad char in city name crashes GTK civclient 2.1.7 and 2.1.8

2008-12-17 Thread Brandon J. Van Every

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

On Wed, Dec 17, 2008 at 11:13 AM, Brandon Van Every  wrote:
> On Tue, Dec 16, 2008 at 11:32 PM, Madeline Book  
> wrote:
>>
>> By the way, do you play with the "prompt for city names"
>> local option enabled?
>
> No.

I spoke too quickly.  Yes, I do, as it is the default option.  I'm
just so habituated to hitting OK without even thinking about it, that
it's psychologically invisible to me.

On Tue, Dec 16, 2008 at 11:32 PM, Madeline Book  wrote:
>
> Finally, if you were to play as the Catalan nation using
> the sdl gui and build cities until you get "Perpinyà"
> suggested, would the name get garbled?

I played another game as Catalan and reproduced the error.
1) Load the attached game catalan-1400.sav.
2) play as Catalan
3) hit Turn Done, since the settler doesn't have any moves remaining
4) build the Settler.  The "What should we call our new city?"
dialogue box appears.  It contains the garbled string "Perpiny[X]".
5) Selecting OK will crash the game.

So, the name generator is somehow at fault, and it is specific to utf8
chars at the end of the string.

> Also, what happens when you play a nation like Brazillian
> or Turk? Do the utf8 characters in the start or middle of
> the city names get corrupted too?

Brazilian, in the middle, no problem.  Didn't try Turk or at the
beginning of the city name.

> How about if you edit the save game manually and put in
> the missing  (that's the character with value 0xa0,
> or 160 in decimal). What happens if you load the game
> now?

Didn't bother to try it.

> Or what if you just paste in "Perpinyà" into the city
> name suggestion popup or when renaming the city, what
> does that do (hopefully not just rejected by the
> server)?

No problem here.



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


Re: [Freeciv-Dev] (PR#40601) bad char in city name crashes GTK civclient 2.1.7 and 2.1.8

2008-12-17 Thread Brandon J. Van Every

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

On Tue, Dec 16, 2008 at 11:32 PM, Madeline Book  wrote:
>
> By the way, do you play with the "prompt for city names"
> local option enabled?

No.

> Also, what happens when you play a nation like Brazillian
> or Turk? Do the utf8 characters in the start or middle of
> the city names get corrupted too?

I will try these and other things you suggested and get back to you.



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


Re: [Freeciv-Dev] (PR#40601) bad char in city name crashes GTK civclient 2.1.7 and 2.1.8

2008-12-17 Thread Brandon J. Van Every

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

On Tue, Dec 16, 2008 at 8:25 PM, Madeline Book  wrote:
>
> So my best guess is that somehow the contents of the save file
> got munged into the present state (invalid utf8) outside of
> freeciv. Are you sure you did not open and re-save it in an
> editor or something like that?

I did not.  Any munging was accomplished by Freeciv.  Could be as
simple as a string pointer error somewhere, given that the bizarre
character is at the end of the string.

I don't know if it's related, but Freeciv GTK consistently fails on
Vista after the game has been going a long time.  The GUI windows
change colors and become illegible like they're being bitblitted
incorrectly, then civclient freezes.  For this reason I always play
with "set saveturns 1".  After such a failure, I can always load the
most recent autosaved game.  I haven't submitted the bug because I
don't have a deterministic reproducer for it.  I just know that it
will happen after several hours of play.  I guess my point is, Freeciv
can munge things.



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