Treeview help needed

Hi everybody,

I am stuck with a segmentation fault caused by a treeview and I have pent hours trying to figure out what's wrong with no success.

Here is how I create the model (I simplified the code... but this version crashes as well...)
  while (item)
      gtk_list_store_append (store, &iter);
      gtk_list_store_set (store, &iter,


The segmentation fault happens when I remove an item with this code:
 gtk_tree_model_get (model,&iter,
  		      0, &state, 
  		      1, &mime_type,

  if (gtk_tree_selection_get_selected (listSelection, NULL, &iter))
    gtk_list_store_remove (GTK_LIST_STORE (model), &iter);

Here is what ddd says:
(gtktalog:5396): Gtk-CRITICAL **: file ../../gtk/gtkliststore.c: line 566 (gtk_list_store_get_value): assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed

(gtktalog:5396): GLib-GObject-WARNING **: gtype.c:2967: type id `0' is invalid

(gtktalog:5396): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

Program received signal SIGSEGV, Segmentation fault.
0x40420746 in gtk_tree_model_get_valist () from /usr/lib/
(gdb) next
Single stepping until exit from function gtk_tree_model_get_valist, 
which has no line number information.
Cannot find user-level thread for LWP 5396: generic error

I would realy appreciate any hint becasue I am totally stuck in the devel because of that, I did not progress since Xmas.....2002.....

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