Appendix D. Trouble Shooting

Table of Contents

Slow navigation to end or beginning of game
Standard error and output of the GTP engine are displayed in wrong order
Out of memory error when loading large SGF trees
Wrong line numbers in SGF error messages
Cannot enter text in some dialogs

Slow navigation to end or beginning of game

This happens while going forward or backward for a large number of moves in a game. Since Java offers no stream selectors for file streams, GoGui needs to use thread synchronization to read the output and error stream of the Go program for preserving the correct order of the received output in the GTP shell and for detecting timeouts. This synchronization can becomes slow if there are other CPU intensive background processes running on the computer. The problem can be avoided if the Go engine implements the gg-undo and gogui-play_sequence commands (see Chapter 3, Compatibility), then a single command can replace up to several hundred play or undo commands.

Standard error and output of the GTP engine are displayed in wrong order

Due to deficiencies in the Java library, it cannot be guaranteed that the standard error and standard output of the GTP engine are always displayed in the correct order in the GTP shell. In cases where the order is critical for debugging purposes, it is better to invoke GoGui from a terminal with the -verbose option and watch the logging of the GTP streams in the terminal.

Out of memory error when loading large SGF trees

Java uses a low maximum memory heap size by default. It can be increased by using the "-Xmx" option, for example for 512MB:

java -Xmx512M -jar gogui.jar

Don't use more memory than there is real memory on the machine, because using swap space will make the program unusable slow.

Wrong line numbers in SGF error messages

If reading an SGF file fails, the line numbers of the error messages are sometimes wrong. This is due to bugs in the Java class StreamTokenizer, which is used for parsing the SGF stream.

Cannot enter text in some dialogs

This seems to be a bug in the focus handling after showing modal dialogs that occurs with Java 1.6 on Linux. The only known workaround for the text field to gain focus again is to switch to another window and back.