Appendix C. Trouble Shooting

Table of Contents

Slow navigation to end or beginning of game
Rendering errors in the GTP shell
Problems with command completion in GTP shell on Mac OS X
Out of memory error when loading large SGF trees
Wrong line numbers in SGF error messages

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 synchronizationcan 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 play_sequence commands (see Chapter 3, Compatibility), then a single command can replace up to several hundred play or undo commands.

Rendering errors in the GTP shell

Rendering errors in the GTP shell window occur, which disappear after manually resizing the window. This is probably a bug in the Java libraries. With Java 1.4.2 for Linux, this problem seems to have disappeared after introducing a workaround, which resets the window size after each text update. With other Java versions, or on other systems, the problem can still exist.

Problems with command completion in GTP shell on Mac OS X

There are two known problems with Java 1.4.2 on Mac OS X: the popup menu sometimes overlaps the command field and selection from the popup menu using the Enter key does not work. It is recommended to disable command line completion on the Mac and to select from the popup menu only using the mouse.

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.