Hi there, After some hard code revisions, I decided to "eat" Valgrind's manual, install it and BINGO!: <q> ==6797== ==6797== Invalid memory access of size 4 ==6797== at 0x80662B3: a_Selection_button_press (selection.c:142) ==6797== by 0x805EB8F: Dw_page_send_selection_event (dw_page.c:1486) ==6797== by 0x805EE47: Dw_page_button_press (dw_page.c:1499) ==6797== by 0x806474D: Dw_widget_mouse_event (dw_widget.c:740) ==6797== Address 0x40D714F0 is 0 bytes inside a block of size 52 free'd ==6797== at 0x40148050: free (in /usr/local/lib/valgrind/valgrind.so) ==6797== by 0x403C1FE8: g_free (in /usr/lib/libglib-1.2.so.0.0.10) ==6797== by 0x8057CA1: a_Dw_ext_iterator_new (dw_ext_iterator.c:171) ==6797== by 0x8066286: a_Selection_button_press (selection.c:136) </q> What does this mean? As a_Dw_ext_iterator_new(it) may _free_ 'it', 'it' should no longer be used after that call. That was the case with the page (right-click test case). I commited a short _code_change_ that avoids the problem. It is not a "patch" but just illustrative code. I believe the functions that may have side effects on their arguments should use an API that somehow reflects that. For instance: DwExtIterator* a_Dw_ext_iterator_new (DwIterator *it); and be used like: a_Dw_ext_iterator_new(&it); so 'it' can be NULL at return time. The same applies for a_Dw_iterator_free() and friends. BTW, the first approach I wrote was to force a_Dw_iterator_free to make NULL its argument). Well, that's it. As I don't know the iterators code as well as Sebastian, I'll let him make the decisions. Hope this helps Happy :) Jorge.-