[changeset] - bug and fix for surfnorm()

Ben Abbott bpabbott at mac.com
Mon Oct 20 20:39:18 CDT 2008


On Oct 20, 2008, at 11:40 AM, John W. Eaton wrote:

> On 20-Oct-2008, David Bateman wrote:
>
> | John W. Eaton wrote:
> | > On 20-Oct-2008, Ben Abbott wrote:
> | >
> | > | The reason I was concerned about the old state was for a  
> special case
> | > | where oldh==h and an error occurred after "hold on". In such  
> an event,
> | > | I thought it appropriate to restore oldh to its original hold  
> state.
> | > |
> | > | Does that make sense, or have I missed something that makes  
> such an
> | > | event impossible?
> | >
> | > I think that is handled by my change because the code in the
> | > undwind_protect_cleanup block is always executed.
> | >
> | >
> | >
> |
> | I added a couple of other changesets after this, and we appear to  
> get
> | through all of the tests with rundemos, except occasionally  
> "quiver3"
> | appears to fail with an invalid handle.. Don't understand this one  
> yet..
>
> Starting a fresh Octave session and doing
>
>  demo quiver3
>  demo quiver3
>  ...
>
> seems to work fine for me.  However, starting a fresh session and
> running
>
>  demo plotyy
>  demo quiver3
>
> seems to fail each time.
>
> jwe

In plotyy I see the subfunction ...

193 function deleteplotyy (h, d, ax2, t2)
194   if (ishandle (ax2) && strcmp (get (ax2, "type"), "axes") &&
195       (isempty (gcbf()) || strcmp (get (gcbf(),  
"beingdeleted"),"off")) &&
196       strcmp (get (ax2, "beingdeleted"), "off"))
197     set (t2, "deletefcn", []);
198     delete (ax2);
199   endif
200 endfunction

Shouldn't this be

193 function deleteplotyy (ax2, t2)
194   if (ishandle (ax2) && strcmp (get (ax2, "type"), "axes") &&
195       (isempty (gcbf()) || strcmp (get (gcbf(),  
"beingdeleted"),"off")) &&
196       strcmp (get (ax2, "beingdeleted"), "off"))
197     set (t2, "deletefcn", []);
198     delete (ax2);
199   endif
200 endfunction

For me this does not fix the errors, but does illuminate new ones.

Ben





More information about the Bug-octave mailing list