tree store gtk warning



hi hi,

I trying to resolve this since two days now and I must admit - I don't see it.

Thats the message I receve switching to the tab the tree-view is on and below is
the gdb stacktrace.

Gtk-CRITICAL **: file gtkliststore.c: line 569 (gtk_list_store_get_value):
assertion `column < GTK_LIST_STORE (tree_model)->n_columns' failed
aborting...

Program received signal SIGABRT, Aborted.
[Switching to Thread 1085664672 (LWP 6183)]
0xffffe410 in ?? ()
(gdb) bt
#0  0xffffe410 in ?? ()
#1  0xbfffe138 in ?? ()
#2  0x00000006 in ?? ()
#3  0x00001827 in ?? ()
#4  0x4087ad41 in raise () from /lib/tls/libc.so.6
#5  0x4087c529 in abort () from /lib/tls/libc.so.6
#6  0x40802aa5 in g_logv () from /opt/gnome/lib/libglib-2.0.so.0
#7  0x40802ae2 in g_log () from /opt/gnome/lib/libglib-2.0.so.0
#8  0x401c6f98 in gtk_list_store_get_value () from
/opt/gnome/lib/libgtk-x11-2.0.so.0
#9  0x4028a0b9 in gtk_tree_model_get_value () from
/opt/gnome/lib/libgtk-x11-2.0.so.0
#10 0x4029027d in gtk_tree_model_filter_get_value () from
/opt/gnome/lib/libgtk-x11-2.0.so.0
#11 0x4028a0b9 in gtk_tree_model_get_value () from
/opt/gnome/lib/libgtk-x11-2.0.so.0
#12 0x402b8022 in gtk_tree_view_column_cell_set_cell_data () from
/opt/gnome/lib/libgtk-x11-2.0.so.0
#13 0xbfffe970 in ?? ()
#14 0x083e8bb0 in ?? ()
#15 0xbfffe810 in ?? ()
#16 0x0829e570 in ?? ()
#17 0x083198c8 in ?? ()
#18 0xbfffe848 in ?? ()
#19 0x402b7e18 in gtk_tree_view_column_cell_get_size () from
/opt/gnome/lib/libgtk-x11-2.0.so.0
Previous frame inner to this frame (corrupt stack?)

Here is the source (it maight take an hour or two before sf.net refreshes the
page to reflect the last-commit):
http://cvs.sourceforge.net/viewcvs.py/buzztard/buzztard/src/ui/edit/main-page-sequence.c?view=markup

And here is an excerpt of the essential part:

col_ct=(SEQUENCE_TABLE_PRE_CT+track_ct);
store_types=(GType *)g_new(GType *,col_ct);
// for background color columns
store_types[SEQUENCE_TABLE_SOURCE_BG   ]=GDK_TYPE_COLOR;
store_types[SEQUENCE_TABLE_PROCESSOR_BG]=GDK_TYPE_COLOR;
store_types[SEQUENCE_TABLE_SINK_BG     ]=GDK_TYPE_COLOR;
// for static display columns
store_types[SEQUENCE_TABLE_POS         ]=G_TYPE_LONG;
// for track display columns
for(i=SEQUENCE_TABLE_LABEL;i<col_ct;i++) {
  store_types[i]=G_TYPE_STRING;
}
store=gtk_list_store_newv(col_ct,store_types);
g_free(store_types);

for(i=0;i<rows;i++) {
  gtk_list_store_append(store, &tree_iter);
  for(j=0;j<track_ct;j++) {
    ...
    gtk_list_store_set(store,&tree_iter,SEQUENCE_TABLE_PRE_CT+j,str,-1);
  }
}
gtk_tree_view_set_model(self->priv->sequence_table,store);
for(j=0;j<track_ct;j++) {
  renderer=gtk_cell_renderer_text_new();
  g_object_set(G_OBJECT(renderer),"editable",TRUE,NULL);
  gtk_tree_view_insert_column_with_attributes(
    self->priv->sequence_table,-1,NULL,renderer,
    "text",SEQUENCE_TABLE_PRE_CT+j,
    NULL);
}

Any help is hightly appreciated. Should those messages trigger a bit earier (on
creation time).

Ciao
  Stefan

-- 
      \|/            Stefan Kost
     <@ @>           private            business
+-oOO-(_)-OOo------------------------------------------------------ - - -  -   -
|       __  Address  Simildenstr. 5     HTWK Leipzig, Fb IMN, Postfach 301166
|      ///           04277 Leipzig      04251 Leipzig
| __  ///            Germany            Germany
| \\\///    Phone    +49341 2253538     +49341 30766101
|  \__/     EMail    st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
|           WWW      www.sonicpulse.de  www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -


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