pango/fontconfig segfault in massrotate




Greetings --

It all started with an innocent application,

http://freshmeat.net/massrotate/

which I found to do what I want -- apply jpegtran lossles rotation
to a bunch of jpegs quickly.  Basically, you need a viewer and action
on an image -- ideal for a GUI.  But it wanted Gtk2, so I installed
it all, glib, gtk+-2.4.1, pango, atk, fontconfig, xft, Xrender...

I've had some problems installing fontconfig 2.2.94 -- it would exit
with make error 139, which trawling the net showed to be alleviated by
removing /usr/lib/X11/fonts/URW symlink, the only symlink there on my
(heavily updated) SuSE 7.1, pointing to /usr/share/ghostscript/fonts.
Later things would segfault if URW was put back or even replaced by a
full copy, so I just sort of left it out.

Now I have a problem with perl Gtk2/Pango, when trying to run
a massrorate.  I posted to gtk-per list, but they say it's a
fontconfig/Pango problem.  That much I see, as gtk+ tests work by
themselves, showing boxes with text.  I attach the gtk-perl message
for reference.

The strange result is, massrotate would just segfault with no messages,
until I'd run gtk+ tests from its build directory, tests/.libs/.  Then it
would create a ~/.font.cache-1 in my home directory, and massrotate
would do a new trick:

WARNING **: Cannot open font file for font Bitstream Charter 16 at
+/usr/local/bin/massrotate line 99.
Segmentation fault

Tracing in gdb shows it's pango.  However, I was getting messages
like unable to open default font configuration file, referring
to fontconfig.org, so I guess it's a pango/fontconfig interplay.
Does that warning above come from fontconfig?  It installed
/usr/local/etc/fonts/font.conf, and copying them around to /etc
or ~/.fonts didn't help.  I'm running xfs, while font.conf refers
to explicit font directories -- where font.cache-1 properly exists.
The 16 size above comes from my ~/.gtkrc-2.0, and Bitstream Charter
seems to match everything.  In fc-match, I get this:

fc-match "Bitstream Charter 10"
Efont_Serif.ttf: "Efont Serif" "Regular"

And in /usr/lib/X11/fonts/truetype, I see

ls /usr/lib/X11/fonts/truetype/
Efont_Serif.ttf       Efont_Serif_B.ttf   fonts.dir
Efont_Serif_A.ttf     Efont_Serif_BI.ttf  fonts.scale
Efont_Serif_A_B.ttf   Efont_Serif_I.ttf   fonts.scale.efont-serif-ttf
Efont_Serif_A_BI.ttf  encodings.dir
Efont_Serif_A_I.ttf   fonts.cache-1

So in order to show a little window to rotate a jpeg, I need to unravel
the whole font architecture!  :)  Is it pango, in your opinion, or
misconfigured fontconfig -- then how do I test the font *can* be rendered?
I use the default font.conf, except removing the URW from there.

I was using xfs, then eliminated it by listing all the paths in XF86Config
as usual.  I see that in /usr/lib/X11/fonts/truetype/, fonts.dir was
made just now -- perhaps as a part of fontconfig installation/discovery
process?

I also attach the bt from gdb.  It shows segfault in Xft lock, called
by pango.

Any possible scenarios -- how to test pango stand-alone especially --
are welcome.

-- 
Cheers,
Alexy Khrabrov :: www.setup.org :: Age Quod Agis
#0  _XftLockFile (f=0x1) at /vol/src/xft-2.1.2/xftfreetype.c:156
#1  0x40c9d247 in XftLockFace (public=0x84f9c80)
    at /vol/src/xft-2.1.2/xftfreetype.c:302
#2  0x40a7a9e8 in pango_xft_font_real_lock_face (font=0x84a84e8)
    at /vol/src/pango-1.4.0/pango/pangoxft-font.c:582
#3  0x40c7636b in pango_fc_font_lock_face (font=0x84a84e8)
    at /vol/src/pango-1.4.0/pango/pangofc-font.c:365
#4  0x40ad4f44 in basic_engine_shape (engine=0x84a1060, font=0x84a84e8, 
    text=0x8491da0 "Previous Pic", length=12, analysis=0x84a185c, 
    glyphs=0x84a12d8) at /vol/src/pango-1.4.0/modules/basic/basic-fc.c:142
#5  0x40a9c18e in _pango_engine_shape_shape (engine=0x84a1060, font=0x84a84e8, 
    text=0x8491da0 "Previous Pic", length=12, analysis=0x84a185c, 
    glyphs=0x84a12d8) at /vol/src/pango-1.4.0/pango/pango-engine.c:73
#6  0x40aa860d in pango_shape (text=0x8491da0 "Previous Pic", length=12, 
    analysis=0x84a185c, glyphs=0x84a12d8)
    at /vol/src/pango-1.4.0/pango/shape.c:47
#7  0x40aa0ec3 in process_item (layout=0x8491d50, line=0x84a12b8, 
    state=0xbfffc618, force_fit=1, no_break_at_end=0)
    at /vol/src/pango-1.4.0/pango/pango-layout.c:2679
#8  0x40aa138d in process_line (layout=0x8491d50, state=0xbfffc618)
    at /vol/src/pango-1.4.0/pango/pango-layout.c:2848
#9  0x40aa1bad in pango_layout_check_lines (layout=0x8491d50)
    at /vol/src/pango-1.4.0/pango/pango-layout.c:3144
#10 0x40aa0102 in pango_layout_get_extents_internal (layout=0x8491d50, 
    ink_rect=0x0, logical_rect=0xbfffc71c, line_extents=0x0)
    at /vol/src/pango-1.4.0/pango/pango-layout.c:1959
#11 0x40aa03c0 in pango_layout_get_extents (layout=0x8491d50, ink_rect=0x0, 
    logical_rect=0xbfffc71c) at /vol/src/pango-1.4.0/pango/pango-layout.c:2105
#12 0x40828813 in gtk_label_size_request (widget=0x848cc88, 
    requisition=0x848cca4) at /vol/src/gtk+-2.4.1/gtk/gtklabel.c:1565
#13 0x402626fc in g_cclosure_marshal_VOID__BOXED (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffcadc, 
    invocation_hint=0xbfffc998, marshal_data=0x40828740)
    at /vol/src/glib-2.4.1/gobject/gmarshal.c:566
#14 0x4024ab4c in g_type_class_meta_marshal (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffcadc, 
    invocation_hint=0xbfffc998, marshal_data=0x7c)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:514
#15 0x4024a75a in g_closure_invoke (closure=0x847df18, return_value=0x0, 
    n_param_values=2, param_values=0xbfffcadc, invocation_hint=0xbfffc998)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:437
#16 0x402608ec in signal_emit_unlocked_R (node=0x847df68, detail=0, 
    instance=0x848cc88, emission_return=0x0, instance_and_params=0xbfffcadc)
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2366
#17 0x4025f5c1 in g_signal_emit_valist (instance=0x848cc88, signal_id=13, 
    detail=0, var_args=0xbfffcd40) at /vol/src/glib-2.4.1/gobject/gsignal.c:2195
#18 0x40260065 in g_signal_emit_by_name (instance=0x848cc88, 
    detailed_signal=0x409a810b "size_request")
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2263
#19 0x4087ba9a in do_size_request (widget=0x848cc88)
    at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:494
#20 0x4087bdf9 in _gtk_size_group_compute_requisition (widget=0x848cc88, 
    requisition=0xbfffcdf8) at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:683
#21 0x40917acd in gtk_widget_size_request (widget=0x848cc88, 
    requisition=0xbfffcdf8) at /vol/src/gtk+-2.4.1/gtk/gtkwidget.c:2567
#22 0x40796e45 in gtk_button_size_request (widget=0x848a340, 
    requisition=0x848a35c) at /vol/src/gtk+-2.4.1/gtk/gtkbutton.c:912
#23 0x402626fc in g_cclosure_marshal_VOID__BOXED (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffd1cc, 
    invocation_hint=0xbfffd088, marshal_data=0x40796d90)
    at /vol/src/glib-2.4.1/gobject/gmarshal.c:566
#24 0x4024ab4c in g_type_class_meta_marshal (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffd1cc, 
    invocation_hint=0xbfffd088, marshal_data=0x7c)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:514
#25 0x4024a75a in g_closure_invoke (closure=0x847df18, return_value=0x0, 
    n_param_values=2, param_values=0xbfffd1cc, invocation_hint=0xbfffd088)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:437
#26 0x402608ec in signal_emit_unlocked_R (node=0x847df68, detail=0, 
    instance=0x848a340, emission_return=0x0, instance_and_params=0xbfffd1cc)
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2366
#27 0x4025f5c1 in g_signal_emit_valist (instance=0x848a340, signal_id=13, 
    detail=0, var_args=0xbfffd430) at /vol/src/glib-2.4.1/gobject/gsignal.c:2195
#28 0x40260065 in g_signal_emit_by_name (instance=0x848a340, 
    detailed_signal=0x409a810b "size_request")
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2263
#29 0x4087ba9a in do_size_request (widget=0x848a340)
    at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:494
