bugGNU Octave - Bugs: bug #54797, getframe fails with consecutive...

 
 

bug #54797: getframe fails with consecutive figures

Submitter:  Juan Pablo Carbajal <juanpi>
Submitted:  Sat 06 Oct 2018 12:28:30 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  juanpi Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 06 Oct 2018 03:41:19 PM UTC, comment #1: 

Closing report as fixed by the following cset:

http://hg.savannah.gnu.org/hgweb/octave/rev/bb9fcc452580

Pantxo Diribarne <pantxo>
Group Member
Sat 06 Oct 2018 12:28:30 PM UTC, original submission:  

The following code


n = 10000;
for i=1:4
    figure(i)
    plot (randn(n,1), randn(n,1), '.')
endfor

for i=1:4
    figure(i)
    set (gcf, 'units', 'normalized', 'position', [0 0 0.9 0.9]);
    drawnow
    imwrite (frame2im (getframe (gcf)), sprintf("/tmp/tstfig-%d.png", i));
endfor


gives


warning: called from
    getframe at line 102 column 11
warning: opengl_renderer: Error 'invalid value' (1281) occurred
drawing 'line' object


and the images are empty.

Pantxo found a workaround by modifying the figure resize command to


set (gcf, 'units', 'normalized', 'position', [0 0 0.9 0.9], 'units','pixels');


Juan Pablo Carbajal <juanpi>
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 pantxo (Posted a comment)
  • -email is unavailable- added by juanpi (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-06 pantxo CategoryPlotting Plotting with OpenGL
        StatusConfirmed Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code