bugGNU Octave - Bugs: bug #45935, Ctrl+C doesn't break procedure

 
 

bug #45935: Ctrl+C doesn't break procedure

Submitted by:  Diego <diego_mx>
Submitted on:  Fri 11 Sep 2015 06:37:29 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: DiegoOpen/Closed: Closed
Release: 3.8.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 12 Sep 2015 01:42:39 PM UTC, comment #8:

It's solved guys.

I was able to install octave 4.0, and tried ctrl+C for interrupting the procedure.
Low and behold, it was interrupted!

I also noticed that octave GUI is the default for 4.0, and it starts faster to my liking.

I'm a big fan of this project and will keep looking for ways to support this project.

Diego <diego_mx>
Sat 12 Sep 2015 05:53:33 AM UTC, comment #7:

The issue with Ctrl-C not interrupting when not configured as copy shortcut was reported in bug #44204 and fixed with changeset http://hg.savannah.gnu.org/hgweb/octave/rev/bd1369a2a651 .
You can check your shortcut configuration in the tab "Shortcuts" in the settings dialog via menu File/Preferences (in 4.0.0 it is Edit/Preferences).

Torsten <ttl>
Project Member
Fri 11 Sep 2015 09:00:23 PM UTC, comment #6:

You can also try installing Octave 4.0.0 and see if it fixes the problem you are having. Octave 4.0.0 is in Ubuntu 15.10 coming soon, and is also in the PPA https://launchpad.net/~octave/+archive/ubuntu/stable.

Mike Miller <mtmiller>
Project Administrator
Fri 11 Sep 2015 08:58:07 PM UTC, comment #5:

Yes, it is almost certainly related to an issue with your shortcuts in the GUI.

I remember this coming up at one point, can't find a reference at the moment, but if Ctrl-C does not copy to the clipboard, then it also won't be able to interrupt in the GUI. Try resetting your shortcuts, or delete the file ~/.config/octave/qt-settings to erase all settings if you have to, then see if both clipboard and interrupt work again.

Mike Miller <mtmiller>
Project Administrator
Fri 11 Sep 2015 08:50:41 PM UTC, comment #4:

I can interrupt

tic; sin (randn (8000, 8000)); toc

only when running Octave from the terminal, not on the GUI. Can it be that my GUI installation is broken somewhere?

It may be related that other shortcuts that I'm used to don't work in the Command Window, like Ctrl+C but for copying text, and Ctrl+V for paste.

Diego <diego_mx>
Fri 11 Sep 2015 08:39:15 PM UTC, comment #3:

The way interrupts work in Octave is that they are supposed to set a global value to indicate whether an interrupt has happened and then Octave periodically checks the value of the global value to see whether it should stop processing and return to the prompt.

Looking at samin.cc from the optim package, it doesn't appear to check the status of the global interrupt variable. I'm surprised you are ever able to interrupt it.

Are you able to interrupt something like

when using the GUI? If so, then I think interrupts are working as expected and the bug is in the samin function itself.

John W. Eaton <jwe>
Project Administrator
Fri 11 Sep 2015 08:26:57 PM UTC, comment #2:

Thanks for the quick response.

At the moment, I am solving an optimization problem using the simulated annealing function `samin` from the forged package `optim`. While tuning the parameters I found the algorithm is taking too long, for which I'd rather stop the procedure early to tune it better.

Unfortunately, I cannot do this in the Command Window from the GUI, and ended migrating to the terminal version. Strangely, I found that it runs slower on the terminal, but that's not really the point.

What I'd like to know, and even help in any way possible, is how to setup the shortcut Ctrl+C to work with the GUI.

Diego <diego_mx>
Fri 11 Sep 2015 08:05:39 PM UTC, comment #1:

Exactly what is it that you are trying to interrupt?

John W. Eaton <jwe>
Project Administrator
Fri 11 Sep 2015 06:37:29 PM UTC, original submission:

I am running Octave on Kubuntu 15.04.
I've gotten stuck in a loop and can't stop the procedure.
I found online that Ctrl+C would do that, but it doesn't work in my machine. I am using the GUI.
I have to end process from the System Activity, and restart each time. This happens every time I have a procedure running.

However, it doesn't happen if I run it from the terminal. I hope I can fix this, as I really do like the GUI. Let me know if I can get more information.

Diego <diego_mx>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by diego_mx (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 12 Sep 2015 05:45:57 PM UTCmtmillerStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 11 Sep 2015 08:05:39 PM UTCjweItem GroupBuild Failure=>Incorrect Result

    Back to the top


    Powered by Savane 3.1-cleanup1