Re: Segfault and cheep mend of gtk_combo_box_get_active_text



Hi Olivier,

As there seems to be nothing wrong with you programm as such, can you try to get a backtrace by running your same in gdb.
> gdb ./example
and after is seg-faulted
> bt

if you get a good backtrace (that shows where it crashes), file a bugreport in bugzilla and attach the backtrace.

Stefan

Global response for short :

Selecter now is :
void selecter(GtkComboBox *combo, gpointer user_data)
{
    gchar *name;
    if (user_data != NULL){printf("What ???");};
    if (combo != GTK_COMBO_BOX(my_combo_box))
        printf("not initialized!!!\n");

    printf("line %d\n", __LINE__);
    if (combo != NULL) {
        printf("line %d\n", __LINE__);
        name = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
        printf("line %d\n", __LINE__);
        if (name == NULL) {
            printf("line %d\n", __LINE__);
            printf("What are we doing in here ???");
            printf("line %d\n", __LINE__);
        } else {
            printf("line %d\n", __LINE__);
            printf("Ok %s \n", name);
            printf("line %d\n", __LINE__);
        };};
}
and selecting answers that
  user_data is indeed NULL
  combo is my_combo_box up to cast
  combo is non NULL
  instruction "name = gtk_combo_box_get_active_entry..."
               yields the segfaut.
:-(
Sunny day on a stubborn script :-)
Best, Olivier

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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