[cairo] python-cario text on X86_64

Jody Winston josephwinston at mac.com
Fri Dec 3 22:02:46 PST 2004

Using Python 2.3.3, gcc 3.3.3, and today's CVS versions on an opteron
system, I'm seeing core dumps anytime text is used in any of the
python examples.  This problem does not appear to happen with the
demos found in cairo-demo.  The traceback shows where the problem

What appears in gdb is that when face is set to
font->val->face the value of ucs4 changes from 0 to some non zero
value and the stack becomes corrupted throughout the traceback.  It is
acting like a prototype is wrong someplace in the traceback.

I'd like to get text working on the opterons and I'm willing to debug
this problem.  Any suggestions before I start?



gdb) where
#0  _cairo_ft_font_text_to_glyphs (abstract_font=0x84f1f0, sc=0x7fbfffc920, utf8=0x2a955e89f4 "Hello World", glyphs=0x2a955e89f4,
    nglyphs=0x7fbfffc920) at cairo_ft_font.c:496
#1  0x0000002a98be188b in _cairo_unscaled_font_text_to_glyphs (font=0x84f1f0, scale=0x7fbfffc920, utf8=0x2a955e89f4 "Hello World",
    glyphs=0x7fbfffc970, num_glyphs=0x7fbfffc97c) at cairo_font.c:257
#2  0x0000002a98be63c2 in _cairo_gstate_text_to_glyphs (gstate=0x80d1a0, utf8=0x2a955e89f4 "Hello World", glyphs=0x7fbfffc970,
    nglyphs=0x7fbfffc97c) at cairo_gstate.c:2222
#3  0x0000002a98be00f0 in cairo_text_extents (cr=0x80d160, utf8=0x2a955e89f4 "Hello World", extents=0x7fbfffc9b0) at cairo.c:910
#4  0x0000002a98ad205b in pycairo_text_extents (self=0x2a9899c768, args=0x84f1f0) at pycairo-context.c:862
#5  0x00000000004b63ac in PyCFunction_Call (func=0x2a98ab7e60, arg=0x2a955ae210, kw=0x2a955e89f4) at Objects/methodobject.c:108
#6  0x000000000046392b in call_function (pp_stack=0x7fbfffcaf8, oparg=-1731227456) at Python/ceval.c:3439
#7  0x0000000000461bcc in eval_frame (f=0x686a80) at Python/ceval.c:2116
#8  0x0000000000462879 in PyEval_EvalCodeEx (co=0x2a955ddb90, globals=0x7fbfffc920, locals=0x2a955e89f4, args=0x2a955eafe0, argcount=2,
    kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#9  0x00000000004b5f1a in function_call (func=0x2a955ecde8, arg=0x2a955eafc8, kw=0x0) at Objects/funcobject.c:504
#10 0x0000000000417a60 in PyObject_Call (func=0x84f1f0, arg=0x7fbfffc920, kw=0x2a955e89f4) at Objects/abstract.c:1755
#11 0x00000000004636d3 in PyEval_CallObjectWithKeywords (func=0x2a955ecde8, arg=0x2a955eafc8, kw=0x0) at Python/ceval.c:3346
#12 0x0000002a97ca9b85 in pyg_closure_marshal (closure=0x80c390, return_value=0x7fbfffcda0, n_param_values=2,
    param_values=0x7fbfffcf10, invocation_hint=0x7fbfffc97c, marshal_data=0x2a955e89f4) at pygtype.c:776
#13 0x0000003f94b0b71f in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#14 0x0000003f94b1d3cf in g_signal_emit_by_name () from /usr/lib64/libgobject-2.0.so.0
#15 0x0000003f94b1c0e8 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#16 0x0000003f94b1c643 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#17 0x0000003f95cea1a6 in gtk_widget_send_expose () from /usr/lib64/libgtk-x11-2.0.so.0
#18 0x0000003f95c0afcb in gtk_main_do_event () from /usr/lib64/libgtk-x11-2.0.so.0
#19 0x0000003f95531648 in gdk_window_clear_area_e () from /usr/lib64/libgdk-x11-2.0.so.0
#20 0x0000003f9553170d in gdk_window_process_all_updates () from /usr/lib64/libgdk-x11-2.0.so.0
#21 0x0000003f95531758 in gdk_window_process_all_updates () from /usr/lib64/libgdk-x11-2.0.so.0
#22 0x0000003f94727b3e in g_child_watch_add () from /usr/lib64/libglib-2.0.so.0
#23 0x0000003f94724c02 in g_main_depth () from /usr/lib64/libglib-2.0.so.0
#24 0x0000003f94725c34 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#25 0x0000003f94725f1e in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#26 0x0000003f947264cd in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#27 0x0000003f95c0a9d1 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#28 0x0000002a97ee8463 in _wrap_gtk_main (self=0x84f1f0) at gtk.override:867
#29 0x000000000046390b in call_function (pp_stack=0x7fbfffd518, oparg=-1731227456) at Python/ceval.c:3425
#30 0x0000000000461bcc in eval_frame (f=0x6619e0) at Python/ceval.c:2116
#31 0x0000000000462879 in PyEval_EvalCodeEx (co=0x2a955de260, globals=0x7fbfffc920, locals=0x2a955e89f4, args=0x0, argcount=0, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#32 0x0000000000464ed2 in PyEval_EvalCode (co=0x84f1f0, globals=0x7fbfffc920, locals=0x2a955e89f4) at Python/ceval.c:537
#33 0x000000000048ef89 in run_node (n=0x2a955d9050, filename=0x7fbfffc920 "", globals=0x64a1f0, locals=0x64a1f0, flags=0x2a955e89f4)
    at Python/pythonrun.c:1265
#34 0x000000000048e848 in PyRun_SimpleFileExFlags (fp=0x619010, filename=0x7fbfffe044 "text.py", closeit=1, flags=0x7fbfffd6d4)
    at Python/pythonrun.c:862
#35 0x000000000041133a in Py_Main (argc=1, argv=0x7fbfffd7f8) at Modules/main.c:415
#36 0x00000030a081c072 in __libc_start_main () from /lib64/tls/libc.so.6
#37 0x0000000000410dea in _start ()
#38 0x0000007fbfffd7e8 in ?? ()
#39 0x0000000000000000 in ?? ()

More information about the cairo mailing list