Re: issue saving a game

2021-06-14 Thread Antonio Ceballos
Glad to hear that!

Antonio


On Sun, Jun 13, 2021 at 6:57 PM victorhck  wrote:

> El 23/10/20 a las 20:16, Antonio Ceballos escribió:
> > I could not reproduce the bug on Ubuntu 16.04, but I could on Debian
> 10.6.
> >
> > I have verified Simon's patch and I think it is fine and fixes the bug.
> >
> > Therefore, I have uploaded the change to the subversion repository in
> > Savannah. It will be included in the next release, 6.2.8, which may still
> > take a few weeks.
> >
> > Antonio
> >
>
> Hello!
> Bug seems to be fixed and everything works as expected!!
>
> Thanks a lot for your work!!
>
> Greetings!
>
>
> --
> ---
> GPG Key: 0xcc742e8dc9b7e22a
> Fingerprint = 6FE2 3B1F AAC8 E5B7 63EA 88A9 CC74 2E8D C9B7 E22A
>
> Aprende a proteger la privacidad de tu correo:
> https://emailselfdefense.fsf.org/es/
>
> Mi blog sobre openSUSE, GNU/Linux y software libre:
> https://victorhckinthefreeworld.com/
>
> Herramientas para proteger tu privacidad
> https://victorhck.gitlab.io/privacytools-es/
>
>


Re: issue saving a game

2021-06-13 Thread victorhck
El 23/10/20 a las 20:16, Antonio Ceballos escribió:
> I could not reproduce the bug on Ubuntu 16.04, but I could on Debian 10.6.
> 
> I have verified Simon's patch and I think it is fine and fixes the bug.
> 
> Therefore, I have uploaded the change to the subversion repository in
> Savannah. It will be included in the next release, 6.2.8, which may still
> take a few weeks.
> 
> Antonio
> 

Hello!
Bug seems to be fixed and everything works as expected!!

Thanks a lot for your work!!

Greetings!


-- 
---
GPG Key: 0xcc742e8dc9b7e22a
Fingerprint = 6FE2 3B1F AAC8 E5B7 63EA 88A9 CC74 2E8D C9B7 E22A

Aprende a proteger la privacidad de tu correo:
https://emailselfdefense.fsf.org/es/

Mi blog sobre openSUSE, GNU/Linux y software libre:
https://victorhckinthefreeworld.com/

Herramientas para proteger tu privacidad
https://victorhck.gitlab.io/privacytools-es/




Re: issue saving a game

2020-10-23 Thread victorhck
El 23/10/20 a las 20:16, Antonio Ceballos escribió:
> I could not reproduce the bug on Ubuntu 16.04, but I could on Debian 10.6.
> 
> I have verified Simon's patch and I think it is fine and fixes the bug.
> 
> Therefore, I have uploaded the change to the subversion repository in
> Savannah. It will be included in the next release, 6.2.8, which may still
> take a few weeks.
> 
> Antonio
> 

Hey! thanks a lot!! :)
I was written an article for my blog when I found that bug. Happy to see
that a fix is on the way!
I will publish my article as soon as I get the fix in my openSUSE
Tumbleweed system!!

Thanks a lot for your support to free software!

Happy hacking!


-- 
---
GPG Key: 0xcc742e8dc9b7e22a
Fingerprint = 6FE2 3B1F AAC8 E5B7 63EA 88A9 CC74 2E8D C9B7 E22A

Aprende a proteger la privacidad de tu correo:
https://emailselfdefense.fsf.org/es/

Mi blog sobre openSUSE, GNU/Linux y software libre:
https://victorhckinthefreeworld.com/

Herramientas para proteger tu privacidad
https://victorhck.gitlab.io/privacytools-es/



OpenPGP_0xCC742E8DC9B7E22A.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: issue saving a game

2020-10-23 Thread Antonio Ceballos
I could not reproduce the bug on Ubuntu 16.04, but I could on Debian 10.6.

I have verified Simon's patch and I think it is fine and fixes the bug.

Therefore, I have uploaded the change to the subversion repository in
Savannah. It will be included in the next release, 6.2.8, which may still
take a few weeks.

Antonio


On Sat, Oct 10, 2020 at 10:12 AM  wrote:

