On Thu, Aug 02, 2018 at 01:58:37AM +0200, Pavel Sanda wrote:
> Will S wrote:
> > I have been helping a user debug a problem with a tool (LyZ,
> > https://github.com/willsALMANJ/lyz) that I maintain that interfaces with
> > LyX through the LyX server. The main symptom is that the lyxserver.out file
> > appears to be empty. Specifically, when LyZ writes a command into
> > lyxserver.in, LyX performs that command as normal (so the "statistics"
> > command causes the statistics window to pop up in LyX), but when a command
> > (like "server-get-filename") is run that requires a response from LyX that
> > response does not get written to lyxserver.out (lyxserver.out still appears
> > empty). This problem is seen on some Windows systems but not all. More
> > details about the specific issue can be found at this page:
> > https://github.com/willsALMANJ/lyz/issues/14
> > 
> > Are there any techniques we could use to debug this issue further? It seems
> 
> Shot in the dark: buffering output to lyxserver.out? If this was the cause
> then running "server-get-filename" 100x times will at certain moment output
> the whole buffer with all answers at once.

No, this seems to be an issue introduced in recent versions of Windows.
When an overlapped write operation to a pipe is in progress, GetLastError()
used returning ERROR_IO_PENDING while now it seems to also return NO_ERROR.
This was confusing the software so that the scheduled replies were never
actually output. Should be now fixed in master at cf5f2661.

-- 
Enrico

Reply via email to