bugGNU Octave - Bugs: bug #44915, Random error when printing Qt/fltk...

 
 

bug #44915: Random error when printing Qt/fltk figures

Submitted by:  Martin Kunz <mkunz>
Submitted on:  Fri 24 Apr 2015 09:26:12 AM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.0.0 Operating System:  Microsoft Windows

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)

Tue 06 Mar 2018 12:38:42 PM UTC, comment #18: 

I just tested like Martin in comment #17 and could observe anything wrong.

I'll close this report in absence of recent manifestations.

Pantxo Diribarne <pantxo>
Project Member
Tue 03 Jan 2017 01:21:47 PM UTC, comment #17: 

I ran the script from file #33754 under Octave 4.2.0 a couple of times manually and then 50 times in a for-loop. No error occured! The produced files look ok, too.
Meanwhile the driver for my graphics card is at version 15.20.1062.1003 (Catalyst 15.7.1), not sure if this made a difference.

From my point of view the report could be closed.

Martin Kunz <mkunz>
Fri 23 Dec 2016 11:04:52 PM UTC, comment #16: 

Is this issue still present with Octave 4.2.0 ?

(On my machine the code from the script file in comment #0 runs fine.)

Hartmut <hardy>
Tue 02 Jun 2015 04:46:01 PM UTC, comment #15: 

Retagging release from 4.0.0-rc3 to 4.0.0.

John W. Eaton <jwe>
Project Administrator
Wed 13 May 2015 06:06:23 PM UTC, comment #14: 

Following Comment #12:

Ugh! This is quite different from my experience.
Are you running Fedora? What level?
And, what level of qt and fltk?

I appear to have qt3 and
fltk-1.3.3-2.fc21.x86_64

Michael Godfrey <godfrey>
Project Member
Wed 13 May 2015 06:00:12 PM UTC, comment #13: 

John:  Right, I have not had printing problems in the
sense of corrupted data in the print file (almost always
PDF in my case).
My problems have been with crashes and cases where
nothing but an empty frame appeared in the PDF.

I have not seen the "missing data" in partially correct
print files that others have reported.  Are any of these
reports from Fedora systems?

I do not think that any (or at least many) of these reports
are regressions: they involve mainly qt and things that
not many users have experienced.  So, if necessary the 4.0
release could go ahead with some form of warning that
"there are system and configuration problems in the qt
and fltk graphics systems. Problems should be reported, but
in the meantime gnuplot may be used as it is less subject
to system-dependent problems."

It may, in any case, be a good idea to set
LIBGL_ALWAYS_INDIRECT=1 for both qt and fltk (it is anyhow
needed for remote access).

Separately, you asked about the version of qt on my system.
Nearly all of the qt packages say qt5, but I noticed in
my environment:
QTDIR=/usr/lib64/qt-3.3
QTINC=/usr/lib64/qt-3.3/include
QTLIB=/usr/lib64/qt-3.3/lib

This is probably due to: qt3-3.3.8b-63.fc21.x86_64
being installed.

Michael Godfrey <godfrey>
Project Member
Wed 13 May 2015 05:59:00 PM UTC, comment #12: 

Also, when I connect with ssh, no matter what settings I use, qt plotting segfaults Octave.

If I use fltk, then LIBGL_ALWAYS_INDIRECT=1 displays a black plot window.  LIBGL_ALWAYS_SOFTWARE=1 or no environment variable setting works for me.

If I try to print when using LIBGL_ALWAYS_INDIRECT=1 with fltk (black plot window), I get an apparently infinite series of

GL2PS warning: Unknown token in buffer

messages.

John W. Eaton <jwe>
Project Administrator
Wed 13 May 2015 05:36:28 PM UTC, comment #11: 

OK, so printing always seems to work for you?

The problem that's being reported to me by others is that printing is always screwed up, and my prior investigations were that the vertex data that gl2ps is getting from the OpenGL buffer is incorrect.

This printing error appears to be happening with fltk and OpenGL, so I don't think it is a threading issue because as I understand it, fltk doesn't run in a separate thread, but just processes events when readline is waiting for input.

So I'm back to having no clue what is going on.

John W. Eaton <jwe>
Project Administrator
Wed 13 May 2015 04:40:32 PM UTC, comment #10: 

First report on plot(1:10);

So far, the first error is with
export LIBGL_ALWAYS_SOFTWARE=1
and qt.

In this case the display on the screen is
not correct, but the foo.eps is. The screen
display has some lines and pieces missing.
But, rescaling the plot makes the "missing" lines
reappear, so this is a line-width X11 problem that has
been around for quite a while.

In all other cases both screen and print are correct.

Michael Godfrey <godfrey>
Project Member
Wed 13 May 2015 04:14:04 PM UTC, comment #9: 

Michael (or anyone who is able to reproduce some plotting or graphics printing problems):

Could you test the following on your system for qt and fltk graphics using no LIBGL_XX environment variable, LIBGL_ALWAYS_INDIRECT=1, and LIBGL_ALWAYS_SOFTWARE=1?

plot (1:10);
print -depsc foo.eps

and see whether the printed version of the plot is correct?  I have other people reporting that the EPS file is not right.  Instead of a line running from (1,1) to (10,10), the line starts at either (2,2) or (3,3), possibly randomly and forcing indirect or software rendering doesn't seem to be helping.  At least this is a problem with the qt widgets, I'm not sure about fltk.  And they say it works properly with an older 3.8.2 build.  Gah!

John W. Eaton <jwe>
Project Administrator
Tue 12 May 2015 09:03:32 PM UTC, comment #8: 

Running directly on HG 6000:

Results are nearly the same, but as expected,
using qt and LIBGL_ALWAYS_SOFTWARE=1 produces
incorrect plot(lines incomplete or missing)

Using LIBGL_ALWAYS_INDIRECT=1 and qt, plots
look OK!

So, at least for my environment (FC21 x86_64,
Intel 5000/6000 graphics), LIBGL_ALWAYS_INDIRECT=1
is the right choice.

Michael Godfrey <godfrey>
Project Member
Tue 12 May 2015 08:46:56 PM UTC, comment #7: 

John,

Using ssh and fltk and qt, the following:

LIBGL_ALWAYS_INDIRECT=1   seems to work correctly

LIBGL_ALWAYS_SOFTWARE=1   also seems to nearly work correctly,
                          but appears more slowly and the plotted
                          data line thicknesses seem
                          wrong (too  wide).
so, LIBGL_ALWAYS_INDIRECT=1 may be the better choice.

Using LIBGL_DRI3_DISABLE=1 the following messages
appear:
libGL error: failed to authenticate magic 28
libGL error: failed to load driver: i965
==============
These do not appear for the other env vars.

I will see what happens running directly om Intel HD 6000

Michael Godfrey <godfrey>
Project Member
Tue 12 May 2015 08:08:43 PM UTC, comment #6: 

Instead of setting LIBL_DRI3_DISABLE, does it also work to set LIBGL_ALWAYS_INDIRECT=1?  What about LIBGL_ALWAYS_SOFTWARE=1?

John W. Eaton <jwe>
Project Administrator
Tue 12 May 2015 07:29:47 PM UTC, comment #5: 

Bug #44916 and this one might have the same cause, but from the user's perspective they are quite different:
If #44915 occurs, the user gets an error message and no output file is generated.
In the case of #44916 there is no error message, but the files produced are faulty.

However, as both bugs occur only on one of my systems a common cause is very likely.

Martin Kunz <mkunz>
Tue 12 May 2015 03:42:48 PM UTC, comment #4: 

John:
Check what I said in bug 45928.

There is definitely more than one problem.
From what I could test, nearly all fltk problems are resolved by use of:
export LIBGL_DRI3_DISABLE=1

The qt problems that I see are separate and do not happen with
fltk. 

This is under Fedora 21 only, but I hope it helps.

Michael

Michael Godfrey <godfrey>
Project Member
Tue 12 May 2015 03:18:45 PM UTC, comment #3: 

If it is not a bug in the driver, then I need some clues as to how to call the OpenGL libraries correctly to avoid this issue.

If it is a driver bug, then I need some clues about how to call the OpenGL libraries to avoid the driver problems.

Either way, I'm not sure what to do.  I've tried setting the Qt flag that is supposed to control hardware vs. software rendering and I still experience segfaults when plotting and others report that graphics simply hangs.  I have no idea how to avoid these problems.

John W. Eaton <jwe>
Project Administrator
Tue 12 May 2015 03:12:13 PM UTC, comment #2: 

Do we need both this report and https://savannah.gnu.org/bugs/?44916 ?  Aren't they really the same issue, that printing plots with OpenGL doesn't work correctly?

John W. Eaton <jwe>
Project Administrator
Tue 12 May 2015 02:34:33 PM UTC, comment #1: 

In the discussion of bug #44916 the possibility of driver issues came up. Windows 7 reported that the drivers for my ATI Radeon HD5450 were up to date, but by installing the latest Catalyst Software Suite manually they were updated from 9.12.0.0 to 14.501.1003.0 . With the new driver installed, I ran plotTestQtGhostscript.m again (now under Octave 4.0.0-rc4) - with basically the same result as before:

>> clear all, close all
>> plotTestQtGhostscript
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_
push   1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   1934   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop
.runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1197/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:40/64(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_
push   1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   1934   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop
.runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1198/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:39/64(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_
push   1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   1934   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop
.runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1197/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:40/64(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_
push   1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   1934   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop
.runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1198/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:39/64(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1

The fact that two very different driver versions yield the same result could indicate that this is not a driver issue.

Martin Kunz <mkunz>
Fri 24 Apr 2015 09:26:12 AM UTC, original submission:  

I am using Octave 4.0.0-rc3 from ftp://alpha.gnu.org/gnu/octave/ under Windows 7 64bit. Trying to save a figure with the attached script plotTestQtGhostscript.m repeatedly, I randomly do or do not get errors. See the output sample below with the sequence <error>,<works>,<works>,<works>,<works>,<works>,<works>,<error>. Using the fltk toolkit yields similar results.

>> clear all, close all
>> plotTestQtGhostscript
warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: called from
    __print_parse_opts__ at line 382 column 9
    print at line 292 column 8
    plotTestQtGhostscript at line 11 column 1
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   1934   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2
--nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1197/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:40/64(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--   72.8   400.5   1   1   1
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   1934   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2
--nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1198/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:39/64(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript

>> plotTestQtGhostscript
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   1934   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2
--nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1197/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:40/64(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   1934   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2
--nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1198/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:40/64(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1

>>

Martin Kunz <mkunz>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33754:  plotTestQtGhostscript.m added by mkunz (245B - text/plain)

 

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 hardy (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mkunz (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-06 pantxo StatusNone => Works For Me
        Open/ClosedOpen => Closed
    2015-06-02 jwe Release4.0.0-rc3 => 4.0.0
    2015-04-24 mkunz Attached File- => Added plotTestQtGhostscript.m, #33754

    Back to the top


    Powered by Savane 3.5