<appendix id="bugs">
<title>Trouble Shooting</title>

<section>
<title>Slow navigation to end or beginning of game</title>
<para>
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 <xref linkend="compatibility"/>),
then a single command can replace up to several hundred play or undo commands.
</para>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Rendering errors in the GTP shell</title>
<para>
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.
</para>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>
Problems with command completion in GTP shell on Mac&nbsp;OS&nbsp;X
</title>
<para>
There are two known problems with Java 1.4.2 on Mac&nbsp;OS&nbsp;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.
</para>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Out of memory error when loading large SGF trees</title>
<para>
Java uses a low maximum memory heap size by default.
It can be increased by using the "-Xmx" option, for example for 512MB:
<programlisting>
<userinput>java -Xmx512M -jar gogui.jar</userinput>
</programlisting>
Don't use more memory than there is real memory on the machine,
because using swap space will make the program unusable slow.
</para>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Wrong line numbers in SGF error messages</title>
<para>
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.
</para>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

</appendix>
