I ran into the same problem with a self written libwebkitgtk program, also for the 'antialias' property which is asked in the same path XGetDefault call from cairo-xlib-screen.c .
The segfault seems to always occur in the calls from libcairo2, more precisely cairo-xlib-screen.c function _cairo_xlib_init_screen_font_options (Display *dpy, cairo_xlib_screen_t *info)
it's always one of the get_integer_default or get_boolean_default calls.
If I write down the values in a successful run (for my system that is
cairo_bool_t xft_hinting=1;
cairo_bool_t xft_antialias=TRUE;
int xft_hintstyle=0;
int xft_lcdfilter=1;
)
and prevent the calls from happening, the segfault goes away. (I create a patched libcairo2)
Anyone else who wants to try this (on oneiric):
sudo apt-get source libcairo2
sudo apt-get build-dep libcairo2
cd cairo-1.10.2/
modify src/cairo-xlib-screen.c so that values above are used (line 135) and comment out all 3 function calls for get_integer_default or get_boolean_default.
As to what is the clean fix I'm not sure. Is there some requirement on pthread synchronization that cairo doesn't meet when calling XGetDefault, or is it a regular Xorg bug ?
I also noticed /etc/xdg/xfce4/Xft.xrdb allows you to set defaults but that didn't seem to help me (even though I'm running xfce4/xubuntu)
I ran into the same problem with a self written libwebkitgtk program, also for the 'antialias' property which is asked in the same path XGetDefault call from cairo-xlib-screen.c .
The segfault seems to always occur in the calls from libcairo2, more precisely cairo-xlib-screen.c function _cairo_ xlib_init_ screen_ font_options (Display *dpy, cairo_xlib_screen_t *info)
it's always one of the get_integer_default or get_boolean_default calls. xlib-screen. c so that values above are used (line 135) and comment out all 3 function calls for get_integer_default or get_boolean_ default.
If I write down the values in a successful run (for my system that is
cairo_bool_t xft_hinting=1;
cairo_bool_t xft_antialias=TRUE;
int xft_hintstyle=0;
int xft_lcdfilter=1;
)
and prevent the calls from happening, the segfault goes away. (I create a patched libcairo2)
Anyone else who wants to try this (on oneiric):
sudo apt-get source libcairo2
sudo apt-get build-dep libcairo2
cd cairo-1.10.2/
modify src/cairo-
sudo dpkg-buildpackage -rfakeroot -b -nc 1.10.2- 6ubuntu3_ i386.deb libcairo2- dbg_1.10. 2-6ubuntu3_ i386.deb libcairo2- dev_1.10. 2-6ubuntu3_ i386.deb libcairo- gobject2_ 1.10.2- 6ubuntu3_ i386.deb libcairo- script- interpreter2_ 1.10.2- 6ubuntu3_ i386.deb
cd ..
sudo dpkg -i libcairo2_
As to what is the clean fix I'm not sure. Is there some requirement on pthread synchronization that cairo doesn't meet when calling XGetDefault, or is it a regular Xorg bug ?
I also noticed /etc/xdg/ xfce4/Xft. xrdb allows you to set defaults but that didn't seem to help me (even though I'm running xfce4/xubuntu)