Menu

#1434 pause mouse hangs gnuplot (Windows)

None
closed-fixed
nobody
2015-05-18
2014-06-22
No

"pause mouse" keeps on waiting indefinitely, if the terminal window gets closed, or if there wasn´t one to begin with.

On Windows, this constitutes a hang.

(I saw that a message "Ctrl-C detected!" is shown after a pause, if i hit Ctrl-Break in the console window during the pause. It´d be great if it was also detected with focus on the terminal window. Same goes for "pause -1". I see that "pause 100" can now be interrupted with Ctrl-Break also under Windows.)

Discussion

  • Karl Ratzsch

    Karl Ratzsch - 2014-06-22

    I also noticed that "pause mouse button1" ends the pause after zooming using the right mouse button to select the zoom area.

    "pause mouse botton3" immediately ends the pause upon a right click, and does not start the zooming, as expected.

    This is again the windows terminal, gp5, win7.
    This is on both windows and wxt, under gp5/win7.

    The original bug only appears on wxt/gp5/win7, see below

     

    Last edit: Karl Ratzsch 2014-06-22
  • Ethan Merritt

    Ethan Merritt - 2014-06-22

    This is very terminal-dependent. Which terminal[s] do you see the problem with?

    A related bug ("pause mouse close") was fixed only recently for qt. At least on my machines the window close event is now recognized correctly on qt, wxt, x11.

     
  • Ethan Merritt

    Ethan Merritt - 2014-06-22
    • summary: pause mouse hangs gnuplot --> pause mouse hangs gnuplot (Windows)
     
  • Ethan Merritt

    Ethan Merritt - 2014-06-22

    Hah. Crossed followups. So Windows only?

     
    • Karl Ratzsch

      Karl Ratzsch - 2014-06-22

      Likely. I´ve got no access to a Linux box at the moment, so couldn´t check.

      Sorry, miscommunication. It´s the wxt terminal on windows.

      The windows terminal catches the closing of the plot window and ends the pause. "pause mouse" without an open terminal window waits for the user to hit Enter, funnily. And with the windows terminal, console takes about a second to resume after "pause mouse button1", but is much faster after "..button3".

       

      Last edit: Karl Ratzsch 2014-06-23
  • Karl Ratzsch

    Karl Ratzsch - 2014-06-23
    • labels: --> wxt, Windows
     
  • Bastian Märkisch

    That behaviour is similar on most platforms and terminals. The terminal API does not provide a method to check if mouse feedback is available, see also the following comment in command.c

    /*  EAM FIXME - This is not the correct test; what we really want */
    /*  to know is whether or not the terminal supports mouse feedback */
    /*  if (term_initialised) { */
        if (mouse_setting.on && term) {
    

    In wgnuplot you should be able to break any pause command with Ctrl-Break. In Windows console mode gnuplot you should use Ctrl-C instead. I am not sure from your report which combination does not work for you, though.

     
    • Karl Ratzsch

      Karl Ratzsch - 2014-06-29

      In wgnuplot (with wxt terminal), Ctrl-Break does not end "pause mouse", but only says "Ctrl-C detected" after a mouse click in the graph. If there is no graph, there´s no way out of the pause.

      With windows terminal, behaviour is similar, but if there´s no plot, "pause mouse" can be ended by pressing Enter (but not Ctrl-Break, this only prints a small "L".)

      But i think the Ctrl-Break stuff is a different issue. "pause mouse" should firstly check if there´s an active terminal window, and just do nothing if there isn´t.
      And it should catch the closing of the active wxt terminal, as it does with the windows terminal (or as wxt does on linux, as Ethan said above).

      (The console gnuplot.exe just exits if you hit Ctrl-Break, "pause mouse" or not. But this is expected behaviour for a console application, to me.)

       

      Last edit: Karl Ratzsch 2014-06-29
  • Karl Ratzsch

    Karl Ratzsch - 2014-12-14

    Update:
    todays 5.1-cvs wgnuplot/wxt : closing the terminal window now does end the pause, "pause mouse" without a terminal window hangs. (CTRL-BREAK / -C has no effect)

    wgnuplot/windows : closing the terminal window ends the pause, "pause mouse" without a terminal window ends only when the user hits "ENTER"

    Another glitch: Pressing "SPACE" does not end "pause mouse key", it simply changes the focus back to the gp console.

     
  • Bastian Märkisch

    • status: open --> pending-fixed
     
  • Bastian Märkisch

    A fix for some of the pause mouse issues on Windows is now in CVS for version 5.1, see also bug [#1502]. Before including it in 5.0 too I would appreciate feedback by independent testers ;).
    The "hanging" should be gone for all the wxt/windows/caca terminals. Some more code is required for the qt terminal. At the moment gnuplot/wxt has still problems, though.
    The spacebar issue is a separate case and will be adressed later.

     

    Related

    Bugs: #1502

  • Karl Ratzsch

    Karl Ratzsch - 2014-12-15

    Both wxt and windows terminals now show a "pause" window when "pause mouse" is issued without a terminal window open, so seems to work for me.
    I´ve got MinGW32 under win7 with wxMSW 2.8.12 here.

     
  • Bastian Märkisch

    Now also fixed in version 5.0 thanks to Ethan who backported the changes.

    The issue still applies for the qt terminal, see above. The wxt terminal works fine in wgnuplot, but behaviour is still broken in console mode gnuplot (but in a different way).

     
  • Karl Ratzsch

    Karl Ratzsch - 2014-12-31

    Works fine, only one tiny hitch: Ending "pause mouse" with CTRL-BREAK leaves gp in a state where a new command prompt is displayed, but the program still waits for a mouseclick in (or the closing of) the wxt terminal window. (todays cvs/mingw wgnuplot.exe)

     
  • Ethan Merritt

    Ethan Merritt - 2015-05-18
    • status: pending-fixed --> closed-fixed
    • Group: -->
    • Priority: 5 -->
     

Log in to post a comment.