bugGNU Octave - Bugs: bug #42458, fltk print doesn't produce file if...

 
 

bug #42458: fltk print doesn't produce file if window is minimized in XFCE or LXDE

Submitted by:  Andreas Weber <andy1978>
Submitted on:  Thu 29 May 2014 11:39:56 AM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: Andreas Weber <andy1978>
Originator Name: Open/Closed: Closed
Release: 3.8.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 26 Jul 2014 08:25:54 AM UTC, comment #11:

This is fixed with cset c9f960441513 (http://hg.savannah.gnu.org/hgweb/octave/rev/c9f960441513) in the default branch.

Bens' print problem is also solved with glFlush ()
http://hg.savannah.gnu.org/hgweb/octave/rev/c9f960441513#l1.39

Closing report

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Wed 23 Jul 2014 06:14:15 PM UTC, comment #10:

On MacOS X, I can confirm that I'm able to print when the figure window is minimized and I've built Octave using fltk_overhaul.diff.

However, if the plot only contains line objects, the lines do not show up.

The result is attached.

(file #31766)

Ben Abbott <bpabbott>
Project Member
Wed 23 Jul 2014 05:44:37 PM UTC, comment #9:

The reason for this is different to bug #33180.

In this case it's because print_mode is set and the actually printing routine is called inside OpenGL_fltk::draw() which isn't called if the window is minimized.

The fltk_overhaul.diff here http://octave.1599824.n4.nabble.com/Overhaul-FLTK-toolkit-resize-redraw-functions-tp4665662.html will fix this.

I reopen this bug until the patch is applied to default.

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Thu 29 May 2014 03:49:52 PM UTC, comment #8:

Yes, all the same basic problem that GL2PS cannot print an OpenGL buffer that is not rendered as described by Ben in comment #5. Thanks for confirming, this is already closed as a duplicate, I'll do the same for bug #40215.

Mike Miller <mtmiller>
Project Administrator
Thu 29 May 2014 03:45:36 PM UTC, comment #7:

I can confirm that with XFCE4, the Map State turns to "IsUnMapped" if either minimized or moved to a different virtual desktop.

So I think this one, #40215 and #33180 all have the same origin, right?

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Thu 29 May 2014 03:11:18 PM UTC, comment #6:

Thanks Andy, I can confirm this also with GNOME 2.

I think the key is to look at the "map_state" attribute of an X window. You can view this from the command line with

where WINDOWID is the hex window identifier of the figure. You can in turn get the ID with something like

after the figure is opened and visible.

I see that attribute go to IsUnmapped using GNOME 2 when the figure is either minimized or moved to another virtual desktop. When I get a chance to test current GNOME 3 again, I suspect it will stay IsViewable, and printing to a file does work there.

If you can confirm with XFCE and LXDE that the attribute goes to IsUnmapped when a figure is either minimized or moved to another viewport, then it looks like it's all the same symptom. In which case, I'll add that information to bug #33180 and that can be the one bug to track being able to print an unrendered plot.

Mike Miller <mtmiller>
Project Administrator
Thu 29 May 2014 02:36:55 PM UTC, comment #5:

GL2PS works by capturing the contents of the OpenGL feedback buffer (http://www.geuz.org/gl2ps/#tth_sEc5).

My understanding is that this means the OpenGL figure must be rendered, and I assume that whether or not this happens depends upon the operating system, and/or window manager. If the virtual desktop is not rendered when it is not visible, then I don't think the print() command will function. If the OpenGL figure isn't rendered when it is minimized, then I don't think the print() command will function.

Ben Abbott <bpabbott>
Project Member
Thu 29 May 2014 02:18:09 PM UTC, comment #4:

Yes, I'm unable to print a plot with fltk toolkit in XFCE if the window is either minimized or on a different virtual desktop.

The LXDE test was made by a friend.

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Thu 29 May 2014 02:02:32 PM UTC, comment #3:

Bug #40215 was about a plot on a different virtual desktop, not about a minimized window. When a window is on a different virtual desktop or viewport, whatever the preferred terminology, it is typically still mapped and visible (even though not visible to the user). However, different window managers may interact with X in different ways to produce the same results of minimization and virtual desktops.

Are you saying you are also unable to print a plot on a different virtual desktop in XFCE and LXDE, as well as when a window is minimized?

Mike Miller <mtmiller>
Project Administrator
Thu 29 May 2014 01:47:51 PM UTC, comment #2:

And why does this not happen with gnome or, as I read from 40215, with KDE?

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Thu 29 May 2014 01:22:01 PM UTC, comment #1:

To print with the OpenGL based graphics toolkits, the figure must be visible. This is essentially the same problem as for 33180.

https://savannah.gnu.org/bugs/index.php?33180

Ben Abbott <bpabbott>
Project Member
Thu 29 May 2014 11:39:56 AM UTC, original submission:

Run this

You will see a fltk window with title "Figure 1" and test.png is created. Then minimize the window and run again. This time test.png isn't created. If you now restore or maximize the figure window you might notice a slight delay and test.png gets created.

I've tested this in debian wheezy, xfce 4.8.0.3, Octave 3.8.1 and a current dev build (79f69742971a). A friend was also able to reproduce this with LXDE but not with gnome.

I think this could also be related to bug http://savannah.gnu.org/bugs/?40215

Any ideas what I could test further to track down this?

libgl2ps0 is 1.3.6-1

Andreas Weber <andy1978>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #31766:  junk.pdf added by bpabbott (3KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by andy1978 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 26 Jul 2014 08:25:54 AM UTCandy1978StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Wed 23 Jul 2014 06:14:15 PM UTCbpabbottAttached File-=>Added junk.pdf, #31766
    Wed 23 Jul 2014 05:44:59 PM UTCandy1978DependenciesRemoved dependancy to bugs #33180=>-
    Wed 23 Jul 2014 05:44:37 PM UTCandy1978StatusDuplicate=>Patch Submitted
      Assigned toNone=>andy1978
      Open/ClosedClosed=>Open
    Thu 29 May 2014 01:28:00 PM UTCmtmillerOpen/ClosedOpen=>Closed
      Dependencies-=>Depends on bugs #33180
    Thu 29 May 2014 01:22:01 PM UTCbpabbottStatusNone=>Duplicate

    Back to the top


    Powered by Savane 3.1-cleanup1