|
From: Tatsuro M. <tma...@ya...> - 2017-03-22 23:41:41
|
----- Original Message ----- > From: Ethan A Merritt <sf...@us...> > To: gnu...@li...; Tatsuro MATSUOKA <tma...@ya...> > Cc: bma...@we... > Date: 2017/3/23, Thu 04:00 > Subject: Re: qt terminal trouble 5.0.6 source on windows build (was Re: Release 5.0.6) > > On Wednesday, 22 March, 2017 12:40:59 Tatsuro MATSUOKA wrote: >> ----- Original Message ----- >> >> > From: sfeam >> > To: Tatsuro MATSUOKA >> > Cc: gnuplot-beta bmaerkisch >> > Date: 2017/3/22, Wed 11:54 >> > Subject: Re: qt terminal trouble 5.0.6 source on windows build (was > Re: Release 5.0.6) >> > >> > On Tuesday, 21 March 2017 01:08:48 PM Tatsuro MATSUOKA wrote: >> >> I checked changes after pre-release of 5.0.6 and found that >> >> the change >> >> >> >> >> >> 2017-03-08 Ethan A Merritt <merritt@u.washington.edu> >> >> >> >> * src/qtterminal/QtGnuplotEvent.h: Move new enum GEPID > (2017-02-25) to >> >> end of enum list rather than in the middle. Otherwise the > gnuplot_qt >> >> built for 5.0.6 is incompatible with gnuplot executables > 5.0.0-5, which >> >> makes comparison of multiple versions to debug things harder > than it >> >> needs to be. If the new event is at the end, all earlier > gnuplot 5.0.x >> >> versions can share gnuplot_qt 5.0.6. >> >> >> >> prevents gnuplot_qt.exe to start on windows. >> >> >> >> I do not have enough knowledge so that I do not know why this > change causes >> > >> >> trouble on qt terminal for windows. >> >> > >> > Have you confirmed that it really is that one change? >> >> Yes. >> I modified only QtGnuplotEvent.h to before this change. >> > http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/gnuplot/src/qtterminal/QtGnuplotEvent.h?r1=1.13.2.1&r2=1.13.2.2 >> and gnuplot_qt works without problem >> >> >> > 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). Tatsuro |