bugGNU Octave - Bugs: bug #33180, Print command in fltk not working...

 
 

bug #33180: Print command in fltk not working for figure with visible = "off"

Submitter:  foehler <foehler>
Submitted:  Fri 29 Apr 2011 02:00:49 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  andy1978
Originator Name:  foehler Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 15 Feb 2015 03:15:26 PM UTC, comment #13: 

Solution works.  Closing report.

Rik <rik5>
Group administrator
Sat 14 Feb 2015 05:02:58 AM UTC, comment #12: 

Works for me: fedora 21 OSMesa-10.4.3-1

Thanks!!

Michael Godfrey <godfrey>
Group Member
Sat 14 Feb 2015 01:11:49 AM UTC, comment #11: 

Working for me with OSMesa 10.3.2 (no surprise).

The doc/interpreter images are now being built with fltk, very cool. One note: the "extended" image contains TeX markup, which does not display properly due to bug #42320. This image is explicitly there to demonstrate TeX markup working properly. So before the release, either bug #42320 should be fixed or cset 1170c849952b should be reverted.

Can you say what is required about OSMesa 9.0.0? A specific API call? Some bug in earlier versions of OSMesa? What will happen if I try to use this new capability with an older version?

Mike Miller <mtmiller>
Group Member
Fri 13 Feb 2015 04:26:52 PM UTC, comment #10: 

With cset 59ad278cfb98, the OpenGL graphic toolkits FLTK and Qt can now use OSMesa for offscreen rendering if the figure's "visible" property is "off".

This needs OSMesa >= 9.0.0, on Debian Jessie "libosmesa6-dev".

Andreas Weber <andy1978>
Group Member
Tue 15 Jul 2014 07:29:54 PM UTC, comment #9: 

I would like to echo Moreno's comments. Being forced to use GnuPlot is an acceptable choice but if GnuPlot is ever dropped, this is something that will need to be addressed. I have a multitude of scripts where the Octave window is hidden so that they don't interfere with the user's console.

Ian Journeaux <ijourneaux>
Fri 30 May 2014 03:41:12 AM UTC, comment #8: 

Confirmed that GNOME 3 does not unmap windows that are minimized or moved to another workspace. So the effect of minimizing or moving a window to an alternate virtual desktop does depend on which window manager or desktop environment you are using.

Mike Miller <mtmiller>
Group Member
Thu 29 May 2014 04:03:25 PM UTC, comment #7: 

Some additional information for this bug. It also affects figures that are visible from Octave's perspective but have been put into the "unmapped" state in X windows terminology.

Some desktop environments or window managers unmap a window when it is minimized or when it is on a virtual desktop that is not currently visbile. Some environments appear to keep the window mapped. On bug #40215 and bug #42458 we have confirmed that GNOME 2 (metacity WM), LXDE, and XFCE all unmap windows when they are either minimized or placed on a different virtual desktop.

So it appears that gl2ps is also unable to render an image from an OpenGL buffer in an unmapped X window.

Mike Miller <mtmiller>
Group Member
Tue 13 May 2014 07:04:08 PM UTC, comment #6: 

I believe that the fact that this bug is difficult to solve is not a valid reason to demote this report as a "feature request". As noted in some other comments, submitting Octave jobs to remote batch scheduler is a perfectly valid use case, and is quite common in some scientific communities where long-running computations are normal. I myself make heavy use of the possibility to print plots that are made invisible with the

figure(1,"visible","off");

command, so that I can automate the compilation of LaTeX documents with embedded graphics using a makefile, pretty much as the Octave documentation is produced.

So far I'm perfectly fine with forcing the gnuplot backend. However, if fltk is ever going to replace gnuplot, this bug should be addressed.

I suggest to change the item group to "incorrect result"; this is really a bug, not a new feature.

Moreno Marzolla.

Anonymous
Wed 28 Mar 2012 06:27:54 PM UTC, comment #5: 

Another observation (reported by by Ian Journeaux) is that for fltk and for win XP SP3, mingw octave-3.6.1, if the figure window is visible but completely "covered" by another window, a print does not generate the graphics file. Whenever the "covering" is drugged such that at least some portion of the figure is visible, the graphics file is immediately generated.

There is no such problem on my second system - win7 X64 !

