|
From: Tatsuro M. <tma...@ya...> - 2017-03-23 02:21:43
|
----- Original Message ----- > From: Ethan A Merritt <sf...@us...> > To: gnu...@li...; Tatsuro MATSUOKA <tma...@ya...> > Cc: bma...@we... > Date: 2017/3/23, Thu 09:18 > Subject: Re: qt terminal trouble 5.0.6 source on windows build (was Re: Release 5.0.6) > > On Thursday, 23 March, 2017 08:41:28 Tatsuro MATSUOKA wrote: > >> >> >> >> > Does commenting out this one line in qt_term.cpp make it > work again? >> >> > >> >> > diff -urp gnuplot-5.0.6pre/src/qtterminal/qt_term.cpp >> >> > gnuplot-5.0.6/src/qtterminal/qt_term.cpp >> >> > --- gnuplot-5.0.6pre/src/qtterminal/qt_term.cpp 2017-02-25 >> > 14:18:30.000000000 >> >> > -0800 >> >> > +++ gnuplot-5.0.6/src/qtterminal/qt_term.cpp 2017-03-21 >> > 19:49:24.159719912 >> >> > -0700 >> >> > @@ -537,7 +537,7 @@ void qt_graphics() >> >> > qt->out << GEInitWindow; >> >> > #ifdef _WIN32 >> >> > // Let the terminal window know our PID >> >> > - qt->out << GEPID << >> > quint32(GetCurrentProcessId()); >> >> > + // qt->out << GEPID << >> > quint32(GetCurrentProcessId()); >> >> > #endif >> >> > qt->out << GEActivate; >> >> > qt->out << GETitle << > qt_option->Title; >> >> >> >> >> >> >> >> Yes! >> >> >> >> > + // qt->out << GEPID << >> > quint32(GetCurrentProcessId()); >> >> >> >> The comment out the above makes gnuplot_qt work. >> >> >> >> Tatsuro >> > >> > That demonstrates the problem is not due to changing the order of >> > symbols in enum QtGnuplotEventType. >> > >> > There may be something wrong in the communication of pid information >> > between processes or possibly an error from the call to >> > AllowSetForegroundWindow(m_pid). Maybe it needs error-checking? >> > Or sanity checking of the m_pid value? >> > Anyhow it seems from the symptoms you report that the error comes >> > from the code added to allow '--enable-raise-console'. So I > expect >> > that the cleanest option for building from unmodified source is to >> > configure with >> > >> > --disable-raise-console >> > >> > or (same thing) add a line to config.h >> > >> > #define DISABLE_SPACE_RAISES_CONSOLE >> > >> > >> > Ethan >> >> Windows build does not use configure but use the special makefile. >> I add -DDISABLE_SPACE_RAISES_CONSOLE to CFLAGS and build 5.0.6 unmodified > source. >> However, the qt does not work even if this option is added. >> >> As I showed gdb trace previously >> http://gnuplot.10905.n7.nabble.com/Release-5-0-6-td20570.html#a20573 >> gnuplot_qt seems to close at the point before DISABLE_SPACE_RAISES_CONSOLE > check in qt code. >> (QtGnuplotWindow.cpp). > > Perhaps this patch will help. > It adds GEPID to the list of events that should be ignored if they arrive > before gnuplot_qt is ready to handle them. > > --- gnuplot50/src/qtterminal/QtGnuplotEvent.cpp 2015-08-20 10:24:39.000000000 > -0700 > +++ gnuplot-5.0.6/src/qtterminal/QtGnuplotEvent.cpp 2017-03-22 > 17:10:13.004011326 -0700 > @@ -183,5 +183,6 @@ void QtGnuplotEventReceiver::swallowEven > else if (type == GERaise) ; // 1034 > else if (type == GEDesactivate) ; // 1038 > else if (type == GESetPosition) in >> point; > + else if (type == GEPID) in >> i; > else qDebug() << "Event not swallowed !" << type; > } > > This patch looks correct to me even if it does not fix your problem, > so I will add it to CVS. But if it does fix your problem you should > add it to 5.0.6 also in order to get a working Windows build. > > Ethan Thank for your kind reply. Unfortunately the patch above gave the same result. I traced code with gdb gnuplot_qt terminates at the same line as posted previously in qt_term.cpp (gdb) n 550 qt_sendFont(); (gdb) n Here gnuplot_qt terminates again. I should do child process debug but I do not have enough knowledge to do that at this moment. Tatsuro |