Re: GET_SORT_COLUMN_ID segfault




On Dec 27, 2006, at 6:19 PM, Jens Luedicke wrote:

On 12/27/06, muppet <scott asofyet org> wrote:

sort_column_id and order are return parameters, pointers to the
location at which the values should be stored.  The code in
gtk2perl_tree_sortable_get_sort_column_id() expects them never to be
NULL (because it doesn't make sense to call the function if you
aren't going to get them), and is segfaulting when trying to
dereference a null pointer.  However, we should be more robust than
that...  In gtk+ HEAD, the code in gtk_tree_view_column_update_button

I understand the C part of your explanation, but the column and order
are predefined in my custom ListStore and not undefined.

Whether they are defined in your custom store is irrelevant; gtk_tree_view_column_update_button() (a private function inside GtkTreeViewColumn) is calling the iface's vfunc with a NULL because it doesn't care about the order value. So, you're returning it properly, but when the binding goes to store the value you returned, it's attempting to dereference an invalid pointer, passed in by other C code (not your perl code).

So, basically, just a binding bug.





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