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

front-end says "No analysis available" even after receiving fully UCI-compliant, accurate analysis by the engine #500

Open
mags0ft opened this issue Jan 19, 2025 · 1 comment
Labels
type: bug Something isn't working

Comments

@mags0ft
Copy link

mags0ft commented Jan 19, 2025

Describe the bug

Hello there,

I am currently developing a chess engine and wanted to try En Croissant as a frontend. However, it seems to have problems reading the incoming UCI results by the engine, which can be read by other programs like lichess-bot perfectly fine. I don't know what I'm missing here, but I would believe this is an actual bug in the UCI implementation as my engine says all the important things to include:

GUI: uci
Engine: id name Chess Engine v0.0.1-cpp
Engine: id author mags0ft
Engine: uciok
GUI: isready
Engine: readyok
GUI: position fen r3k2r/pp1n1ppp/2p1pnb1/q3N3/1b1P1BP1/2N4P/PPPQBP2/2KR3R w kq - 5 14
GUI: go depth 3
Engine: info time 188 nodes 950 score -368 depth 3
Engine: info time 231 nodes 1166 score -337 depth 3
Engine: info time 272 nodes 1380 score -337 depth 3
Engine: info time 312 nodes 1598 score -337 depth 3
Engine: info time 467 nodes 2443 score -337 depth 3
Engine: info time 627 nodes 3304 score -337 depth 3

[... a lot more of the same lines (full log is attached!) ...]

Engine: info time 3971 nodes 21296 score -337 depth 3
Engine: info time 4214 nodes 22578 score -337 depth 3
Engine: info time 4455 nodes 23853 score -337 depth 3
Engine: info time 4603 nodes 24633 score -337 depth 3
Engine: info time 4737 nodes 25340 score -337 depth 3
Engine: info time 4872 nodes 26039 score -337 depth 3
Engine: info time 5087 nodes 27124 score -337 depth 3
Engine: info time 5087 nodes 27124 score -337 depth 3 pv d1e1
Engine: bestmove d1e1

The frontend seems to wait until the engine is done, then returns "No analysis available". I have already spent hours trying to debug this, I would appreciate any response on whether this is my fault or the UCI implementation/front-end are buggy.

Thanks in advance!

logs.csv

Reproduction

I have coded a minimal reproducible example that is attached right here as CPP source file (with TXT extension because GitHub didn't let me do otherwise) and as built x86 executable.

  1. add it to En Croissant
  2. go into analysis mode, pick a random FEN like "r3k2r/pp1n1ppp/2p1pnb1/q3N3/1b1P1BP1/2N4P/PPPQBP2/2KR3R w kq - 5 14" (from https://lichess.org/XEZzWu33/black#26)
  3. run the engine and wonder

Source code for a minimum reproducible example

Platform and versions

Ubuntu 22.04 LTS (Linux 6.8.0-51), En Croissant 0.11.1

Stack trace

There is no stacktrace due to any thrown exception available. Here is the full application log to stdout:

[2025-01-19][13:15:27][INFO][en_croissant] Setting up application
[2025-01-19][13:15:27][INFO][en_croissant] Checking for required directories
[2025-01-19][13:15:27][INFO][en_croissant] Checking for required files
[2025-01-19][13:15:30][INFO][webview] React app started successfully
[2025-01-19][13:15:31][INFO][en_croissant::opening] Initializing openings table...
@mags0ft mags0ft added the type: bug Something isn't working label Jan 19, 2025
@mags0ft
Copy link
Author

mags0ft commented Jan 19, 2025

(GitHub also does not let me add any executables, which... is a good thing I guess? So here you go with compilation and execution steps for the MRE)

$ g++ ~/Downloads/example.txt -o ./example && ./example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant