bugGNU Octave - Bugs: bug #42309, debug mode continues when file is...

 
 

bug #42309: debug mode continues when file is run from GUI editor

Submitter:  Ceral Paquet <octavebugs>
Submitted:  Tue 06 May 2014 05:22:13 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 12 Jun 2014 05:52:07 PM UTC, comment #6: 

I have pushed the changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/4b98fc5c2eb1
(gui-release branch) which fixes the bug for me. If this is also successful on your system I will close the bug report.

Should the patch be applied to the stable branch instead?

Torsten Lilge <ttl>
Group Member
Thu 05 Jun 2014 01:26:12 PM UTC, comment #5: 

This is the same issue as described in bug #38983 which was closed since the bug was not reproducible in on the development branch anymore. I tested it yesterday and it does appear in all branches.

The patch for bug #38983 still fixes the issue (file #29400) but I am still not sure what side effect may be introduced by


command_editor::accept_line ();


instead of


command_editor::interrupt ();



Torsten Lilge <ttl>
Group Member
Thu 05 Jun 2014 01:42:10 AM UTC, comment #4: 

The same error holds for breakpoints set from the command line with dbstop or set graphically in the GUI editor.

Mike Miller <mtmiller>
Group Member
Wed 07 May 2014 05:09:13 PM UTC, comment #3: 

Thanks Torsten. I was looking at the main_window code, not carefully enough, and misunderstood what it was doing there. It only does "run testfunc" if the command can't be called directly by its own name (after prompting), that makes sense.

So I can confirm this with both 3.8.1 and (recent but not current) gui-release.

Mike Miller <mtmiller>
Group Member
Wed 07 May 2014 04:30:31 PM UTC, comment #2: 

Executing a file (e.g. testfunc.m) from the editor actually calls the script "testfunc" instead of running it with "run testfunc".

Torsten Lilge <ttl>
Group Member
Wed 07 May 2014 01:40:10 PM UTC, comment #1: 

Thanks for your bug report. This is a bit confusing. Is the m-file testme a script or a function file? Does it contain the definition of a function or does it execute the function? Or both? When I create a file testfunc.m with:


function testfunc ()
  disp ("before keyboard");
  keyboard ();
  disp ("after keyboard");
endfunction


and call testfunc from the command prompt, it works correctly. If I try to "execute" it using "run" or "source", it does nothing (as expected). If I "execute" it from the editor, yes I see what you are seeing.

I suspect that this should do nothing, because "executing" a file that contains nothing but a function definition should just drop back to the shell. So it does seem like a bug that running it from the GUI does something different from "run testfunc" at the command line.

Mike Miller <mtmiller>
Group Member
Tue 06 May 2014 05:22:13 PM UTC, original submission:  

When I run this script using the GUI button "Save File and Run" then it correctly stops at the keyboard command. However if I subsequently enter anything at the command line then the program continues (i.e. exits debug mode). The same behavior doesn't occur when calling testme() from the command line.


function testme()

disp('test')

keyboard

disp('hello')


This is the output in the command window when running the program from the GUI:

>> testme

test
stopped in /home/ceralpaquet/octave/testme.m at line 5
5: keyboard
debug> a=1
hello

>>




Ceral Paquet <octavebugs>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by octavebugs (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-20 ttl StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-06-12 ttl StatusConfirmed Ready For Test
    2014-06-05 mtmiller Dependencies- bugs #42506 is dependent
    2014-06-05 mtmiller Summarykeyboard (debug mode) not quite right when running from GUI debug mode continues when file is run from GUI editor
    2014-05-07 mtmiller StatusNeed Info Confirmed
    2014-05-07 mtmiller CategoryNone GUI
        Item GroupNone Incorrect Result
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code