> This seems to be FORTIFY_SOURCE compiler flag. Debian sets level 2, but
> just level 1 triggers it.
>
> The code uses sprintf to concatenate strings which is "undefined"
> behaviour, the offending code is flagged by enabling all compiler warnings
> when building pgn.cc
>
> This explains why it wasn't caught in development. I've sent patch to
> Antonio which fixes it, but he should probably be skeptical as I've not
> done C/C++ for years, and haven't fixed related warning elsewhere. If we
> are using C++ we should probably consider using C++ output features, and
> definitely enabling all warnings and including FORTIFY_SOURCE level 2 as
> this is how the distros roll.
>


Re: issue saving a game

2020-10-10 Thread simon
This seems to be FORTIFY_SOURCE compiler flag. Debian sets level 2, but just level 1 triggers it.The code uses sprintf to concatenate strings which is "undefined" behaviour, the offending code is flagged by enabling all compiler warnings when building pgn.ccThis explains why it wasn't caught in development. I've sent patch to Antonio which fixes it, but he should probably be skeptical as I've not done C/C++ for years, and haven't fixed related warning elsewhere. If we are using C++ we should probably consider using C++ output features, and definitely enabling all warnings and including FORTIFY_SOURCE level 2 as this is how the distros roll.

Re: issue saving a game

2020-10-08 Thread Antonio Ceballos
Thanks for your answer. We will try to track it down.

Antonio


On Wed, Oct 7, 2020 at 5:52 PM victorhck  wrote:

> El 7/10/20 a las 0:27, Antonio Ceballos escribió:
> > Hello,
> >
> > I have been unable to reproduce the problem on version 6.2.7.
> >
> > I don't understand where the two-line date heading of your ARCHIVO
> > comes from, as pgnsave does not write anything before [Event ""]. Do
> > you have any clue? By the way, had you invoked pgnload beforehands?
> >
> > As Simon said, PGNSaveToFile is suspicious of doing something wrong.
> > I am changing a little bit the way the y/n user input is processed in
> case
> > a
> > file overwrite is detected, but this is unlikely to be related to your
> > problem.
> > Anyway, did it occur in such a situation, or the file just didn't exist
> > prior to
> > your call to pgnsave?
> >
> > Regards,
> > Antonio
> >
>
> sorry, that lines are not included in the file. I just copy/pasted the
> command and the output the file begins in the [Event ""] line.
>
> I just started the game invoking gnuchess in the command line, did some
> random moves. Run show game command and the moves are showed. Then run
> pgnsave command and then I get that issue in the file, only saved the
> last move, not the whole game...
>
> I saved the file in a complete new file.
>
> BTW running gnuchess 6.2.7 in openSUSE Tumbleweed GNU/Linux system
>
> kind regards.
>
>
> --
> ---
> GPG Key: 0xcc742e8dc9b7e22a
> Fingerprint = 6FE2 3B1F AAC8 E5B7 63EA 88A9 CC74 2E8D C9B7 E22A
>
> Aprende a proteger la privacidad de tu correo:
> https://emailselfdefense.fsf.org/es/
>
> Mi blog sobre openSUSE, GNU/Linux y software libre:
> https://victorhckinthefreeworld.com/
>
> Herramientas para proteger tu privacidad
> https://victorhck.gitlab.io/privacytools-es/
>
>
>


Re: issue saving a game

2020-10-07 Thread victorhck
El 7/10/20 a las 0:27, Antonio Ceballos escribió:
> Hello,
> 
> I have been unable to reproduce the problem on version 6.2.7.
> 
> I don't understand where the two-line date heading of your ARCHIVO
> comes from, as pgnsave does not write anything before [Event ""]. Do
> you have any clue? By the way, had you invoked pgnload beforehands?
> 
> As Simon said, PGNSaveToFile is suspicious of doing something wrong.
> I am changing a little bit the way the y/n user input is processed in case
> a
> file overwrite is detected, but this is unlikely to be related to your
> problem.
> Anyway, did it occur in such a situation, or the file just didn't exist
> prior to
> your call to pgnsave?
> 
> Regards,
> Antonio
> 

sorry, that lines are not included in the file. I just copy/pasted the
command and the output the file begins in the [Event ""] line.

