bugGNU Octave - Bugs: bug #53838, variable editor displays out of...

 
 

bug #53838: variable editor displays out of bounds error too frequently

Submitter:  Marshall <marsian>
Submitted:  Fri 04 May 2018 09:48:39 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Marsian Open/Closed:  * Closed
Release:  * 4.4.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 13 May 2020 03:14:27 PM UTC, comment #7: 

It's fixed on the stable branch of Octave that will be released as 6.1 per comment #5.

Rik <rik5>
Group administrator
Wed 13 May 2020 07:23:22 AM UTC, comment #6: 

This is not fixed on Windows in 5.2. Now when I tried it, it crashes Octave.

Marshall <marsian>
Tue 12 May 2020 09:26:02 PM UTC, comment #5: 

This bug report is two years old and somewhere along the line it seems to have been fixed, at least on Linux.  Try upgrading to Octave version 6.1 when it is available.

Rik <rik5>
Group administrator
Wed 30 May 2018 03:52:27 PM UTC, comment #4: 

In following up with this, I thought I could add a little bit to example 1 that will perhaps make it more clear on how/when the "error" messages show up in the console window. With the following modifications, running the following line by line:

clear a
a.b(1).c = 'string';
a.b(1).e = [1 2 3];
a.b(2).c = 'string';
a.b(2).e = [1 2 3];

openvar a
%openvar a.b(2).e %Manually
a.b(2) = [];
a
1+1


I get the following at the console:


>> clear a

>> a.b(1).c = 'string';

>> a.b(1).e = [1 2 3];

>> a.b(2).c = 'string';

>> a.b(2).e = [1 2 3];

>> openvar a

>> a.b(2) = [];

>> a
error: a(2): out of bound 1

a =

  scalar structure containing the fields:

    b =

      scalar structure containing the fields:

        c = string
        e =

           1   2   3



>> 1+1
error: a(2): out of bound 1

ans =  2
>> error: a(2): out of bound 1


Notice all the "error: a(2): out of bound 1" statements printed at the console. I notice that similar "out of bound" messages can be seen in the images referenced in comment 3 as well, so they were obviously happening for him even though he said he didn't see any of the "out of bound" errors.


Marshall <marsian>
Mon 07 May 2018 05:58:54 PM UTC, comment #3: 

I've tried your examples here.  There are certainly some issues, but I don't see any type of "out of bound" error.  I'm seeing:

Example 1:  No errors visibly detected.

Example 2:  This one I can repeat.  I've included a screen shot of the end result (see example_2_screen_1_Screenshot_from_2018-05-07_12-31-06.png).

Out of curiosity, I wondered about the displayed "Variable a.b(2).e not found" in the Variable Editor, whether that would be the thing that is causing this, so I deleted that window and the message went away.  See the second attached screen shot (example_2_screen_2_Screenshot_from_2018-05-07_12-38-32.png).  So, it is the presence of that discarded variable in the Variable Editor that is causing this.  But I should note the first time that I had deleted the variable a.b(2).e in the Variable Editor I saw a bad error message dialog and debugging quit and Octave returned to the command line.

[
Here's an ancillary observation...  I didn't follow the example properly with the first attempt.  I created the function testConflict resident, not in a file.  Octave displays a dialog box about "testConflict does not exist" and should a file be created?  See the third attached screen shot (example_2_screen_3_Screenshot_from_2018-05-07_12-47-42.png).  This happens with each "dbcont" and also the editor is temporarily raised to the front.

So, the question is what should happen in this scenario?  I can say "Yes" and a blank file is then opened and this dialog box stops appearing with new "dbcont", but what state is Octave debugger in then since there is this resident function "testConflict" an empty file "testConflict" (not testConflict.m, but testConflict)?  It seems to me this behavior is somewhat arbitrary.
]

Example 3:  Definitely a crash, and it happens at the line


a.b(2).c = 'string';


i.e., when the variable a.b is expanded.  I see an "octave exited with signal 6".  The commands (sans "openvar a") do not crash in the CLI version of Octave.  But this is not a debug issue.  So I'll create another bug report for this crash bug.


Dan Sebald <sebald>
Mon 07 May 2018 04:15:46 PM UTC, comment #2: 

For a while, I couldn't get it to repeat the behavior on purpose on either of the two machines I have, but I finally got it. (Or at least similar errors).  This one is without debugging something:


clear a
a.b(1).c = 'string';
a.b(1).e = [1 2 3];
a.b(2).c = 'string';
a.b(2).e = [1 2 3];

openvar a
keyboard
%openvar a.b(2).e %Manually
%dbcont

a.b(2) = [];
%Now an error shows up on every line typed into the command prompt


This one gets it to happen in a debugging scenario (where I originally found the problem):


%testConflict.m
function a = testConflict(a)
    a.b(1).e .*= 2;
    a.b(1).e .+= 1;
endfunction



clear a
a.b(1).c = 'string';
a.b(1).e = [1 2 3];
a.b(2).c = 'string';
a.b(2).e = [1 2 3];

openvar a
keyboard
%openvar a.b(2).e %Manually
%dbcont

dbstop testConflict

q = a;
q.b(2) = [];

testConflict(q)

%Manually:
%dbstep
%dbstep



I also found a way to reliably crash octave:

clear a
a.b.c = 'string';
a.b.e = [1 2 3];

openvar a
keyboard
%openvar a.b.e %Manually
%dbcont


a.b(1).c = 'string';
a.b(1).e = [1 2 3];
a.b(2).c = 'string';
a.b(2).e = [1 2 3];


Marshall <marsian>
Fri 04 May 2018 10:22:13 PM UTC, comment #1: 

Provide a sequence of script code as an example, please.

Dan Sebald <sebald>
Fri 04 May 2018 09:48:39 PM UTC, original submission:  

I have found that when I have something opened in the variable editor, and then start debugging things, the command prompt keeps getting "out of bound" error messages every time I step through a function for every variable that is no longer in scope. This is distracting and redundant, since the "Variable ... not found" message is displayed in the variable editor. Can the error message please be removed from showing up in the command window when a variable editor variable is out of scope?

Marshall <marsian>

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-12 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2018-05-07 sebald Attached File- Added example_2_screen_1_Screenshot_from_2018-05-07_12-31-06.png, #44114
        Attached File- Added example_2_screen_2_Screenshot_from_2018-05-07_12-38-32.png, #44115
        Attached File- Added example_2_screen_3_Screenshot_from_2018-05-07_12-47-42.png, #44116

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code