mpl 0.84 segfaults with WXAgg backend

Hi, the WXAgg backend of 0.84 produces segfaults on

    > linux using wxPython2.6-gtk2-unicode-2.6.1.0-1_py2.3.

Have you verified that it is wxagg specific? Eg, what do happens with
the following backends: WX, Agg, PS?

    > This is the debugging output:
    > found Bitstream Vera Sans, normal, normal 500, normal,
    > 12.0 findfont returning /usr/share/matplotlib/Vera.ttf
    > Segmentation fault

Nadia recently reported a crash in the font module in OS X when
loading Vera.ttf, but hers was only in ipython. Weird. What version
of freetype are you using? She was using 2.1.9 think.

It would really help if we could nail this down, but I haven't been
able to replicate it on my end yet. If you could edit src/ft2font.cpp
and fint the Ft2Font::set_text function. Add a lot of lines thoughout
that function like

   _VERBOSE("FT2Font::set_text 1");
   //some code here
   _VERBOSE("FT2Font::set_text 2");
   //some code here
   _VERBOSE("FT2Font::set_text 3");

and then switch VERBOSE=True in setup.py and reinstall. I sometimes
go through a couple of iterations ("poorman's binary search") to find
the precise line that is crashing.

Note it is only a guess that the crash is in set_text, based on the
information I got from Nadia when we left off on this issue, but the
VERBOSE output will give more precise information in this regard.

JDH

John Hunter wrote:

"Christian" == Christian Kristukat <ckkart@...341...> writes:

    > Hi, the WXAgg backend of 0.84 produces segfaults on
    > linux using wxPython2.6-gtk2-unicode-2.6.1.0-1_py2.3.

Have you verified that it is wxagg specific? Eg, what do happens with
the following backends: WX, Agg, PS?

It happens only with WXAgg.

   _VERBOSE("FT2Font::set_text 1");
   //some code here
   _VERBOSE("FT2Font::set_text 2");
   //some code here
   _VERBOSE("FT2Font::set_text 3");

the error doesn't seem to be related to set_text:

FT2Font::set_text
FT2Font::set_text 1
FT2Font::set_text 2
FT2Font::set_text 3
FT2Font::set_text 4
FT2Font::set_text 5
FT2Font::set_text 6
FT2Font::set_text done
FT2Font::getattr
FT2Font::draw_glyphs_to_bitmap
FT2Font::compute_string_bbox
FT2Font::draw_bitmap
RendererAgg::draw_text
GCAgg::GCAgg
GCAgg::points_to_pixels
GCAgg::get_color
GCAgg::antialiased
GCAgg::_set_linecap
GCAgg::_set_joinstyle
GCAgg::_set_dashes
GCAgg::_set_clip_rectangle
RendererAgg::set_clipbox_rasterizer
RendererAgg::set_clipbox_rasterizer done
SeparableTransformation::eval_scalars
Affine::eval_scalars
Affine::eval_scalars DONE
Affine::operator
_transforms_module::new_value
_transforms_module::new_point
Point::Point
_transforms_module::new_value
_transforms_module::new_point
Point::Point
_transforms_module::new_bbox
Bbox::Bbox
Value::get
Bbox::~Bbox
Point::~Point
Value::~Value
Point::~Point
Value::~Value
Value::get
Interval::~Interval
Bbox::get_bounds
Value::get

Christian

I can only add that for me the crash appears only in ipython on OS X
with this particular font. It is in the set_text function and after
I added print statements it went away. From reading the mailing list
and when other people get crash, it seems that the only common thing is
the font - Vera.ttf.

Is there a way to tell matplotlib what font to use?

(after I removed the print statements (nothing else changed) matplotlib
doesn't load this font any more, so I can't reproduce the crash.)
If I can tell it to use Vera.ttf and reproduce it, this will help
keep my sanity.

Nadia

John Hunter wrote:

···

"Christian" == Christian Kristukat <ckkart@...341...> writes:

    > Hi, the WXAgg backend of 0.84 produces segfaults on
    > linux using wxPython2.6-gtk2-unicode-2.6.1.0-1_py2.3.

Have you verified that it is wxagg specific? Eg, what do happens with
the following backends: WX, Agg, PS?

    > This is the debugging output:
    > found Bitstream Vera Sans, normal, normal 500, normal,
    > 12.0 findfont returning /usr/share/matplotlib/Vera.ttf
    > Segmentation fault

Nadia recently reported a crash in the font module in OS X when
loading Vera.ttf, but hers was only in ipython. Weird. What version
of freetype are you using? She was using 2.1.9 think.

It would really help if we could nail this down, but I haven't been
able to replicate it on my end yet. If you could edit src/ft2font.cpp
and fint the Ft2Font::set_text function. Add a lot of lines thoughout
that function like

   _VERBOSE("FT2Font::set_text 1");
   //some code here
   _VERBOSE("FT2Font::set_text 2");
   //some code here
   _VERBOSE("FT2Font::set_text 3");

and then switch VERBOSE=True in setup.py and reinstall. I sometimes
go through a couple of iterations ("poorman's binary search") to find
the precise line that is crashing.

Note it is only a guess that the crash is in set_text, based on the
information I got from Nadia when we left off on this issue, but the
VERBOSE output will give more precise information in this regard.

JDH

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options