Hi,
I'm having continuous crashes in "ListStore.set_sort_func" callback.
I've attached a sample code to show what happens.
I explain the program:
a flat treeview with 3 columns: numbers, strings, and percent-strings.
Ex. 17, "17", and "17%".
I want a custom function to sort the percent column, so I'm using
"ListStore.set_sort_func" on column 2 to get the %-strings, get the
numbers and sort them.
But my sort callback ("sort_percent2") crashes when accesing the TreeIter.
I've looked at debug but I couldn't find anything useful:
255 _tmp0_ = gtk_list_store_iter_is_valid (self->priv->model, iter1);
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0x00000000004022fb in my_app_sort_percent2 (self=0x63c0a0,
model2=0x7fffffffcb80, iter1=0x7fffffffcb60, iter2=0x6f8020) at
test-sort.c:255
255 _tmp0_ = gtk_list_store_iter_is_valid (self->priv->model, iter1);
First I think problem was with the GValues, but "iter_is_valid"
suggests is with Iters.
Is this a bug in Vala? a coding mistake on my part?
My system is Fedora Linux 14 x86_64. I've tried vala 0.11.7 (compiled
by me) and 0.10.3 (Fedora 14 package). Both with the same results.
Thanks in advance,
Iñigo Serna
Attachment:
test-sort.vala
Description: Binary data