It seems the situation unfolds as follows:
* refresh button triggers compselect_callback_refresh_library
* compselect->libtreeview model is updated first
* update triggers compselect_callback_tree_selection_changed
* callback checks the selection update came from library view
* "buffer" property is correctly set to NULL
* x_compselect_callback_response is triggered
* "symbol" property is read
* compselect_get_property doesn't check where the selection came from
* in use tree view is queried for selection
* stale pointer is returned and passed to o_complex_prepare_place
One solution I can think of is to block "changed" GtkTreeSelection event
handlers while updating the GtkTreeViews with new models.
I have tested this and it works, but maybe someone has a cleaner fix...
It seems the situation unfolds as follows: callback_ refresh_ library >libtreeview model is updated first callback_ tree_selection_ changed callback_ response is triggered get_property doesn't check where the selection came from prepare_ place
* refresh button triggers compselect_
* compselect-
* update triggers compselect_
* callback checks the selection update came from library view
* "buffer" property is correctly set to NULL
* x_compselect_
* "symbol" property is read
* compselect_
* in use tree view is queried for selection
* stale pointer is returned and passed to o_complex_
One solution I can think of is to block "changed" GtkTreeSelection event
handlers while updating the GtkTreeViews with new models.
I have tested this and it works, but maybe someone has a cleaner fix...
A memory leak is plugged in the second patch.