mcostalba / scoutfish

Chess Query Engine
GNU General Public License v3.0
156 stars 23 forks source link

Scoutfish crash on .pgn file containing variant games #23

Closed gbtami closed 7 years ago

gbtami commented 7 years ago

I'v tried to find something in my own (lichess) games .pgn downloaded before, but failed because it contained some crazyhouse games. It would be good to support chess variants played on fics/lichess. In theory this would be doable using lichess stockfish variant fork https://github.com/niklasf/Stockfish. If this need to much work maybe just ignore games containing "Variant" tag in .pgn headers. (Same issue stands for chess_db.)

mcostalba commented 7 years ago

Yes, you have a point. Variant are not supported and the parser should skip them.

mcostalba commented 7 years ago

Can you please post a pgn file with variants, so I can verify the fix

gbtami commented 7 years ago

Unfortunately lichess added variant tags to standard games also. Maybe they will fix this later if they will re enable .pgn download again. (now it's disabled) lichess_gbtami_2016-11-16.zip

mcostalba commented 7 years ago

@gbtami it should be fixed in chess_db now, can you please verify if it works for you?

gbtami commented 7 years ago

It segfaults for me on lichess .pgn attached above.

mcostalba commented 7 years ago

Indeed it was quite tricky to skip to next game in case of a variant is found, for instance we had null terminators '\0' inside teh file so that strstr() failed loudly!

Now chess_db it works for me, can you please confirm? After that I will backport to scoutfish

gbtami commented 7 years ago

Yes, it's Ok now. Thx!