Bug in ctree:resync_selection?




I'm not sure what's causing this or what's going on in gtk, but I'll do my
best to explain.  I'm using gtk 1.2.6 (compiled and installed locally,
rest is debian potato).

I get the GDK_BUTTON_RELEASE signal for my window.  I'm not sure what key
I'm pressing (cause be from switching virtual windows).  18 function calls
down is resync_selection in ctree.

In resync_selection:

clist->anchor is 1
clist->drag_pos is -1

so, this is set at the top of the function:
i = -1
e = 1

clist->undo_selection is 0, so that code is skiped.

clist->anchor >= clist->drag_pos, so now we're at in the else (line 5704
in version 1.2.6):

for (node = GTK_CTREE_NODE (g_list_nth (clist->row_list, e)); i <= e;
	   e--, node = GTK_CTREE_NODE_PREV (node))
  if (GTK_CTREE_ROW (node)->row.selectable)
  [...]

On the 3rd iteration, node will be NULL since the -1th thing in the list
is NULL (or really, the thing before the thing before the 1st thing is
null, since we're doing _PREV's).

Then, I think we seg fault on GTK_CTREE_ROW(node) (ctree line ~5707).

Since I don't have a deep understanding of what's going on here, I have no
suggestions on how to fix it.  It's very possible that I'm doing something
weird in my code and that's causing it.

The code looks the same in HEAD.

Thanks,
David


-- 
      __          _    __ 
  ___/ /__ __  __(_)__/ /  David Helder - University of Michigan
 / _  / _ `/ |/ / / _  /   dhelder@umich.edu
 |_,_/|_,_/|___/_/|_,_/    http://www.eecs.umich.edu/~dhelder




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