bugGNU Octave - Bugs: bug #39936, Error or crash when plotting with...

 
 

bug #39936: Error or crash when plotting with no fonts installed

Submitter:  Mike Miller <mtmiller>
Submitted:  Wed 04 Sep 2013 04:33:15 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 29 May 2015 12:54:16 AM UTC, comment #5: 

I am seeing the same thing with mxe-octave 4.0rc4 compiled on linux: a lot of ft_render warnings then a segfault with

imagesc(randn(10))
title('test')

I understand I need to install a font... please can someone tell me how to do that? Thanks.

>> imagesc(randn(10));

warning: ft_render: invalid bounding box, cannot render
warning: called from
    axes at line 66 column 10
    gca at line 58 column 9
    newplot at line 148 column 8
    imagesc at line 91 column 11
warning: ft_render: invalid bounding box, cannot render
warning: ft_render: invalid bounding box, cannot render
warning: ft_render: invalid bounding box, cannot render
warning:.....

>> title('test')


At this point octave disappears and leaves a message on the commandline: octave exited with signal 11.

Ceral Paquet <octavebugs>
Wed 04 Sep 2013 02:57:21 PM UTC, comment #4: 

I would say that this represents something outside the domain of Octave.  If the user has so badly mis-configured their system that not even a single font is available they need to look to a sysadmin, not to to Octave.

Rik <rik5>
Group administrator
Wed 04 Sep 2013 01:17:42 PM UTC, comment #3: 

Ok, that makes sense. It appears the problem was always there and not related to the recent changes for TeX support. I think FLTK just fails to draw the default uimenu.

Not sure there's anything reasonable we can do about it.

Michael Goffioul <goffioul>
Wed 04 Sep 2013 11:47:00 AM UTC, comment #2: 

Yes, here it is:


#0  __GI_exit (status=1) at exit.c:99
#1  0x00007fffe6651404 in fontopen (angle=<optimized out>, size=14, name=<optimized out>,
    core=<optimized out>) at fl_font_xft.cxx:282
#2  Fl_Font_Descriptor::Fl_Font_Descriptor (this=0xd20870, name=<optimized out>, fsize=14,
    fangle=<optimized out>) at fl_font_xft.cxx:334
#3  0x00007fffe66514c7 in fl_xft_font (driver=0x7fffe68e5a20 <fl_xlib_driver>,
    fnum=<optimized out>, size=<optimized out>, angle=<optimized out>) at fl_font_xft.cxx:123
#4  0x00007fffe66537dd in fl_font (fsize=<optimized out>, face=<optimized out>)
    at ../FL/fl_draw.H:491
#5  fl_normal_label (o=0x7fffffff80b0, X=2, Y=442, W=16, H=<optimized out>,
    align=<optimized out>) at fl_labeltype.cxx:35
#6  0x00007fffe6653974 in Fl_Widget::draw_label (this=<optimized out>, X=2, Y=442, W=16,
    H=16, a=0) at fl_labeltype.cxx:125
#7  0x00007fffe66539dd in Fl_Widget::draw_label (this=this@entry=0xd0d180, X=<optimized out>,
    Y=<optimized out>, W=<optimized out>, H=<optimized out>) at fl_labeltype.cxx:112
#8  0x00007fffe6653a7e in Fl_Widget::draw_label (this=this@entry=0xd0d180)
    at fl_labeltype.cxx:103
#9  0x00007fffe65f3198 in Fl_Button::draw (this=0xd0d180) at Fl_Button.cxx:79
#10 0x00007fffe6602369 in Fl_Group::draw_child (this=this@entry=0xd10cd0, widget=...)
    at Fl_Group.cxx:770
#11 0x00007fffe66025b2 in Fl_Group::draw_children (this=this@entry=0xd10cd0)
    at Fl_Group.cxx:726
#12 0x00007fffe663f4d8 in Fl_Window::draw (this=this@entry=0xd10cd0) at Fl_Window.cxx:110
#13 0x00007fffe6b2f447 in plot_window::draw (this=0xd10cd0)
    at ../../libinterp/dldfcn/__init_fltk__.cc:1227
#14 0x00007fffe65ebd72 in flush (this=<optimized out>) at ../FL/x.H:160
#15 Fl::flush () at Fl.cxx:741
#16 0x00007fffe65ecd90 in Fl::wait (time_to_wait=<optimized out>, time_to_wait@entry=0)
    at Fl.cxx:507
#17 0x00007fffe65ecdad in Fl::check () at Fl.cxx:619
#18 0x00007fffe6b1ec16 in __fltk_redraw__ () at ../../libinterp/dldfcn/__init_fltk__.cc:1860
#19 0x00007fffe6b3003b in fltk_graphics_toolkit::redraw_figure (this=<optimized out>, go=...)
    at ../../libinterp/dldfcn/__init_fltk__.cc:1983
#20 0x00007ffff6a1ccd7 in redraw_figure (go=..., this=0x7fffffff83e0)
    at corefcn/graphics.h:2257
#21 Fdrawnow (args=...) at ../../libinterp/corefcn/graphics.cc:9592


Mike Miller <mtmiller>
Group Member
Wed 04 Sep 2013 11:11:40 AM UTC, comment #1: 

Would you be able to provide a backtrace at the "exit" call?

Michael Goffioul <goffioul>
Wed 04 Sep 2013 04:33:15 AM UTC, original submission:  

I'm not sure if anything can be done about this in Octave, and maybe this is a completely invalid configuration to test against, feel free to close as invalid if so. But reporting anyway since it could potentially happen on misconfigured systems and results in a variety of errors.

Testing on a system with no fonts installed, simulated by intentionally doing the following as root on my system:


# mv /usr/share/fonts /usr/share/fonts-diverted
# mv /etc/fonts /etc/fonts-diverted
# rm -rf /var/cache/fontconfig


With gnuplot, the following warnings and errors occur, Octave stays running:


octave:1> plot (1:10);
warning: could not match any font: *-normal-normal-10
warning: ft_render: unable to load appropriate font
warning: could not match any font: *-normal-normal-10
warning: ft_render: unable to load appropriate font
[...]
warning: ft_render: invalid bounding box, cannot render
[...]
octave:2> legend;
warning: could not match any font: *-normal-normal-10
warning: ft_render: unable to load appropriate font
[...]
error: legend: A(I): index out of bounds; value 3 out of bound 0
error: called from:
error:   /.../share/octave/3.7.6+/m/plot/legend.m at line 622, column 22
error: structure has no member 'orientation'
error: evaluating argument list element number 1
error: called from:
error:   /.../share/octave/3.7.6+/m/plot/private/__go_draw_axes__.m at line -1, column -1
error:   /.../share/octave/3.7.6+/m/plot/private/__go_draw_figure__.m at line 172, column 17
error:   /.../share/octave/3.7.6+/m/plot/__gnuplot_drawnow__.m at line 86, column 5


Using FLTK, Octave simply exits after the same stream of warnings:


octave:1> plot (1:10);
warning: could not match any font: *-normal-normal-10
warning: ft_render: unable to load appropriate font
warning: could not match any font: *-normal-normal-10
warning: ft_render: unable to load appropriate font
[...]
Unable to find fonts. Check your FontConfig configuration.

$ echo $?
1


The last error message and call to exit(1) are in the FLTK library itself.

Mike Miller <mtmiller>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by octavebugs (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-04 rik5 StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code