[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-XBoard] Infinite recursion

From: h.g. muller
Subject: Re: [Bug-XBoard] Infinite recursion
Date: Wed, 11 Apr 2012 11:06:58 +0100

However if start xboard in my normal Danish locale the error error does not come up, and the engine setting menu item are enabled. If I click on "Engine #1 settings", xboard will crash.
But the point is that the behavoir depends on the locale in a way it shouldn't.

I guess the problem is that XBoard (as described in the protocol specs) triggers on receiving a message containing "No such file" from the engine process, and that the engine probably sent a translated version of that message. That is a bit hard to fix. We could translate the system standard error messages it compares to in backend.c. But that is tricky; they really would have to be translated to the exact messages that the system in that locale would produce. We could of course let XBoard request the messages by error number in its own locale, and use those in the comparison. But also that will not always do what we need, because you could be running the engine on a machine with a different locale as wher XBoard is running.

One problem, which I have just been fixing even before I saw your report on this, is that the master version that does this is indeed a bit broken: it ignores pipe breaks before engine initialization is complete. While in fact detection of EOF while reading from the engine process would have been a good alternative method to produce an error popup and trigger the switch back to -ncp mode. (It would be a different error popup, "engine exited unexpectedly" in stead of "failed to start engine", but I could live with that.) This problem came up when starting non-existent UCI engines, as Polyglot wraps the error message in a "tellusererror" command, which effectively hides it from XBoard, so that the only signal to go on is Polyglot exiting.

I have fixed that with the most-recent commit. This should prevent the other problem, because it would disable the menu you had to click to cause it. I guess it was not so much caused by recursion as well as repetitive triggering of the same error condition ('broken pipe'), and failure to make that trigger the required action to solve the problem.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]