#30 0x4087bdf9 in _gtk_size_group_compute_requisition (widget=0x848a340, 
    requisition=0xbfffd4f4) at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:683
#31 0x40917acd in gtk_widget_size_request (widget=0x848a340, 
    requisition=0xbfffd4f4) at /vol/src/gtk+-2.4.1/gtk/gtkwidget.c:2567
#32 0x4080db12 in gtk_hbox_size_request (widget=0x84907e0, requisition=0x84907fc)
    at /vol/src/gtk+-2.4.1/gtk/gtkhbox.c:122
#33 0x402626fc in g_cclosure_marshal_VOID__BOXED (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffd8ac, 
    invocation_hint=0xbfffd768, marshal_data=0x4080dab0)
    at /vol/src/glib-2.4.1/gobject/gmarshal.c:566
#34 0x4024ab4c in g_type_class_meta_marshal (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffd8ac, 
    invocation_hint=0xbfffd768, marshal_data=0x7c)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:514
#35 0x4024a75a in g_closure_invoke (closure=0x847df18, return_value=0x0, 
    n_param_values=2, param_values=0xbfffd8ac, invocation_hint=0xbfffd768)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:437
#36 0x402608ec in signal_emit_unlocked_R (node=0x847df68, detail=0, 
    instance=0x84907e0, emission_return=0x0, instance_and_params=0xbfffd8ac)
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2366
#37 0x4025f5c1 in g_signal_emit_valist (instance=0x84907e0, signal_id=13, 
    detail=0, var_args=0xbfffdb10) at /vol/src/glib-2.4.1/gobject/gsignal.c:2195
#38 0x40260065 in g_signal_emit_by_name (instance=0x84907e0, 
    detailed_signal=0x409a810b "size_request")
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2263
#39 0x4087ba9a in do_size_request (widget=0x84907e0)
    at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:494
#40 0x4087bdf9 in _gtk_size_group_compute_requisition (widget=0x84907e0, 
    requisition=0xbfffdbd4) at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:683
#41 0x40917acd in gtk_widget_size_request (widget=0x84907e0, 
    requisition=0xbfffdbd4) at /vol/src/gtk+-2.4.1/gtk/gtkwidget.c:2567
#42 0x40910be2 in gtk_vbox_size_request (widget=0x8490c78, requisition=0x8490c94)
    at /vol/src/gtk+-2.4.1/gtk/gtkvbox.c:121
#43 0x402626fc in g_cclosure_marshal_VOID__BOXED (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffdf8c, 
    invocation_hint=0xbfffde48, marshal_data=0x40910b80)
    at /vol/src/glib-2.4.1/gobject/gmarshal.c:566
#44 0x4024ab4c in g_type_class_meta_marshal (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffdf8c, 
    invocation_hint=0xbfffde48, marshal_data=0x7c)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:514
#45 0x4024a75a in g_closure_invoke (closure=0x847df18, return_value=0x0, 
    n_param_values=2, param_values=0xbfffdf8c, invocation_hint=0xbfffde48)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:437
#46 0x402608ec in signal_emit_unlocked_R (node=0x847df68, detail=0, 
    instance=0x8490c78, emission_return=0x0, instance_and_params=0xbfffdf8c)
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2366
#47 0x4025f5c1 in g_signal_emit_valist (instance=0x8490c78, signal_id=13, 
    detail=0, var_args=0xbfffe1f0) at /vol/src/glib-2.4.1/gobject/gsignal.c:2195
#48 0x40260065 in g_signal_emit_by_name (instance=0x8490c78, 
    detailed_signal=0x409a810b "size_request")
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2263
#49 0x4087ba9a in do_size_request (widget=0x8490c78)
    at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:494
#50 0x4087bdf9 in _gtk_size_group_compute_requisition (widget=0x8490c78, 
    requisition=0xbfffe2b4) at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:683
#51 0x40917acd in gtk_widget_size_request (widget=0x8490c78, 
    requisition=0xbfffe2b4) at /vol/src/gtk+-2.4.1/gtk/gtkwidget.c:2567
#52 0x40924ffa in gtk_window_size_request (widget=0x8485df8, 
    requisition=0x8485e14) at /vol/src/gtk+-2.4.1/gtk/gtkwindow.c:3986
#53 0x402626fc in g_cclosure_marshal_VOID__BOXED (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffe66c, 
    invocation_hint=0xbfffe528, marshal_data=0x40924fb0)
    at /vol/src/glib-2.4.1/gobject/gmarshal.c:566
