Summary: | crash at XRenderAddGlyphs | ||
---|---|---|---|
Product: | cairo | Reporter: | Jinghua Luo <sunmoon1997> |
Component: | xlib backend | Assignee: | Carl Worth <cworth> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | critical | ||
Priority: | high | CC: | sangu.xorg |
Version: | 1.1.1 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
cairo-debug.log
a patch to fix this bug. a updated one. updated patch Support multiple glyph image formats within the same font. |
Description
Jinghua Luo
2005-10-07 07:01:46 UTC
Created attachment 3506 [details]
cairo-debug.log
Created attachment 3507 [details] [review] a patch to fix this bug. This is my patch to fix this bug. Created attachment 4772 [details] [review] a updated one. I found the real bug is in cairo-ft-font.c, it creates different format glyphs in a font and xlib backend can't handle that. I have a fix in my local tree but I'm currently in busy and have no time to clean the patch and submit it here. I updated the patch for xlib backend, this patch workarounds the problem in cairo-ft-font.c(I think it's also a feature for xlib backend, supports different format glyghs in a font) and cairo won't crash any more. what's you guys idea? Apply this patch, leap the real bug and let it to be fixed in cairo-1.4? Created attachment 5479 [details] [review] updated patch Visiting http://gitweb.freedesktop.org/?p=cairo;a=log , firefox 1.5.0.2 (using pango text) crashes in cairo 1.1.2. But after patching attachment 5479 [details] [review] , firefox works well. OS : Fedora development (20060426) Ran into this issue with evolution now, 2006-04-26 patch fixes the problem for me. Backtrace looked like: #4 0x00bb630a in XSync () from /usr/lib/libX11.so.6 #5 0x00bb6485 in XSetAfterFunction () from /usr/lib/libX11.so.6 #6 0x00f12a79 in XRenderAddGlyphs () from /usr/lib/libXrender.so.1 #7 0x00234392 in _cairo_xlib_surface_old_show_glyphs (scaled_font=0x917a8a0, op=CAIRO_OPERATOR_OVER, pattern=0xbfb16490, abstract_surface=0x91843a0, source_x=19, source_y=342, dest_x=19, dest_y=342, width=41, height=11, glyphs=0x918ed20, num_glyphs=3) at cairo-xlib-surface.c:2191 Created attachment 5542 [details] [review] Support multiple glyph image formats within the same font. Keith and I took a look at this bug and the previously proposed patch. We don't think the previous patch is the right approach to the problem. I'm attaching the beginnings of an alternate approach. The new 4705-convert.patch should eliminate the crashes. Can someone please test this? (make sure the other patch is not already applied first). Or if someone could provide a font, (or the name of an available font), that has these multi-format glyph images in it, that would help me to replicate the problem. If the new patch solves the crash then I will commit it to cairo. It's not quite as functional as the previous patch as it will make all glyphs from a font be rendered with the same format (A1 or A8, say), but will choose which format simply by which glyph it sees first. An improvement over this scheme would be to choose A1 or A8 depending on whether an A8 glyph images are present in the font, (and if so, then the patch I've provided would then convert any A1 glyph images to A8). I don't actually know how to detect this right now, (and again, having access to a font with both formats inside would be necessary). Thanks, -Carl Carl's 4705-convert.patch _also_ does fix the issue for me. (Need to change _CAIRO_FORMAT_TO_XRENDER_FORMAT -> _CAIRO_FORMAT_XRENDER_FORMAT though) With that confirmation, I've now pushed the new patch out to cairo's master branch, (in 1.1.3), and I'm closing this bug on the crash. If someone wants to open a new bug saying that fonts with A8 glyph images sometimes render them as A1, then that would be fine, (particularly if there's a patch for _cairo_xlib_surface_font_init along with it). -Carl Please See : http://bugzilla.gnome.org/show_bug.cgi?id=341138 Connecting http://gitweb.freedesktop.org/?p=cairo;a=log in Pango 1.13.0 + cairo 1.1.16, firefox (using PangoText) begines to eating big memory. and firefox uses All memory. Related this bug 4705 ? cairo should support multiple glyph image formats within the same font, I met the problem, I filed a new bug, pls see https://bugs.freedesktop.org/show_bug.cgi?id=7172 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.