Page 4 of 6

Re: Chess for Android: UCI engine options

Posted: Mon Jun 17, 2019 3:29 pm
by flok
Hi Aart,

When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.

Re: Chess for Android: UCI engine options

Posted: Mon Jun 17, 2019 5:20 pm
by abik
retep1 wrote:
Mon Jun 17, 2019 2:51 pm
I can not load an opening-bin-book. I entered the following path (book-file):
/storage/emulated/0/DroidFish/book/Goi 6.bin
What am I doing wrong?
I need a lot more details than just this :-)

What engine? Does it have the UCI option for a book? What is "cannot load" mean precisely, what error message is given by the engine? Is the path correct? Is there really a space in the full path name? The emulated SD cards are sometimes a bit different. Did you try just /sdcard/.... to see if that works?

Re: Chess for Android: UCI engine options

Posted: Mon Jun 17, 2019 5:23 pm
by abik
flok wrote:
Mon Jun 17, 2019 3:29 pm
When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.
Yes, if the engine has a log-to-file option, you can simply set that. Make sure to write the log file to a path where you can access it later. The production version of Chess for Android by itself does not generate a UCI log file without engine support, that is only done in the debugging version.

Re: Chess for Android: UCI engine options

Posted: Mon Jun 17, 2019 7:17 pm
by retep1
abik wrote:
Mon Jun 17, 2019 5:20 pm
retep1 wrote:
Mon Jun 17, 2019 2:51 pm
I can not load an opening-bin-book. I entered the following path (book-file):
/storage/emulated/0/DroidFish/book/Goi 6.bin
What am I doing wrong?
I need a lot more details than just this :-)

What engine? Does it have the UCI option for a book? What is "cannot load" mean precisely, what error message is given by the engine? Is the path correct? Is there really a space in the full path name? The emulated SD cards are sometimes a bit different. Did you try just /sdcard/.... to see if that works?
The engine is Cfish 030619-arm7-pgo. After I have reset the options of the engine and re-entered the path, loading the opening book will work now. Thank you for your patience.

Re: Chess for Android: UCI engine options

Posted: Mon Jun 17, 2019 8:16 pm
by abik
retep1 wrote:
Mon Jun 17, 2019 7:17 pm
The engine is Cfish 030619-arm7-pgo. After I have reset the options of the engine and re-entered the path, loading the opening book will work now. Thank you for your patience.
Glad to hear it is working 👍

Re: Chess for Android: UCI engine options

Posted: Tue Jun 18, 2019 9:45 am
by PeterO
Hi Aart,

what are your next ideas for „Chess for Android“?

Peter

Re: Chess for Android: UCI engine options

Posted: Wed Jun 19, 2019 9:05 am
by flok
abik wrote:
Mon Jun 17, 2019 5:23 pm
flok wrote:
Mon Jun 17, 2019 3:29 pm
When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.
Yes, if the engine has a log-to-file option, you can simply set that. Make sure to write the log file to a path where you can access it later.
I tried writing in the root of the sd-card but that doesn't work apparently?
The production version of Chess for Android by itself does not generate a UCI log file without engine support, that is only done in the debugging version.
Do I need to root my phone to run that version?
Where can I find it? I googled for it but it is nowhere to be found?

Also: sometimes my program crashes. In adb logcat I saw a process faulting because of SIGABRT, probably my chess program.
How can you debug such a thing? Is there a way to connect gdb to it or so?

Last question: am I right that c-f-a automatically switches to an other chess engine when the one you're playing with crashes? That would be a bit confusing while e.g. debugging.

Re: Chess for Android: UCI engine options

Posted: Wed Jun 19, 2019 12:15 pm
by pedrox
flok wrote:
Wed Jun 19, 2019 9:05 am
abik wrote:
Mon Jun 17, 2019 5:23 pm
flok wrote:
Mon Jun 17, 2019 3:29 pm
When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.
Yes, if the engine has a log-to-file option, you can simply set that. Make sure to write the log file to a path where you can access it later.
I tried writing in the root of the sd-card but that doesn't work apparently?
The production version of Chess for Android by itself does not generate a UCI log file without engine support, that is only done in the debugging version.
Do I need to root my phone to run that version?
Where can I find it? I googled for it but it is nowhere to be found?

Also: sometimes my program crashes. In adb logcat I saw a process faulting because of SIGABRT, probably my chess program.
How can you debug such a thing? Is there a way to connect gdb to it or so?

Last question: am I right that c-f-a automatically switches to an other chess engine when the one you're playing with crashes? That would be a bit confusing while e.g. debugging.
I had the same problem, look at the thread:

viewtopic.php?f=7&t=70226&p=793712&hili ... id#p793712

Re: Chess for Android: UCI engine options

Posted: Wed Jun 19, 2019 3:59 pm
by abik
PeterO wrote:
Tue Jun 18, 2019 9:45 am
Hi Aart,
what are your next ideas for „Chess for Android“?
Peter
Hi Peter,
Many! I have at least 20 items on a TODO list that I collected from user feedback, some small, some larger tasks, some for Chess for Android, others for Reversi or Checkers. Also, at one point, I really would like to go back to my BikJump engine. Not that the world is waiting for yet-another chess engine, but I started the project with a solid foundation, but never got around moving it to a good level. I am also pondering running some Android tournaments again. So, I guess you will see me around :-)
Aart

Re: Chess for Android: UCI engine options

Posted: Wed Jun 19, 2019 4:14 pm
by abik
flok wrote:
Wed Jun 19, 2019 9:05 am
Also: sometimes my program crashes. In adb logcat I saw a process faulting because of SIGABRT, probably my chess program. How can you debug such a thing? Is there a way to connect gdb to it or so? Last question: am I right that c-f-a automatically switches to an other chess engine when the one you're playing with crashes? That would be a bit confusing while e.g. debugging.
Note that logging can mean two things in this context. First, the centralized logging built in the Android framework (the one you inspect with adb logcat). Second, an engine specific log file written to "disk". The debugging version of Chess for Android (a version I use internally only for verification and debugging) uses the former heavily. The production version allows engines to use the latter (make sure to set enable the "Storage" permissions though, since the engine process will inherit from the GUI).

As for engine crashes, I am still thinking of a good way to relay the crash information back to the GUI (so far, a harder problem than I initially thought). I am happy to have a look if you are willing to share the binary and want to make progress. Other options are simply running the binary from the command line on the device (or on a similar Linux ARM device, such as the RaspberryPi).

Lastly, yes, on any engine crash, the GUI falls back to the built-in engine for safety (as indicated by the lack of engine output at the bottom window).