rikkoder / chess-cli

TUI Chess written in C using ncurses library.
1 stars 1 forks source link

Issue on displaying board on Ubuntu OS #1

Open nikhiljangra264 opened 4 months ago

nikhiljangra264 commented 4 months ago

Description: I have successfully run the chess-cli program on the terminal. The program provides options such as play vs human, play vs AI, and load. However, after selecting the play vs AI option and providing my name and other details, the program fails to display the board and doesn't accept any inputs. Similarly, the same issue persists when selecting play vs human. As a result, I had to forcefully close the program.

Details: Operating System: Ubuntu 22.04.4 LTS (Jammy Jellyfish) PRETTY_NAME: Ubuntu VERSION_ID: 22.04 VERSION: 22.04.4 LTS (Jammy Jellyfish) VERSION_CODENAME: jammy ID: ubuntu ID_LIKE: debian

Terminal: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) Copyright: © 2020 Free Software Foundation, Inc.

Issue Summary: After selecting play vs AI or play vs human options in the chess-cli program, the board is not displayed. The program fails to accept any inputs after selecting these options, leading to an unresponsive state. This issue persists across both play vs AI and play vs human modes.

rikkoder commented 4 months ago

I just tested it on an ubuntu based system, I couldn't reproduce the issue. Can you try deleting build files and recompiling by running make. Also can you tell me the ncurses libraries installed on your system. (apt list --installed *ncurses*)

nikhiljangra264 commented 4 months ago

The issue still persist after rebuilding the program. Here is the output of apt list --installed *ncurses*

Listing... Done libncurses-dev/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 amd64 [installed,automatic] libncurses5-dev/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 amd64 [installed] libncurses6/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 amd64 [installed,automatic] libncursesw5-dev/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 amd64 [installed] libncursesw6/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 amd64 [installed,automatic] ncurses-base/jammy-updates,jammy-updates,jammy-security,jammy-security,now 6.3-2ubuntu0.1 all [installed] ncurses-bin/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 amd64 [installed]

rikkoder commented 4 months ago

can you share a picture of the board ? is the window completely blank or only pieces are missing ? if only pieces are not showing you can try pressing 'a' which will change the pieces into ascii character (like 'N' for Knight)

nikhiljangra264 commented 4 months ago

I think the main issue is when you are clearing the display after start button. ( can you please mention the specific code that does this ) This is screencast of the program Screencast from 09-05-24 12:40:34 PM IST.webm

rikkoder commented 4 months ago

can you try the latest commit on your machine ? if you want to debug yourself ig what u want to look at is main_menu.c file, game_settings_menu func call is where the options are set and init_game func call starts the game. if still the prob exists can u tell me if u r able to open load menu ?

nikhiljangra264 commented 4 months ago

it's working but only if the terminal size above a specific size but resizing cause segmentation fault. Screenshot from 2024-05-13 14-25-06