PGN from chess.com crash Stockfish for android

Sort:
sotimely

Probably because some parameters are not right? Can we look into this?

Martin_Stahl

Yeah, there is something weird with the PGN export from v3 for sure. It works fine in my DB app but one other app I have used won't import them. 

dorhinj

It's a problem with the Stockfish app, not chess.com's PGNs

erik42085

Mine works fine

sotimely

No other PGNs give problems.

Martin_Stahl

I will say that if I import the PGN file from v3 to my DB program, then export, the app that had problems can import those fine. 

 

EscherehcsE
sotimely wrote:

Probably because some parameters are not right? Can we look into this?

Out of idle curiosity, could you post an example PGN that causes the problem?

sotimely
Martin_Stahl wrote:

I will say that if I import the PGN file from v3 to my DB program, then export, the app that had problems can import those fine. 

 

Probably your DB program is fixing it. DL a file from chess.com directly to your phone and open it with Stockfish (Android), no problems?

EscherehcsE

I looked at a V3 PGN export and noticed four items that don't comply with the PGN spec. Possibly one or more of those four items is crashing your Stockfish for Android.

 

1) The TimeControl tag is a nonstandard format.

2) The Termination tag is a nonstandard format.

3) There are no spaces between the period after each move number and the following move. (For example, 1.c4 Nf6 should be 1. c4 Nf6).

4) The PGN lines are longer than 80 characters.

 

Arena is able to fix all four of these items if you import then export the PGN in Arena, but maybe Stockfish for Android can't.

Martin_Stahl

I haven't compared the two PGN files, the one from v3 chess.com and the export of that file from my DB program.

That said, the Time Control tag doesn't change during the export from my DB program and works fine on import in the other program I'm using. Not sure if that impacts DroidFish or not. So, it is probably one of the other reasons causing the crash or failure.

Martin_Stahl
sotimely wrote:
Martin_Stahl wrote:

I will say that if I import the PGN file from v3 to my DB program, then export, the app that had problems can import those fine. 

 

Probably your DB program is fixing it. DL a file from chess.com directly to your phone and open it with Stockfish (Android), no problems?

 

Yeah, I'm aware it is fixing the problems, whatever they are. I just thought I would mentioned that the files are able to be imported fine into a different program, one that is apparently a little more forgiving of PGN files with issues.

I tried importing into DroidFish and it doesn't crash the program but it can not see the games in the file.

sotimely

I'm not really asking for help. If chess.com cares about their PGNs giving a bad impression, or they don't, that's their business.

EscherehcsE
sotimely wrote:

I'm not really asking for help. If chess.com cares about their PGNs giving a bad impression, or they don't, that's their business.

Oh, in that case, please don't read Post #9, and everything will be forgiven. Wink

sotimely
EscherehcsE wrote:
sotimely wrote:

I'm not really asking for help. If chess.com cares about their PGNs giving a bad impression, or they don't, that's their business.

Oh, in that case, please don't read Post #9, and everything will be forgiven.

I appreciated your post anyways. It was good, interesting work. This info could be useful to chess.com, the Stockfish for Android people, maybe even others who write code involving pgns.

Martin_Stahl

I reported the export as a bug for v3 and linked to this forum as an example.

chrka

Thanks for the info!

And like someone said above, you might want to report this to the creators of the apps as well. The export format for PGN is rather strict, but the import format allows for quite a bit of variation.

chrka

Just letting you know I believe I've figured out what the issue with DroidFish was. My first instinct was that there was a missing newline between the games, but when I tried it out with smaller PGNs DroidFish read it fine with or without newlines. However, for larger files it wouldn't read them without the newlines!

I've passed it on and it should get fixed soon.

(Strictly speaking you don't need any newlines for PGN import format, IIRC, but they make it much easier to manipulate PGNs without having to use a full-blown parser.)

Martin_Stahl

Cool. v2 exports work fine in the program I was having problems with on v3. So it would appear that has a cleaner format.

Though, the program's parser (on import) isn't the best either (not talking about DroidFish) 

Martin_Stahl

Tried a v3 export yesterday and the program that was having issues imported fine. Looks like the PGN export format had some changes.

Martin_Stahl

Did run into a minor wrinkle. The export doesn't include a newline after the final game.  I attempted to concatenate a few exports into one file,  and the last game from one is connected to the first game of the other. 

No a huge deal, especially as that work flow probably isn't very common, but thought I would mention it.