bugGNU Octave - Bugs: bug #43249, Wrong line number in error message

 
 

bug #43249: Wrong line number in error message

Submitted by:  Falk Tannhäuser <fata>
Submitted on:  Thu 18 Sep 2014 01:55:42 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Lachlan Andrew <lachlan>
Originator Name: fataOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 26 Mar 2016 03:40:48 PM UTC, comment #4:

@Lachlan: Thanks for the easy fix. I pushed the cset here (http://hg.savannah.gnu.org/hgweb/octave/rev/7ba48ff6ce83). Closing report.

Rik <rik5>
Project Administrator
Fri 26 Feb 2016 09:35:20 AM UTC, comment #3:

The attached patch fixes this bug. As Rik indicated, the problem was that the condition expression was cached in the loop object and there was no call to set_location when it was evaluated, so the location was just the last line executed in the loop body.

I think bug #34852 is quite a distinct issue. That applies to all expressions, but the current bug seems unique to do...until.

(file #36469)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Sat 27 Dec 2014 05:20:32 PM UTC, comment #2:

Adding bug #34852 as a dependency. In that bug the line number is correct, but the column number is incorrect. It's probably all related code in the parser and the procedure by which it determines which statement was being executed when an error occurs.

Rik <rik5>
Project Administrator
Mon 15 Dec 2014 04:38:08 AM UTC, comment #1:

Confirmed.

If I had to guess, it appears that the parser gives the line number for the last successfully parsed line, rather than for the line it is currently parsing which is the 'until' statement.

Rik <rik5>
Project Administrator
Thu 18 Sep 2014 01:55:42 PM UTC, original submission:

The following function, contained in the Octave file error_test.m, has an error in line 9 (trying to compare element-wise two character arrays of different length) which is detected by Octave during execution:

However, the line number given in the error message is wrong:

This makes it difficult to identify and to fix this kind of error, in particular if functions are larger.

Falk Tannhäuser <fata>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #32132:  error_test.m added by fata (204B - application/octet-stream)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lachlan (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by fata (Submitted the item)
  • -unavailable- added by fata
  •  

    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 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 26 Mar 2016 03:40:48 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Fri 26 Feb 2016 09:35:20 AM UTClachlanAttached File-=>Added bug_43249_until_line_number.cset, #36469
      StatusConfirmed=>Patch Submitted
      Assigned toNone=>lachlan
      Release3.8.2=>dev
      Operating SystemMicrosoft Windows=>Any
    Sat 27 Dec 2014 05:20:32 PM UTCrik5Dependencies-=>Depends on bugs #34852
    Mon 15 Dec 2014 04:38:08 AM UTCrik5StatusNone=>Confirmed
    Thu 18 Sep 2014 01:55:42 PM UTCfataAttached File-=>Added error_test.m, #32132
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1