Additional notes after some mass debugging:

1. The freeze does not occur if the user clicks Peer->Disconnect. This
implies it is caused by an "unexpected" disconnection by the remote server.
That is, typing "quit" and timing out both cause the remote server to
disconnect, while the Disconnect menu item causes the local client to
disconnect without error. This leads ma to believe the freeze is related to
the network code not closing properly.

2. The -debug and -log options prevent eboard from freezing because they
use ofstream. If we use the -debug option and comment out the rest of the
code in Global::debug, leaving only

  char z[256];
  time_t now;
  string rm;

  ofstream f(z,ios::app);
  f.close();

then this will prevent the freeze from occurring.

3. Conversely, if we comment out these lines related to ofstream, and use
cout to output the debug information,

cout << " [" << ((int) getpid()) << "] " << rm << endl;

then the freeze will occur while using the -debug option, and thus we can
get debug to output when the freeze occurs.

4. Namely, the freeze occurs in an infinite loop
in MainWindow::readAvailable

Reply via email to