bugGNU Octave - Bugs: bug #42822, index error in...

 
 

bug #42822: index error in graphics.cc:patch::properties::update_fvc

Submitter:  Andreas Weber <andy1978>
Submitted:  Tue 22 Jul 2014 07:25:59 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 22 Jul 2014 10:15:29 PM UTC, comment #3: 

I can confirm that the changeset you pushed does fix the error message.

Rik <rik5>
Group administrator
Tue 22 Jul 2014 10:11:11 AM UTC, comment #2: 

Pushed a cset here http://hg.savannah.gnu.org/hgweb/octave/rev/5bfedd39cc77

I would like to let his "Ready for Test" until bug #42823 which is related is fixed.

Andreas Weber <andy1978>
Group Member
Tue 22 Jul 2014 09:53:16 AM UTC, comment #1: 

demo pie and ribbon has another problem in surface::properties::update_normals. Bug #42823

Andreas Weber <andy1978>
Group Member
Tue 22 Jul 2014 07:25:59 AM UTC, original submission:  

Since changeset df972b9d080a "Translate patch property listeners to C++ (bug #42159)" the demos

area 1, copyobj 2, legend 18, legend 19, legend 35, pie3 1, pie3 2, pie3 3, ribbon 1 fail with A(I,J): row index out of bounds; value 2 out of bound 1 or A(I,J): column index out of bounds; value 3 out of bound 2

when configured and built with "./configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g --enable-bounds-check" without "--enable-bounds-check" there is no error.

A minimalistiv testcase:

octave:1> area([0;1;0])
octave:2> legend('a')
error: __go_patch__: A(I,J): row index out of bounds; value 2 out of bound 1
error: called from:
error:   /home/andy/src/octave-default-dbg-build/../octave-src/scripts/plot/draw/private/__patch__.m at line 189, column 7
error:   /home/andy/src/octave-default-dbg-build/../octave-src/scripts/plot/draw/patch.m at line 87, column 16
error:   /home/andy/src/octave-default-dbg-build/../octave-src/scripts/plot/appearance/legend.m at line 885, column 20


The problem in in graphics.cc:patch::properties::update_fvc


  octave_idx_type nr = xd.rows ();
  octave_idx_type nc = xd.columns ();
  if (nr == 1 && nc > 1)
    {
      nr = nc;
      nc = 1;
      xd = xd.transpose ();
    }

...
  octave_idx_type kk = 0;
  for (octave_idx_type jj = 0; jj < nc; jj++)
    {
      for (octave_idx_type ii = 0; ii < nr; ii++)
        {
          vert(kk,0) = xd(ii,jj); <-- xd got transposed
          vert(kk,1) = yd(ii,jj); <-- yd not, index error


where xd got transposed but yd not. Therefore yd(ii,jj) triggers an indexing error.

Andreas Weber <andy1978>
Group Member

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by andy1978 (Author of cset df972b9d080a)
  • -email is unavailable- added by andy1978 (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-23 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-07-22 andy1978 StatusNone Ready For Test
    2014-07-22 andy1978 Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code