I just started the game invoking gnuchess in the command line, did some
random moves. Run show game command and the moves are showed. Then run
pgnsave command and then I get that issue in the file, only saved the
last move, not the whole game...

I saved the file in a complete new file.

BTW running gnuchess 6.2.7 in openSUSE Tumbleweed GNU/Linux system

kind regards.


-- 
---
GPG Key: 0xcc742e8dc9b7e22a
Fingerprint = 6FE2 3B1F AAC8 E5B7 63EA 88A9 CC74 2E8D C9B7 E22A

Aprende a proteger la privacidad de tu correo:
https://emailselfdefense.fsf.org/es/

Mi blog sobre openSUSE, GNU/Linux y software libre:
https://victorhckinthefreeworld.com/

Herramientas para proteger tu privacidad
https://victorhck.gitlab.io/privacytools-es/




Re: issue saving a game

2020-10-07 Thread Simon Waters
I can always reproduce in Debian packaged 6.2.5, but not in 6.2.7 from source.

I'll check the build options if I get more time. or probably just build 6.2.7 
using the Debian source package, so it is built with the same options, unless 
Antonio thinks there is relevant changes.





Re: issue saving a game

2020-10-06 Thread Antonio Ceballos
Hello,

I have been unable to reproduce the problem on version 6.2.7.

I don't understand where the two-line date heading of your ARCHIVO
comes from, as pgnsave does not write anything before [Event ""]. Do
you have any clue? By the way, had you invoked pgnload beforehands?

As Simon said, PGNSaveToFile is suspicious of doing something wrong.
I am changing a little bit the way the y/n user input is processed in case
a
file overwrite is detected, but this is unlikely to be related to your
problem.
Anyway, did it occur in such a situation, or the file just didn't exist
prior to
your call to pgnsave?

Regards,
Antonio


On Wed, Sep 30, 2020 at 6:22 PM victorhck  wrote:

> Hello.
>
> Don't know if it's a bug or maybe I'm doing something wrong when I save
> a game.
>
> I run gnuchess and doing some moves. If I run show game, I can see the
> moves. But if I run pgnsave that only saves the last move, so after I
> can't load.
>
> running show game after some moves:
>
> @Blancas (4) : show game
>   White   Black
>   1.  d3  Nc6
>   2.  e4  Nf6
>   3.  a4  e5
>
> Then I save the game in a file, and if I run a cat to that file this is
> what I get:
>
> $> cat ARCHIVO
>   mié 30 sep
> 2020 18:06:27
> [Event ""]
> [Site ""]
> [Date "2020.09.30"]
> [Round ""]
> [White ""]
> [Black "GNU Chess 6.2.7"]
> [WhiteELO "0"]
> [BlackELO "0"]
> [Result ""]
>
> e5
>
>
> nothing more!
> I miss something? Running openSUSE Tumbleweed and I've installed
> gnuchess from repositories.
>
> Thanks for your work! Greetings
>
>
> PS: Maybe would be a good idea to change "pgnsave" and "pgnload" to
> "save" and "load" :)
>
> --
> ---
> GPG Key: 0xcc742e8dc9b7e22a
> Fingerprint = 6FE2 3B1F AAC8 E5B7 63EA 88A9 CC74 2E8D C9B7 E22A
>
> Aprende a proteger la privacidad de tu correo:
> https://emailselfdefense.fsf.org/es/
>
> Mi blog sobre openSUSE, GNU/Linux y software libre:
> https://victorhckinthefreeworld.com/
>
> Herramientas para proteger tu privacidad
> https://victorhck.gitlab.io/privacytools-es/
>
>
>


Re: issue saving a game

2020-09-30 Thread Simon Waters
On Wednesday, 30 September 2020 17:14:27 BST victorhck wrote:
> Hello.
> 
> Don't know if it's a bug or maybe I'm doing something wrong when I save
> a game.

Thanks for the report, looks like a straight bug to me. Quick look I think the 
PGNSaveToFile does some weird things if comments exist that doesn't look right 
to me, suspect they are being initialised differently or similar to trigger 
this bug.

> PS: Maybe would be a good idea to change "pgnsave" and "pgnload" to
> "save" and "load" :)

"Save" and "load" are already used for positions. I fear very few people use 
the text interface, most use UCI or XBoard interfaces.