[cairo] Re: Bus Error -- Mac OS X Intel

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Wed Dec 13 17:10:03 PST 2006


Hi,

Taking a glance on backtrace, the error seems to occur at
zero-sized glyph checking.

---------------------------------------------------------
        status = _cairo_scaled_glyph_lookup (scaled_font,
                                             glyphs[i].index,
                                             CAIRO_SCALED_GLYPH_INFO_SURFACE,
                                             &scaled_glyph);
        if (status != CAIRO_STATUS_SUCCESS)
            goto BAIL;
        /* Don't put any size-zero glyphs into output_glyphs to avoid
         * an X server bug which stops rendering glyphs after the
         * first size-zero glyph. */
        if (scaled_glyph->surface->width && scaled_glyph->surface->height) {
            output_glyphs[o++] = glyphs[i];
            if (scaled_glyph->surface_private == NULL) {
                _cairo_xlib_surface_add_glyph (dst->dpy, scaled_font, scaled_glyph);
                scaled_glyph->surface_private = (void *) 1;
            }
        }
---------------------------------------------------------

I want you to check the possibility that the pointer "scaled_glyph"
filled by _cairo_scaled_glyph_lookup() is broken or not. For first
step, please try insertion 'printf "0x%08x\n", scaled_glyph' by GDB
just before the line crashed:
>        if (scaled_glyph->surface->width && scaled_glyph->surface->height) {

If you have small test program to reproduce the problem,
please send me. The problem occurs in any fonts? any texts?

On Wed, 13 Dec 2006 15:00:32 -0600
Ryan Schmidt <cairo-2006d at ryandesign.com> wrote:

>
>On Dec 12, 2006, at 22:54, mpsuzuki at hiroshima-u.ac.jp wrote:
>
>> The MacOS specific code (to support suitcase font etc) of
>> freetype-2.2.1 is not ready for Intel Mac.
>
>What about the freetype that Apple provides for Intel Macs in the X11  
>package? Does that work properly?

Good comment.

freetype2 in X11 that Apple bundles to Intel Mac seems to be
fixed (endian issue). But it is not different from freetype2
built by standard "./configure && make && make install",
because it is built by special Makefile designed for XFree86.
I'm not sure whether it works well with recent softwares
designed for vanilla freetype2.

About "MacOS font support" of freetype2, please check discussion
in gtk-i18n list,
http://mail.gnome.org/archives/gtk-i18n-list/2006-July/msg00008.html
http://mail.gnome.org/archives/gtk-i18n-list/2006-September/msg00031.html

The report "the program on PowerBook G4 works well but does not
work well on Intel Mac" makes me afraid about the endian issue,
although I wish it's out of freetype2.

Regards,
mpsuzuki


More information about the cairo mailing list