On Sun, Sep 13, 2009 at 05:40:12PM +0200, Vincent van Ravesteijn - TNW wrote:

> >Author: forenr
> >Date: Sun Sep 13 17:07:28 2009
> >New Revision: 31386
> >URL: http://www.lyx.org/trac/changeset/31386
> >
> >Log:
> >Take into account that Qt doesn't allow GUI operations outside the main
> thread.
> >
> >Modified:
> >  lyx-devel/trunk/development/lyxserver/server_monitor.cpp
> >  lyx-devel/trunk/development/lyxserver/server_monitor.h
> >
> 
> The problem wasn't completely solved yet, but I didn't had time to
> investigate more. It also still crashed in release mode when closing the
> pipes. Besides, it takes me sometimes 8 tries before I could succesfully
> connect.

Note that this patch is slightly different from the one I previously
posted, in that it tries to address the crash when closing pipes.
Perhaps you tried the previous instead of this one? If not, I don't
really understand why it crashes for you. I can assure that it works
when compiling with mingw (and it has always worked, even previously).
It also works on any other platform I have access to. So, I am afraid
that you have to debug this.
Some info (that could be useful for you) follows.
I had firstly tried to use QFile::open(), QFile::read(), and
QFile::write(), but it didn't work (I was not so surprised, given the Qt
reliability in this area). Thus, I decided to go for the corresponding
standard ISO functions. This way, it worked flawlessly. Then, I noticed
that open(), close(), read(), and write() were deprecated by MS in favor
of _open() and company, so I took that into account. Maybe you can try
what happens when using the functions without the leading underscore.
I tried both versions with mingw and both worked. Maybe there could
be a difference with msvc, but I don't have msvc installed (and don't
want to install it), so I cannot test. Good luck!

-- 
Enrico

Reply via email to