Nitzan

Nitzan Arazi <nitnit>
Sat 18 Feb 2012 01:21:29 AM UTC, comment #4: 

As long as Octave uses gl2ps, the figure must be displayed in order to capture the OpenGL content and render an image.

I'm changing the status to Postponed.

Ben Abbott <bpabbott>
Group Member
Fri 17 Feb 2012 01:41:06 AM UTC, comment #3: 

The crashing part has been fixed. Changing the summary.

Ben Abbott <bpabbott>
Group Member
Sat 30 Apr 2011 04:46:43 PM UTC, comment #2: 

I agree that off screen plotting may not be that useful(I didn't think about the X server requirement) and that off-screen openGL is tricky.

Concerning that last bit, off-screen openGL could be replaced by a proper 3D file output (from the OpenGL objects). An external renderer, such as Blender, Yafray (...) could be then used to render the graphics.

Concerning the bug report, I think that even if the print command doesn't print it should not mess up the object so that the next 'visible'  = 'on' command fails.
(it is not the print that fails but the set cmd, calling to display again). At best print when "visible"="off" should do nothing harmful.

So I would consider it a (very minor) "bug report", coupled with a large "feature request" :-)


foehler <foehler>
Fri 29 Apr 2011 02:37:52 PM UTC, comment #1: 

Offscreen plotting with OpenGL isn't a simple problem. The only way I've seen of handling this in a GNU/Linux environment is with mangled mesa. There is something now on osmesa, but as you see, the developers want patches for it for non-GNU systems:

     http://www.mesa3d.org/osmesa.html

This isn't a simple bug you're reporting, but a comprehensive feature request. Also, with OpenGL offscreen plottiing may be a little  less useful than you think: even if it's offscreen, OpenGL implementations still rely on the acceleration provided by an X server, so you would still need to have an X server installed and running if you want to do a lot of offscreen rendering remotely.

If you or anyone else knows something about offscreen plotting with OpenGL, it would be very useful to have that help.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Fri 29 Apr 2011 02:00:49 PM UTC, original submission:  

The print command using fltk toolkits doesn't work on 'visible'='off' figure while it works using the gnuplot toolkit


graphics_toolkit fltk;

x = rand(3);
plot (x)
print (gcf,"test_visible.png","-dpng")
set (gcf,'visible','off')

print (gcf,"test_invisible.png","-dpng")
set (gcf,'visible','on')


leads to

error: gl2ps-renderer: fdopen failed

after the  " set (gcf,'visible','on') " command.

The print command on the "invisible" figure does not produce any file (not even a white .png).

the same code without -dpng produce a "test_invisible.ps" but it is a white page.


- Remark :
It may seem strange to want to print figure without seeing them but it is quite handy in a loop where you want to produce images for example.
-

Could someone confirm this ?

Regards,
 Fab.

foehler <foehler>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by ijourneaux (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by nitnit (Posted a comment)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by foehler (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 20 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-15 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2015-02-13 andy1978 StatusPostponed Ready For Test
        Assigned toNone andy1978
    2015-02-03 mtmiller Dependencies- bugs #36943 is dependent
    2014-12-28 rik5 Dependencies- bugs #36983 is dependent
    2014-10-22 pantxo Dependencies- bugs #43429 is dependent
    2014-07-26 andy1978 DependenciesRemoved dependency from bugs #40215 -
    2014-07-23 andy1978 DependenciesRemoved dependency from bugs #42458 -
    2014-07-02 mtmiller Dependencies- bugs #42663 is dependent
    2014-05-29 mtmiller Dependencies- bugs #40215 is dependent
    2014-05-29 mtmiller Dependencies- bugs #42458 is dependent
    2014-01-16 rik5 Dependencies- bugs #41216 is dependent
    2012-02-18 bpabbott StatusConfirmed Postponed
    2012-02-17 bpabbott Release3.4.0 dev
        Operating SystemGNU/Linux Any
        SummaryPrint command in fltk not working on &quot;unvisible&quot; figure and then crashing Print command in fltk not working for figure with visible = "off"
    2011-05-16 rik5 Dependencies- bugs #33321 is dependent
    2011-04-29 jordigh Item GroupIncorrect Result Feature Request
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.14-8aba.
    Corresponding source code