Maybe a little bug in Xboard 4.9.1

Discussion of chess software programming and technical issues.

Moderator: Ras

OliverBr
Posts: 846
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Maybe a little bug in Xboard 4.9.1

Post by OliverBr »

Hello together, hello @hgm, (How can I adress hgm in a forum post?)

I got a problem wit Xboard 4.9.1 (on Macosx) that I cannot load pgns, that have to many characters in one line.

E.g.: https://ccrl.live/pgns/The_Great_Kiwi_H ... el_2.0.pgn

I have to download and split them manually into a couple of lines.
If this a general issue, and if yes, maybe there could be a fix for it?

It would be very very kind! :)
Thank you.
OliThink GitHub: https://github.com/olithink
Nice arcticle about OlIThink: https://www.chessengeria.eu/post/olithink-oldie-goldie
Chess Engine OliThink Homepage: http://brausch.org/home/chess
User avatar
Roland Chastain
Posts: 684
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Maybe a little bug in Xboard 4.9.1

Post by Roland Chastain »

Hello Oliver.

I changed the value of PARSEBUFSIZE (in parser.c) to 20 000 (instead of 10 000), and after that I could load and replay your PGN until the end.
Qui trop embrasse mal étreint.

Author of Eschecs, a simple UCI chess GUI written in Pascal.
abulmo2
Posts: 476
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

Re: Maybe a little bug in Xboard 4.9.1

Post by abulmo2 »

OliverBr wrote: Sat Sep 20, 2025 10:15 pm Hello together, hello @hgm, (How can I adress hgm in a forum post?)

I got a problem wit Xboard 4.9.1 (on Macosx) that I cannot load pgns, that have to many characters in one line.

E.g.: https://ccrl.live/pgns/The_Great_Kiwi_H ... el_2.0.pgn

I have to download and split them manually into a couple of lines.
If this a general issue, and if yes, maybe there could be a fix for it?

It would be very very kind! :)
Thank you.
The bug is in the pgn. According to the pgn specification a line should not exceed 255 characters:

Code: Select all

4.3: Line lengths

PGN data are organized as simple text lines without any special bytes or markers for secondary record structure imposed by specific operating systems. Import format PGN text lines are limited to having a maximum of 255 characters per line including the newline character. Lines with 80 or more printing characters are strongly discouraged because of the difficulties experienced by common text editors with long lines.

In some cases, very long tag values will require 80 or more columns, but these are relatively rare. An example of this is the "FEN" tag pair; it may have a long tag value, but this particular tag pair is only used to represent a game that doesn't start from the usual initial position.
Richard Delorme