Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashed for wrong debug log file #2365

Closed
nguyenpham opened this issue Oct 21, 2019 · 1 comment
Closed

Crashed for wrong debug log file #2365

nguyenpham opened this issue Oct 21, 2019 · 1 comment

Comments

@nguyenpham
Copy link
Contributor

nguyenpham commented Oct 21, 2019

Stockfish crashes immediately if users enter a wrong file name (or even an existing folder name) for debug log file. It may be hard for users to find out since it prints nothing. If they enter the string via a chess GUI, the chess GUI may remember and auto-send to Stockfish next time, makes Stockfish crashes all the time.

Tested with the latest Stockfish (211019, cloned from GitHub), 64 bit on a macOS.
Log:

$ ./stockfish 
Stockfish 211019 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
setoption name Debug Log File value /nofolder/a.txt
isready

(crashed)
vondele added a commit to vondele/Stockfish that referenced this issue Oct 21, 2019
like we do with the fenFile, check Log file on creation.

closes official-stockfish#2365

No functional change.
snicolet pushed a commit that referenced this issue Oct 21, 2019
Stockfish crashes immediately if users enter a wrong file name (or even an existing
folder name) for debug log file. It may be hard for users to find out since it prints
nothing. If they enter the string via a chess GUI, the chess GUI may remember and
auto-send to Stockfish next time, makes Stockfish crashes all the time. Bug report by
Nguyen Hong Pham in this issue: #2365

This patch avoids the crash and instead prefers to exit gracefully with a error
message on std:cerr, like we do with the fenFile for instance.

Closes #2366

No functional change.
@snicolet
Copy link
Member

@nguyenpham @vondele
Issue corrected via 215cd19, thanks for the bug report and the bug fix :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants