bugGNU Octave - Bugs: bug #55529, [MXE Octave] running...

 
 

bug #55529: [MXE Octave] running compare_plot_demos ("toolkits", "qt") hangs Octave

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Sun 20 Jan 2019 06:22:06 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  None Assigned to:  None
Originator Name:  Avinoam Open/Closed:  Closed
Release:  5.0.90 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 05 Feb 2019 10:39:39 PM UTC, comment #16: 

@Avinoam: Thanks.

Pantxo Diribarne <pantxo>
Project Member
Tue 05 Feb 2019 10:31:51 PM UTC, comment #15: 

I have opened bug #55649, you can close this one.
Thanks.

Avinoam Kalma <avinoam>
Project Member
Tue 05 Feb 2019 10:23:10 PM UTC, comment #14: 

@Dmitri: I posted a more specific bug report about the issue with "demo hold 6": bug #55647

@Avinoam: I'd like to close this report so that we can cross it on the bug fix list.
In the end the original problem is that Octave has issues when printing using proprietary "Intel HD Graphics 4600" opengl driver. Can you file a new report? Since the official mxe build uses MESA by default, this would be a feature request to allow Octave to use other opengl drivers on Windows?

Pantxo Diribarne <pantxo>
Project Member
Fri 01 Feb 2019 10:36:11 AM UTC, comment #13: 

@Dmitri: Yes, it looks like epstool cropping utility does not do well will huge amounts of possibly corrupted triangles, so either eliminating bad triangles ("axis auto") or not using epstool ("-loose") solves the issue.

Pantxo Diribarne <pantxo>
Project Member
Thu 31 Jan 2019 10:00:34 PM UTC, comment #12: 

Yes it looks better, though it is either "axis auto" or "loose" seems what makes all the difference (not neccessary both).

If I run the script:

for ii=1:100
        ii
        demo hold 6;
        axis auto
        print toto2.eps -depsc2 -loose
        close all
endfor

then w/o "loose" and "axis auto" it is crashing within 10 reps or so. With either of those enabled, it runs through all 100.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Thu 31 Jan 2019 08:52:02 PM UTC, comment #11: 

@Avinoam: Maybe use "--disable-system-opengl" configure option?

@Dmitri: Can you confirm that "demo hold 6; axis auto; print -loose -depsc toto.eps" works better?

Pantxo Diribarne <pantxo>
Project Member
Thu 31 Jan 2019 07:46:03 PM UTC, comment #10: 

Thanks, @Pantxo, you are absolutely right: in my version:

>> __opengl_info__
   version: 4.0.0 - Build 9.18.10.3220
    vendor: Intel
  renderer: Intel(R) HD Graphics 4600

In official version

>> __opengl_info__
   version: 3.1 Mesa 18.1.5
    vendor: VMware, Inc.
  renderer: llvmpipe (LLVM 6.0, 256 bits)

How do I build MXE-Octave with Mesa?

Avinoam Kalma <avinoam>
Project Member
Wed 30 Jan 2019 09:54:41 PM UTC, comment #9: 

@Avinoam: IIRC mxe-octave is now configured by default to use the MESA software driver, but you could look at "__opengl_info__" and see if you are picking the same opengl library in both builds.

@Dmitri: "demo hold 6" triggers bug #48689 which produces a huge amount of triangles. With this demo, I can confirm that I see frequent errors either with Ghostscript hanging with 100% CPU load or Octave itself. When I set "axis auto" before printing (to workaround bug #48689), the figure is printed but with a wrong bounding box (see bad_bbox.eps). I need to avoid the cropping using "-loose" to recover a correct figure:

demo hold 6
axis auto
print -depsc bad_bbox.eps
print -depsc -loose good_bbox.eps

For me "demo hold 6" is far from the only one affected by the "-loose" option.

(file #46135, file #46136)

Pantxo Diribarne <pantxo>
Project Member
Tue 29 Jan 2019 09:53:07 PM UTC, comment #8: 

I used the official rc1 for windows, and there was no problem.
I do not see any relavant change between rc1 and my version.
Is it a problem with my build?

Avinoam Kalma <avinoam>
Project Member
Mon 28 Jan 2019 10:20:46 PM UTC, comment #7: 

Here is an example coredump trace:


Jan 28 16:13:58 td-119156 systemd-coredump[9652]: Process 9626 (epstool) of user 1001 dumped core.

                                                  Stack trace of thread 9626:
                                                  #0  0x00007f2c24dda53f raise (libc.so.6)
                                                  #1  0x00007f2c24dc4895 abort (libc.so.6)
                                                  #2  0x00007f2c24e1d927 __libc_message (libc.so.6)
                                                  #3  0x00007f2c24e2425c malloc_printerr (libc.so.6)
                                                  #4  0x00007f2c24e25d45 _int_free (libc.so.6)
                                                  #5  0x00007f2c24e13a35 fclose@@GLIBC_2.2.5 (libc.so.6)
                                                  #6  0x0000000000406d6c calculate_bbox.isra.2 (epstool)
                                                  #7  0x00000000004030fe main (epstool)
                                                  #8  0x00007f2c24dc6413 __libc_start_main (libc.so.6)
                                                  #9  0x0000000000404f1a _start (epstool)

The console output:


Error: /undefined in -nan
Operand stack:
   --nostringval--   74.8709   117.654   0.387042   0.387042   0.387042   86.2677   399.882   0   0   0   83.9993   399.882   0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   2015   1   3   %oparray_pop   2014   1   3   %oparray_pop   1998   1   3   %oparray_pop   1884   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:977/1684(ro)(G)--   --dict:0/20(G)--   --dict:81/200(L)--   --dict:43/64(L)--
Current allocation mode is local
Current file position is 5543
free(): double free detected in tcache 2
sh: line 1:  5349 Aborted                 (core dumped) /usr/bin/epstool --quiet --copy --bbox /tmp/oct-dl5Y2m.eps 't1.eps'

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 28 Jan 2019 10:18:03 PM UTC, comment #6: 

FWIW:
with hg id b6e65db78f0c (stable) tip

demo hold 6
print t1.eps -depsc2

sporadically crashes epstool or just had gs hanging with 100% load. LIBGL_ALWAYS_SOFTWARE=1 does not solve the issue.

Fedora 29; gs 9.25

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 28 Jan 2019 09:52:18 PM UTC, comment #5: 

gs version bundled with MXE-Octave is GPL Ghostsciprt 9.16 (2015-03-30)
(see  http://hg.octave.org/mxe-octave/file/tip/src/ghostscript.mk)

Avinoam Kalma <avinoam>
Project Member
Mon 28 Jan 2019 09:40:55 PM UTC, comment #4: 

What is the version of Ghostscript that is installed along with mxe-octave? Was it upgraded recently? I am asking because on linux Mint 19.1, with GS 9.26 and Octave 5.0.90 or Octave 4.2.2, I see Ghostscript issues (wrong bounding box in eps output for "demo hold 6") that I can't reproduce on debian stretch, with GS 9.25 and Octave 5.0.90 or Octave 4.4.

Pantxo Diribarne <pantxo>
Project Member
Mon 28 Jan 2019 08:18:09 PM UTC, comment #3: 

@Avinoam: Thanks. Indeed when there are rotated objects (like clabels) we switch to the painters renderer. Can you inspect (and eventually attach) the original eps file?

demo clabel 1
print -depslatexstandalone foo
open foo-inc.eps

Actually I can't reproduce this issue with clabel hanging Octave. But I just noticed various ghostscript error messages (and no output) when printing camzoom and a few other demos with the painters renderer. This is probably not related so I'll file a separate bug report.

Pantxo Diribarne <pantxo>
Project Member
Mon 28 Jan 2019 06:20:17 PM UTC, comment #2: 

Checking  again with last 5.0.90 version (hg_id = e2e1aed33f7c, not official rc1)
compare_plot_demos stuck again in clabel_01.
In __print_parse_opts__  line 236

        arg_st.renderer = "painters";

and then gs stuck, and cause Octave to stop responding.
Killing gs makes Octave work again, until the next demo.

Avinoam Kalma <avinoam>
Project Member
Sun 27 Jan 2019 03:38:53 PM UTC, comment #1: 

@Avinoam: This is very strange. When printing to PNG, gl2ps is not supposed to be used unless you force the "-painters" renderer. Can you test again with the first release candidate?

Pantxo Diribarne <pantxo>
Project Member
Sun 20 Jan 2019 06:22:06 PM UTC, original submission:  

>> compare_plot_demos ('toolkits', 'qt')
….
Printing "clabel_01.png" ... GL2PS warning: Unknown token in buffer
GL2PS warning: Unknown token in buffer
GL2PS warning: Unknown token in buffer

And then Octave stops responding

Avinoam Kalma <avinoam>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46136:  good_bbox.eps added by pantxo (252KiB - image/x-eps)
file #46135:  bad_bbox.eps added by pantxo (252KiB - image/x-eps)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by avinoam (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-05 pantxo Open/ClosedOpen => Closed
    2019-01-30 pantxo Attached File- => Added good_bbox.eps, #46136
    2019-01-30 pantxo Attached File- => Added bad_bbox.eps, #46135
    2019-01-29 avinoam Summary MXE Octave] running compare_plot_demos ("toolkits", "qt") hangs Octave => [MXE Octave] running compare_plot_demos ("toolkits", "qt") hangs Octave
    2019-01-28 pantxo Release5.0.1 => 5.0.90

    Back to the top


    Powered by Savane 3.5