bugGNU Octave - Bugs: bug #58134, Very unhelpful error message when...

 
 

bug #58134: Very unhelpful error message when calling a script with an error

Submitter:  Doug Strain <saintrain>
Submitted:  Tue 07 Apr 2020 04:19:52 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  doug strain Open/Closed:  * Closed
Release:  * 5.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 Apr 2020 07:29:22 PM UTC, comment #3: 

I can duplicate the results of comment #2 with Octave 5.2.0.

With the current stable branch (what will be released as Octave 6), I see the following behavior:


octave:1> t2
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 6
octave:2> clear all
octave:3> t2
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 6
octave:4> echo on all
octave:5> t
+ clear all
+ t2
+ data = [
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 6
    t at line 2 column 1
octave:6> t2
+ data = [
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 6
octave:7> t
+ clear all
+ t2
+ data = [
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 6
    t at line 2 column 1
octave:8> t
+ clear all
+ t2
+ data = [
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 6
    t at line 2 column 1
octave:9> t2
+ data = [
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 6
octave:10> clear all
octave:11> t2
+ data = [
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 6


So I think this problem has been fixed.

John W. Eaton <jwe>
Group administrator
Wed 08 Apr 2020 06:15:38 PM UTC, comment #2: 

Thanks Rik

Here's an echo of what I see today (annotations in []):

-------------------------------------------------

>> t2                                    [call t2]

error: invalid call to script t2.m

  [clear and re-call t2]

>> clear all
>> t2

error: invalid call to script t2.m

>>
>>
>>
>> echo on all
>>
>>


>> t                                     [t calls t2 (no .m)]

clear all

t2;
error: invalid call to script t2.m
error: called from
    t at line 3 column 1

>> t2                                    [I re-call t2]

data = [
error: vertical dimensions mismatch (1x4 vs 1x3)
error: called from
    t2 at line 1 column 6


>>
>>
>>
>>
>>
>>
>>
>> t                                     [ see if it repeats]

clear all

t2
error: invalid call to script t2.m
error: called from
    t at line 3 column 1

>>
>>
>>
>>
>> t                                     [again]

clear all

t2
error: invalid call to script t2.m
error: called from
    t at line 3 column 1
   

>> t2                                    [direct call]

data = [
error: vertical dimensions mismatch (1x4 vs 1x3)
error: called from
    t2 at line 1 column 6


>> clear all                             [clear and re-call]
>> t2

error: invalid call to script t2.m
------------------------------------------------------

So it looks like sometimes(!?) you get one msg and ...

Thanks again
Doug

Doug Strain <saintrain>
Wed 08 Apr 2020 12:59:58 AM UTC, comment #1: 

Works for me.

If you have a function or script FNAME and it is in the file FNAME.m then to invoke it you just type "FNAME".  The command "FNAME.m" is something closer to "FNAME().m" which would expect a structure to be output from FNAME and then you are asking Octave for the fieldname "m".

I put your commands in a file t2.m and then invoked it both ways.  The log is shown below.


octave:2> t2.m
error: invalid call to script /home/rik/wip/Projects_Mine/octave-dev/t2.m
octave:3> t2
error: vertical dimensions mismatch (1x3 vs 1x4)
error: called from
    t2 at line 1 column 10



Rik <rik5>
Group administrator
Tue 07 Apr 2020 04:19:52 PM UTC, original submission:  

Hi! Love Octave, but ...

When calling t2 from the interpreter, or calling t2.m from another script, thus
t2.m:
    data = [
     1 2 3
     1 2 3   4
    ];
the error message is a very unhelpful
error: invalid call to script t2.m

But if I enter the text of t2.m (data = ...) directly into the interpreter, the error message is a helpful
error: vertical dimensions mismatch (1x3 vs 1x4)

Thanks
Doug

Doug Strain <saintrain>

 

(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

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by saintrain (Submitted the item)
  • -email is unavailable- added by saintrain
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2020-04-08 rik5 StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2020-04-07 saintrain Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code