Menu

#1426 pipes not working with qt terminal on Windows

closed-fixed
nobody
5
2015-03-23
2014-06-12
Anonymous
No

Hi,

just updated to 5.0 rc1, it seems that on Windows (8.1) the pipes are not working.
I.e. I use a text file inp.txt:
set terminal png
set output 'c:/temp/out.png'
plot sin(x)
exit

While
C:\temp>"c:\Program Files (x86)\gnuplot465\bin\gnuplot.exe" < inp.txt
works fine, the same on gnuplot 5.0
C:\temp>"c:\Program Files (x86)\gnuplot50rc1\bin\gnuplot.exe" < inp.txt
hangs until infinity, i.e. I have to kill gnuplot.exe via the task manager to return to the shell.

Best regards,
Florian

Discussion

  • Tatsuro MATSUOKA

    Perhaps this is related qt terminal.

    Please try
    set GNUTERM=windows
    or
    set GNUTERM=wxt
    and then test
    "c:\Program Files (x86)\gnuplot465\bin\gnuplot.exe" < inp.txt

    Tatsuro

     
  • Tatsuro MATSUOKA

    Oops
    Not
    "c:\Program Files (x86)\gnuplot465\bin\gnuplot.exe" < inp.txt
    but
    "c:\Program Files (x86)\gnuplot50rc1\bin\gnuplot.exe" < inp.txt

     
  • Tatsuro MATSUOKA

    I have tested using following command.

    cd "E:\usr\Tatsu\program\Gnuplot\test21"
    E:
    set GNUTERM=wxt
    "C:\Programs\gp50rc1-64\bin\gnuplot" < gppipetest.txt
    set GNUTERM=windows
    "C:\Programs\gp50rc1-64\bin\gnuplot" < gppipetest.txt
    set GNUTERM=qt
    "C:\Programs\gp50rc1-64\bin\gnuplot" < gppipetest.txt

    The file gppipetest.txt contains :

    gppipetest.txt pipe test command

    plot sin(x)
    pause 2

    For wxt and windows terminals, pipe works as expected.
    However, for qt terminal,

    E:\usr\Tatsu\program\Gnuplot\test21>"C:\Programs\gp50rc1-64\bin\gnuplot" < gppip
    etest.txt

    gnuplot> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    ^
    line 0: invalid command

    gnuplot hangs.

    I have also tested Kakuto's binary (http://ctan.ijs.si/mirror/w32tex/w32/)
    For wxt and windows terminals, pipe also work as expected
    For qt terminal, gnuplot hangs without output.

    I have done the similar test on Ubuntu 12.04 LTS 64 bit with gnuplot 5.0-rc1 with qt terminal. Pipe works as expected with qt terminal.

    This seems to be a bug of qt terminal on windows.

    Tatsuro

     
  • Tatsuro MATSUOKA

    Akira Kakuto suggested that codes for windows of int qt_waitforinput(int options) in qt_term.cpp should be revised for pipe to be accepted.

     
  • Bastian Märkisch

    The report actually was for the png or pngcairo terminal. So that is a separate issue.

    For the qt terminal, reading from stdin was actually supposed to work and the code to read is in place. I'll see if I can find out what is going wrong.

     
  • Bastian Märkisch

    • labels: --> Windows, qt
     
  • Tatsuro MATSUOKA

    The report actually was for the png or pngcairo terminal. So that is a separate issue.

    If I set GNUTERM to wxt or windows, 'gnuplot < inp.txt' works without problem.
    Even if I change 'set terminal png' to 'set terminal pngcairo' and I set GNUTERM to wxt or windows, 'gnuplot < inp.txt' works without problem.

    I think that the png and pngcairo itself does not have problem.
    The problem occurs when initial terminal is qt.

    inp.txt sightly modified from original

    set terminal png
    set output 'out.png'
    plot sin(x)
    exit

     
  • Bastian Märkisch

    • summary: pipes not working on MS Windows --> pipes not working with qt terminal on Windows
    • status: open --> pending-fixed
     
  • Bastian Märkisch

    Thanks for the report. Now fixed in CVS.

     
  • Tatsuro MATSUOKA

    I have confirmed the fix. Thanks a lot!

     
  • Ethan Merritt

    Ethan Merritt - 2014-06-14
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.