Hi,

I've cross compiled clutter 0.8 and its dependencies for an arm platform.
It's working but when I try to create a label in my application I get a
crash :


 ./SimpleText
*** glibc detected *** ./SimpleText: munmap_chunk(): invalid pointer:
0x000827e8 ***
======= Backtrace: =========
/lib/libc.so.6[0x40a57af4]
./SimpleText[0x21a70]
./SimpleText[0xf35c]
./SimpleText(FcConfigSubstituteWithPat+0x59c)[0xfa5c]
./SimpleText(FcConfigSubstitute+0x30)[0xfdc0]
/opt/pango/lib/libpangocairo-1.0.so.0[0x40211f8c]


I've configured fontconfig : fc-match,fc-cache, fc-cat and fc-list are
working. Fontconfig and it's subdirs are in /opt but I've specified the
correct path in  LD_LIBRARY_PATH.

Here you can take a look at the code, it's writen in vala, if you need the C
generated code tell me :


using GLib;
using Clutter;

public class SimpleText : GLib.Object {

    private Clutter.Stage stage;
    construct {
        Clutter.Color actor_color = {(uchar) 0xff, (uchar) 0x00, (uchar)
0xaa, (uchar) 0x99};
        this.stage = (Clutter.Stage) Clutter.Stage.get_default ();
        this.stage.set_size (800, 480);
        this.stage.show ();
        Clutter.Label label = new Clutter.Label.full ("Sans 12", "Hello !",
actor_color);
        label.set_position (50, (int) this.stage.get_height () - (int)
label.get_height () - 50);
        this.stage.add_actor (label);
        label.show ();
    }


    public static void main (string[] args) {
        Clutter.init (ref args);
        SimpleText text = new SimpleText ();
        Clutter.main ();
    }
}


When take a look at the program with gdb I can see the crash happens with
"clutter_actor_set_position"  :

 clutter_actor_set_position ((ClutterActor*) label, 50, (((gint)
clutter_actor_get_height ((ClutterActor*) self->priv->stage)) - ((gint)
clutter_actor_get_height ((ClutterActor*) label))) - 50); // this is C
generated code

There is details :

70            clutter_container_add_actor ((ClutterContainer*)
self->priv->stage, (ClutterActor*) label);
(gdb) step
clutter_label_new_full (font_name=0x40013ec0 "", text=0xbe9b58b4 "��",
color=0x0) at clutter-label.c:668
668    clutter-label.c: No such file or directory.
    in clutter-label.c
(gdb) step
667    in clutter-label.c
(gdb) step
668    in clutter-label.c
(gdb) step
clutter_label_get_type () at clutter-label.c:48
48    in clutter-label.c
(gdb) step
g_once_init_enter (value_location=0x4069bd28) at
/opt/glib/include/glib-2.0/glib/gthread.h:339
warning: Source file is more recent than executable.
339      if G_LIKELY (g_atomic_pointer_get ((void*volatile*) value_location)
!= NULL)
(gdb) step
342        return g_once_init_enter_impl (value_location);
(gdb) step
IA__g_once_init_enter_impl (value_location=0x4069bd28) at gthread.c:206
206    gthread.c: No such file or directory.
    in gthread.c
(gdb) step
204    in gthread.c
(gdb) step
206    in gthread.c
(gdb) step
204    in gthread.c
(gdb) step
206    in gthread.c
(gdb) step
207    in gthread.c
(gdb) step
209    in gthread.c
(gdb) step


I hope someone will have an idea of what I can do to solve this problem and
display text with clutter.

Thanks,

Reply via email to