bugGNU Octave - Bugs: bug #41216, epslatexstandalone not working for...

 
 

bug #41216: epslatexstandalone not working for fltk backend with 'visible' = 'off'

Submitted by:  Marco Caliari <caliari>
Submitted on:  Mon 13 Jan 2014 10:39:25 AM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: DuplicateAssigned to: None
Originator Name: caliariOpen/Closed: Closed
Release: 3.8.0Operating 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)

Thu 27 Mar 2014 07:32:19 AM UTC, comment #13:

Bug # 41957 may also be relevant

Michael Godfrey <godfrey>
Project Member
Thu 27 Mar 2014 06:49:42 AM UTC, comment #12:

Closing this duplicate of bug #33180.

Mike Miller <mtmiller>
Project Administrator
Fri 17 Jan 2014 04:57:56 PM UTC, comment #11:

I think you can get what you want by using a project-specific .octaverc file. In the directory where you are doing your work, make a new file ".octaverc" and put whatever commands you want in it. In this case, put the command

You can read about it in the documentation, but Octave runs the global .octaverc file, the personal .octaverc file (~/.octaverc), and then the project-specific .octaverc file so these local changes will override your more general settings.

The other solution is to make the figures visible before printing.

Rik <rik5>
Project Administrator
Fri 17 Jan 2014 08:03:42 AM UTC, comment #10:

OK, thank you very much.
Then, suppose I have to run several instances of

inside a Makefile, I have to put a

on top of each file?.m, I don't see an option to directly start octave with gnuplot.

Marco

Marco Caliari <caliari>
Project Member
Thu 16 Jan 2014 04:44:20 PM UTC, comment #9:

Good debugging. Unfortunately you've traced it down to a known problem. There is no off-screen printing for FLTK. The figure window needs to be visible for gl2ps to function. See bug #33180. It also bites us when producing the documentation, which some people want to do on headless build machines, so we're forced into using gnuplot for the pictures in the manual. It's very uncertain when this will get fixed.

Rik <rik5>
Project Administrator
Thu 16 Jan 2014 09:41:29 AM UTC, comment #8:

Hi,

it seems now I have an example always failing, with or without sleep(1)

If I remove the line set(f,'visible','off'), then (today) it always works. With the line, it works with gnuplot.

Marco

Marco Caliari <caliari>
Project Member
Wed 15 Jan 2014 06:48:57 PM UTC, comment #7:

The drawnow function is written in C++ and it uses the gl2ps library to take the plot (OpenGL) and convert it to Postscript. It then seems to pass the resulting data on to whatever the pipeline command is via a call to system().

I would put a

statement just above the call to drawnow() in _fltk_print_.m. That will drop you into the debugger and you can inspect the pipeline command to see if it looks appropriate.

I know one difference is that most output formats have a single gl2ps device and a single pipeline command. The 'standalone' output formats, instead, run OpenGL two times and with possibly two different pipeline commands.

Rik <rik5>
Project Administrator
Wed 15 Jan 2014 08:08:18 AM UTC, comment #6:

Hi Rik,

today it is always working, with or without the sleep(1) command.
Is there an easy way to know what the command

is really doing? Calling ghostscript, epstool, ...?

Thanks,

Marco

Marco Caliari <caliari>
Project Member
Tue 14 Jan 2014 07:04:08 PM UTC, comment #5:

Well there is something interesting going on. I ran

and it always passes. Whatever it is doesn't seem to affect my machine.

What happens if you put the sleep(1) command just before line 651 of print.m so it reads

Rik <rik5>
Project Administrator
Tue 14 Jan 2014 02:21:48 PM UTC, comment #4:

sleep(1) does not solve the intermittent result. But, even without sleep(1), the following

rm -rf test.tex test-inc.eps && octave

that is the two commands on the same line always works (well, 10 consecutive times, never happened before).

Marco

Marco Caliari <caliari>
Project Member
Tue 14 Jan 2014 01:19:56 PM UTC, comment #3:

Take a look at the file private/__fltk_print__.m at the bottom near line 170. There is the following:

The intermittent failure seems to point to a race condition. The drawnow call actually uses gl2ps to create the output and then pipes it through a command that might include ghostscript or epstool.

To confirm that it is a race condition you might want to add a 'sleep (1)' call just before opts.latex_standalone (opts). If that works repeatedly then we can sort out a better solution.

Rik <rik5>
Project Administrator
Tue 14 Jan 2014 07:59:38 AM UTC, comment #2:

With the option -f, it sometimes works, in a quite random way.
Maybe it randomly works without that option, too.
When it does not work, it is because at l.651 of print.m the output file is supposed to exist. I cannot find where the output file is created before to be opened for reading.

Marco

Marco Caliari <caliari>
Project Member
Mon 13 Jan 2014 04:48:52 PM UTC, comment #1:

Might be something odd with your setup as this works for me with 3.8.0. I'm running Kubuntu12.04.

I ran

I used the '-f' switch to avoid loading any Octave configuration files that might be changing settings.

Rik <rik5>
Project Administrator
Mon 13 Jan 2014 10:39:25 AM UTC, original submission:

Dear all,

the following

gives me

while working with 3.6.2.

Cheers,

Marco

Marco Caliari <caliari>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by caliari (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 27 Mar 2014 06:49:42 AM UTCmtmillerOpen/ClosedOpen=>Closed
    Thu 16 Jan 2014 04:45:04 PM UTCrik5Item GroupRegression=>Incorrect Result
      Dependencies-=>Depends on bugs #33180
    Thu 16 Jan 2014 04:44:20 PM UTCrik5StatusWorks For Me=>Duplicate
      Summaryepslatexstandalone not working for fltk backend=>epslatexstandalone not working for fltk backend with 'visible' = 'off'
    Mon 13 Jan 2014 04:48:52 PM UTCrik5StatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1