katrain icon indicating copy to clipboard operation
katrain copied to clipboard

Program freezes when playing any move on 1.17.1

Open nobu1308 opened this issue 6 months ago • 5 comments

I'm experiencing a bug that appears to be the same as issues #752 and #768, but I'm encountering it on version 1.17.1.

The root cause may be related to either Kivy (possibly https://github.com/kivy/kivy/issues/9023) or Python.

I found a couple of workarounds:

  • pip install kivy==2.3.0 with git cloned Katrain
  • Making the play_sound() function in katrain/gui/sound.py blank

KaTrain version: v1.17.1 Installation method: pipx install katrain Python version: 3.12.3 OS: Ubuntu 24.04

Thanks!

nobu1308 avatar Jun 21 '25 07:06 nobu1308

It's also the same as https://github.com/sanderland/katrain/issues/691

Edit: Okay after some more testing it seems kivy's bundled sdl2 libraries are also fixed on my distros python-kivy:2.3.1-1, so i just opted to using my system packages with below.

Steps:

sudo pacman -S python-kivy sdl2_ttf sdl2_image sdl2_mixer gstreamer

# venv
python3 -m venv --system-site-packages ~/katrain-env
source ~/katrain-env/bin/activate
pip install -U katrain
katrain

Installing with venv doesnt add the app to the path though, so i just made a tiny bash script and a desktop file for launching said script.

Katrain 1.17.1 Install methond: venv/pip Python: 3.13.5 OS: Manjaro Linux, KDE Plasma 6.4.1 (Wayland)

ojsl1 avatar Jun 27 '25 00:06 ojsl1

@ojsl1 's workaround unfortunately didn't work for me on Arch Linux, but I found a much easier one than patching out the play_sound() function--go to General & Engine settings and uncheck "Sound On". Seems to work fine obviously other than the lack of audio.

njfox avatar Jul 12 '25 00:07 njfox

For completeness sake this was the old method that fixed the sound and resizing for me (i just tested and it still does):

python -m venv katrain
source katrain/bin/activate
pip install --no-binary=kivy katrain
python -m katrain

ojsl1 avatar Oct 05 '25 03:10 ojsl1

@njfox Thank you for your easy solution. I can confirm that by going to General & Engine settings and uncheck "Sound On" solves the problem. Just don't forget to hit "Update Settings".

I also encountered this bug on my Linux Mint machine. I have a dual boot Windows 11 system on this same machine on another SSD drive, and the exe file works just fine. This bug seems Linux specific when I had to install katrain myself.

My Linux Mint katrain installation process uses standard virtual Python enviroment

#shell
python3 -m venv venv​
. venv/bin/activate​

#venv
pip3 install -U katrain
katrain

I was able to use the GUI, open SGF files, and make analysis using graphic card by using mouse scroll to cycle through moves. But as soon as I played any stone on the board, the app freezed.

KaTrain version: v1.17.1 Python version: 3.12.3 OS: Linux Mint 22.2 Cinnamon

kangyio avatar Oct 09 '25 08:10 kangyio

I can confirm the same behaviour on Fedora Linux - the app was seemingly working but was freezing when playing a stone. I experienced it back in June with 1.17 version.

I spent some time on it, trying to troubleshoot and fix it myself but at the end I gave up and just downgraded to v1.16, then it worked fine.

adrzystek avatar Oct 12 '25 22:10 adrzystek

Debian Bookworm or Trixie the same to yours. The Sound Off Method works.

HackYardo avatar Dec 14 '25 15:12 HackYardo