#54 0x4024ab4c in g_type_class_meta_marshal (closure=0x847df18, 
    return_value=0x0, n_param_values=2, param_values=0xbfffe66c, 
    invocation_hint=0xbfffe528, marshal_data=0x7c)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:514
#55 0x4024a75a in g_closure_invoke (closure=0x847df18, return_value=0x0, 
    n_param_values=2, param_values=0xbfffe66c, invocation_hint=0xbfffe528)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:437
#56 0x402608ec in signal_emit_unlocked_R (node=0x847df68, detail=0, 
    instance=0x8485df8, emission_return=0x0, instance_and_params=0xbfffe66c)
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2366
#57 0x4025f5c1 in g_signal_emit_valist (instance=0x8485df8, signal_id=13, 
    detail=0, var_args=0xbfffe8d0) at /vol/src/glib-2.4.1/gobject/gsignal.c:2195
#58 0x40260065 in g_signal_emit_by_name (instance=0x8485df8, 
    detailed_signal=0x409a810b "size_request")
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2263
#59 0x4087ba9a in do_size_request (widget=0x8485df8)
    at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:494
#60 0x4087bdf9 in _gtk_size_group_compute_requisition (widget=0x8485df8, 
    requisition=0x0) at /vol/src/gtk+-2.4.1/gtk/gtksizegroup.c:683
#61 0x40917acd in gtk_widget_size_request (widget=0x8485df8, requisition=0x0)
    at /vol/src/gtk+-2.4.1/gtk/gtkwidget.c:2567
#62 0x40925ef5 in gtk_window_compute_configure_request (window=0x8485df8, 
    request=0xbfffea9c, geometry=0xbfffea68, flags=0xbfffea64)
    at /vol/src/gtk+-2.4.1/gtk/gtkwindow.c:4815
#63 0x40924829 in gtk_window_show (widget=0x8485df8)
    at /vol/src/gtk+-2.4.1/gtk/gtkwindow.c:3608
#64 0x40261d68 in g_cclosure_marshal_VOID__VOID (closure=0x847db10, 
    return_value=0x0, n_param_values=1, param_values=0xbfffee6c, 
    invocation_hint=0xbfffed28, marshal_data=0x409247b0)
    at /vol/src/glib-2.4.1/gobject/gmarshal.c:77
#65 0x4024ab4c in g_type_class_meta_marshal (closure=0x847db10, 
    return_value=0x0, n_param_values=1, param_values=0xbfffee6c, 
    invocation_hint=0xbfffed28, marshal_data=0x5c)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:514
#66 0x4024a75a in g_closure_invoke (closure=0x847db10, return_value=0x0, 
    n_param_values=1, param_values=0xbfffee6c, invocation_hint=0xbfffed28)
    at /vol/src/glib-2.4.1/gobject/gclosure.c:437
#67 0x402608ec in signal_emit_unlocked_R (node=0x847db48, detail=0, 
    instance=0x8485df8, emission_return=0x0, instance_and_params=0xbfffee6c)
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2366
#68 0x4025f5c1 in g_signal_emit_valist (instance=0x8485df8, signal_id=7, 
    detail=0, var_args=0xbfffeff0) at /vol/src/glib-2.4.1/gobject/gsignal.c:2195
#69 0x4025f889 in g_signal_emit (instance=0x8485df8, signal_id=7, detail=0)
    at /vol/src/glib-2.4.1/gobject/gsignal.c:2239
#70 0x40916c4d in gtk_widget_show (widget=0x8485df8)
    at /vol/src/gtk+-2.4.1/gtk/gtkwidget.c:1967
#71 0x407ca6fb in gtk_container_show_all (widget=0x8485df8)
    at /vol/src/gtk+-2.4.1/gtk/gtkcontainer.c:2324
#72 0x40917037 in gtk_widget_show_all (widget=0x8485df8)
    at /vol/src/gtk+-2.4.1/gtk/gtkwidget.c:2115
#73 0x4064a170 in XS_Gtk2__Widget_destroy (my_perl=0x81e1a20, cv=0x83a3198)
    at GtkWidget.xs:419
#74 0x80e9a8e in Perl_pp_entersub (my_perl=0x81e1a20) at pp_hot.c:2773
#75 0x80c5aa3 in Perl_runops_debug (my_perl=0x81e1a20) at dump.c:1398
#76 0x806b95f in S_run_body (my_perl=0x81e1a20, oldscope=1) at perl.c:1681
#77 0x806b396 in perl_run (my_perl=0x81e1a20) at perl.c:1600
#78 0x8066503 in main (argc=3, argv=0xbffff314, env=0xbffff324) at perlmain.c:85
#79 0x400aac5f in __libc_start_main () from /lib/libc.so.6



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]