bugGNU Octave - Bugs: bug #31254, recursion limit exceeded with...

 
 

bug #31254: recursion limit exceeded with defaultaxescreatefcn

Submitter:  John W. Eaton <jwe>
Submitted:  Tue 05 Oct 2010 04:52:48 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
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 18 Nov 2014 05:47:21 AM UTC, comment #4: 

Somewhere along the line this got fixed.  Closing report.

Rik <rik5>
Group administrator
Fri 14 Nov 2014 10:02:08 PM UTC, comment #3: 

I'm unable to reproduce this on default and for me it looks like this issue was fixed in the meanwhile. Can we close it?

Andreas Weber <andy1978>
Group Member
Thu 17 Oct 2013 06:05:34 PM UTC, comment #2: 

How does Matlab handle this?  I don't think they use gca in a callback, but are they also monitoring for recursion limits and breaking out of them?  If Matlab also has trouble with this code then maybe we can close this report as being more about the actual input code then Octave itself.

Rik <rik5>
Group administrator
Wed 09 Oct 2013 01:52:34 AM UTC, comment #1: 

Is it possible that the code is in error, rather than Octave?  The problem appears to be that using 'gca' within the callback function for 'defaultaxescreatefcn' causes infinite recursion.

I was looking at a Matlab example of a callback function and they specifically use 'gcbo' to get the handle of the object currently executing the callback.  If I make that substitution the code works properly.


  fcn = @(varargin) set (get (gcbo (), 'ylabel'), 'rotation', 0, 'horizontalalignment', 'right');
  set (0, 'defaultaxescreatefcn', fcn);
  ylabel (gca, 'y')


Rik <rik5>
Group administrator
Tue 05 Oct 2010 04:52:48 PM UTC, original submission:  

The following


  fcn = @(varargin) set (get (gca (), 'ylabel'), 'rotation', 0, 'horizontalalignment', 'right');
  set (0, 'defaultaxescreatefcn', fcn);


should set the default rotation and alignment for the y-axis label, but fails with


octave:3> ylabel (gca, 'y')
error: max_recursion_depth exceeded
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error:    at line -1, column -1
error: invalid graphics handle
error:   /home/jwe/src/octave/scripts/plot/axes.m at line 40, column 9
error:   /home/jwe/src/octave/scripts/plot/gca.m at line 45, column 9
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error:    at line -1, column -1
error: invalid graphics handle
...


John W. Eaton <jwe>
Group administrator

 

(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 andy1978 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (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-11-18 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2011-08-04 rik5 Carbon-CopyRemoved 72865 -
    2011-08-04 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code