I am experiencing some problem on gtk_tree_store_set when compiled on
amd64 or powerpc. The segfault I have in such cases is referring to
the fact that the argument list is not ended with -1.
Looking at the gtk+ code, I have found that gtk_tree_store_set is
calling gtk_tree_store_set_valist, but the "terminating argument" in
the va_start funtion is not -1 !!

Could this be the problem? I am attaching here the gtk+ code
concerning gtk_tree_store_set:

 * gtk_tree_store_set:
 * @tree_store: A #GtkTreeStore
 * @iter: A valid #GtkTreeIter for the row being modified
 * @Varargs: pairs of column number and value, terminated with -1
 * Sets the value of one or more cells in the row referenced by @iter.
 * The variable argument list should contain integer column numbers,
 * each column number followed by the value to be set. 
 * The list is terminated by a -1. For example, to set column 0 with type
 * %G_TYPE_STRING to "Foo", you would write 
 * <literal>gtk_tree_store_set (store, iter, 0, "Foo", -1)</literal>.
gtk_tree_store_set (GtkTreeStore *tree_store,
                    GtkTreeIter  *iter,
  va_list var_args;

  g_return_if_fail (GTK_IS_TREE_STORE (tree_store));
  g_return_if_fail (VALID_ITER (iter, tree_store));

  va_start (var_args, iter);
  gtk_tree_store_set_valist (tree_store, iter, var_args);
  va_end (var_args);

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