octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #42823] index error in surface::properties::up


From: Andreas Weber
Subject: [Octave-bug-tracker] [bug #42823] index error in surface::properties::update_normals
Date: Tue, 22 Jul 2014 09:50:50 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Iceweasel/30.0

URL:
  <http://savannah.gnu.org/bugs/?42823>

                 Summary: index error in surface::properties::update_normals
                 Project: GNU Octave
            Submitted by: andy1978
            Submitted on: Di 22 Jul 2014 09:50:49 GMT
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

A current dev (ed3cb9f81145) build with debugging enabled
./configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g --enable-bounds-check

fails with surface (or demo pie3 or demo ribbons)

[xx,yy]=meshgrid(0:0.1:0.2,0.5:0.1:0.6);
zz = xx+yy*2;
surface(xx,yy,zz)

error: __go_surface__: A(I,J): row index out of bounds; value 3 out of bound
2
error: called from:
error:  
/home/andy/src/octave-default-dbg-build/../octave-src/scripts/plot/draw/surface.m
at line 187, column 5
error:  
/home/andy/src/octave-default-dbg-build/../octave-src/scripts/plot/draw/surface.m
at line 60, column 19
error: drawnow: A(I,J): row index out of bounds; value 3 out of bound 2


The indexing comes from surface::properties::update_normals at
../../octave-src/libinterp/corefcn/graphics.cc:8132 (comment says lower right
quadrangle)

I've added output of x,y,z at the top of update_normals. As you can see
update_normals is first called with real xdata and defaults for ydata and
zdata (see default_surface_ydata).
After this update_normals is called again with real xdata and ydata and this
time the indexing problem occours because x and y are 2x3, z is 3x3 (I suppose
a third call with real zdata would follow)


octave:8> surface(xx,yy,zz)
x= 0 0.1 0.2
 0 0.1 0.2

y= 1 1 1
 2 2 2
 3 3 3

z= 1 0 0
 0 1 0
 0 0 1

x= 0 0.1 0.2
 0 0.1 0.2

y= 0.5 0.5 0.5
 0.6 0.6 0.6

z= 1 0 0
 0 1 0
 0 0 1

error: __go_surface__: A(I,J): row index out of bounds; value 3 out of bound
2


I don't fully gasp the logic behind "update_normals" so I would be pleased if
someone other could fix this.

-- Andy




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42823>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]