bugGNU Octave - Bugs: bug #34632, Pause function doesn't work...

 
 

bug #34632: Pause function doesn't work anymore after stopping the execution of a program

Submitter:  Victor Hurdugaci <victorhurdugaci>
Submitted:  Sun 23 Oct 2011 07:18:18 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0-rc1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 13 Jun 2017 12:18:58 PM UTC, comment #15: 

Version 3.8.1 is very old and no longer supported. Please, try with 4.2.1 which is the current version of Octave.

Markus Mützel <mmuetzel>
Group administrator
Tue 13 Jun 2017 01:48:14 AM UTC, comment #14: 

This still happens on my Ubuntu 14, octave version 3.8.1

Andre Oliveira Dias <aod>
Thu 15 Sep 2016 09:09:00 AM UTC, comment #13: 

I can no longer reproduce this issue on Windows with 4.2.0-rc1.

Markus Mützel <mmuetzel>
Group administrator
Mon 09 Dec 2013 01:00:11 AM UTC, comment #12: 

The problem is still present in Octave 3.6.4

Anonymous
Sat 22 Jun 2013 03:00:33 AM UTC, comment #11: 

I'm wondering whether this is actually related to Ctrl+C behavior on Windows platforms.  Bug #32380 reports that on MinGW using Ctrl+C places more than 1 character in the keyboard buffer. 

It seems possible that this is the reason that pause() is apparently skipped because when it goes to look for keyboard input it finds an additional character left over from the Ctrl+C invockation.  I would assume that pause() is flushing the keyboard buffer before it starts waiting, but maybe this is not the case.

Rik <rik5>
Group administrator
Fri 07 Jun 2013 05:47:13 AM UTC, comment #10: 

I have the same problem as you, and to solve it I fake a pause by asking data to the user with the following code:

input("Press enter");

emilie <emilie319>
Fri 31 May 2013 12:44:15 PM UTC, comment #9: 

Still present in 3.6.4 compiled with GCC 4.6.2 on Windows 7 64 bit (newest binary release from http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20MinGW%20installer/ )

Anonymous
Wed 19 Sep 2012 09:53:36 PM UTC, comment #8: 

I was wondering what was going on with my Octave.
I just tested this and this bug is still present in 3.6.2 (Visual Studio 2010 compilation) on a Win 7 64-bit computer.

Anonymous
Sun 17 Jun 2012 11:12:49 AM UTC, comment #7: 

I can confirm that last Windows version available as today (June 2012) is still to this day showing the same behaviour.

Octave 3.6.1 (Visual Studio 2010 compilation)
System: Windows 7 SP1 64 bits

Juan Navarro <juannm>
Wed 09 Nov 2011 02:34:52 PM UTC, comment #6: 

Thank you, Fed. I have updated the bug status as confirmed on 3.4.3 Windows.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 09 Nov 2011 07:11:07 AM UTC, comment #5: 

3.4.3 Windows build has the same issue.

Fed <pfed>
Wed 26 Oct 2011 03:29:24 PM UTC, comment #4: 

Jordi, can you bring this issue over to the Octave mailing list?  The problem, from my perspective, is that 3.2.4 is an unsupported, deprecated release regardless of what platform it is on.  I don't have any time for investigating issues which turn out to to have been fixed over a year ago.

Looking at the Octave for Windows page (http://wiki.octave.org/wiki.pl?OctaveForWindows) it still lists the 3.2.4 release ahead of the 3.4.X series.  Can't we delete 3.2.4 from the list?  It seems from the traffic on octave-maintainers that people have had success building 3.4.3 on Windows platforms and we should point to those bundles

Rik <rik5>
Group administrator
Wed 26 Oct 2011 04:25:10 AM UTC, comment #3: 

Furthermore, I'm not even sure this isn't a problem on Windows. Did you test it? Windows seems to run a separate thread for catching signals and the behaviour observed by Victor is a race condition caused by this. See here:

http://octave.1599824.n4.nabble.com/Does-signal-trap-of-CTRL-CLOSE-event-allowable-to-be-used-on-windows-td3663185.html#a3666890

I'm going to reopen this bug until we have conclusive evidence that a 3.4.3 Windows build doesn't exhibit this problem.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 26 Oct 2011 04:22:06 AM UTC, comment #2: 

There is a problem here. Windows users don't have an easy way to run the 3.4.3 release because there is no binary readily available. I think we really need to pool our resources to make a Windows binary release, because telling users to upgrade to a newer release that they can't access only causes frutration.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 26 Oct 2011 03:16:09 AM UTC, comment #1: 

Happily, this has been fixed and is no longer a problem in 3.4.3, the latest release.  The 3.2.4 release is deprecated and no longer maintained.  Upgrade to the new release to fix this issue.

Rik <rik5>
Group administrator
Sun 23 Oct 2011 07:18:18 PM UTC, original submission:  

Run the following program


printf('Before pause');
pause;
printf('After pause');


The normal flow would be: print the first message, wait for a key, display the other message, exit

Run the program and, when pause is executing (waiting for a key), press Ctrl+C.

Now run the program again.

Expected: the pause statement is executed and is waiting for a key
Actual: pause statement is ignored

Victor Hurdugaci <victorhurdugaci>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by aod (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by emilie319 (Posted a comment)
  • -email is unavailable- added by juannm (Posted a comment)
  • -email is unavailable- added by pfed (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by victorhurdugaci (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-15 rik5 StatusConfirmed Works For Me
        Open/ClosedOpen Closed
        Release3.6.4 4.2.0-rc1
    2013-06-22 rik5 Dependencies- Depends on bugs #32380
    2013-05-31 jordigh Release3.4.3 3.6.4
    2011-11-09 rik5 Carbon-CopyRemoved 72865 -
    2011-11-09 jordigh StatusNeed Info Confirmed
        Release3.2.4 3.4.3
    2011-10-26 jordigh StatusFixed Need Info
        Open/ClosedClosed Open
    2011-10-26 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code