bugGNU Octave - Bugs: bug #47685, debug_on_error does not report...

 
 

bug #47685: debug_on_error does not report errors occurring within a "catch" block

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Wed 13 Apr 2016 09:55:17 AM UTC  
 
Category: InterpreterSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Lachlan Andrew <lachlan>
Originator Name: LachlanOpen/Closed: Closed
Release: devOperating 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)

Thu 16 Jun 2016 04:32:57 PM UTC, comment #7:

The parse tree isn't my area of expertise, but the patch seems to work fine. I applied it here http://hg.savannah.gnu.org/hgweb/octave/rev/c34f9c182dcf. For some reason it was checked in under my credentials rather than Lachlan's. Sorry about that. The glory of the bug fix should be all yours.

Anyways, I'm marking this as fixed and closing the report.

Rik <rik5>
Project Administrator
Wed 15 Jun 2016 09:47:44 AM UTC, comment #6:

Here is a patch against the current head. Thanks for looking at this.

(file #37486)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Sat 11 Jun 2016 05:08:03 AM UTC, comment #5:

@Lachlan: Could you refresh this patch? I tried to import it for testing and it failed with rejects.

Rik <rik5>
Project Administrator
Thu 02 Jun 2016 12:16:02 AM UTC, comment #4:

Yes, Matlab does stop. For the function

it gives

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Wed 01 Jun 2016 03:37:17 PM UTC, comment #3:

Does Matlab's equivalent to debug_on_error also stop in the catch block of a try/catch statement?

Rik <rik5>
Project Administrator
Wed 13 Apr 2016 11:50:32 AM UTC, comment #2:

This problem can be avoided by deleting (unwinding) the unwind_protect frame before executing the catch block in tree_evaluator::visit_try_catch_command.

I'm not sure if this is the appropriate solution. Please let me know.

(file #36917)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Wed 13 Apr 2016 11:12:21 AM UTC, comment #1:

The problem appears to be that the error is thrown within a "catch" block. This may be related to the "debug if caught error" code. Still looking...

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Wed 13 Apr 2016 09:55:17 AM UTC, original submission:

When debug_on_error is 1, errors should cause debug mode to be entered, but this doesn't always happen.

In snapshot 32cd60419b61, the following script

throws the error

without entering debug mode.

(The error itself is solved by the patch for bug #47149. This bug report is about the failure to enter debug mode.)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by lachlan (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 16 Jun 2016 04:32:57 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Wed 15 Jun 2016 09:47:44 AM UTClachlanAttached File-=>Added bug_47685_dbstop_catch.v1.cset, #37486
    Wed 13 Apr 2016 11:50:32 AM UTClachlanAttached File-=>Added bug_47685_dbstop_catch.cset, #36917
      StatusNone=>Patch Submitted
      Assigned toNone=>lachlan
    Wed 13 Apr 2016 11:12:21 AM UTClachlanSummarydebug_on_error fails in erroneous calls to line ()=>debug_on_error does not report errors occurring within a "catch" block

    Back to the top


    Powered by Savane 3.1-cleanup1