Skip to content

Y20260423-1000

@akurtakov akurtakov tagged this 22 Apr 18:12
Calling createRenderers() (which invokes
gtk_tree_view_column_clear()) is unsafe when setImage() call originates
from a SWT.SetData listener, because GTK is currently iterating the
column's cell renderer list inside
gtk_tree_view_column_cell_set_cell_data().
This frees that list while GTK still holds a pointer into it, causing a
use-after-free SIGSEGV on GTK3
(https://github.com/eclipse-platform/eclipse.platform.swt/issues/678 ).
Instead, toggle the fixed-height-mode GObject property off and back on.
This resets GTK's cached row height (fixed_height = -1) and schedules an
async widget resize, so GTK will re-measure on the next layout pass and
pick up the updated renderer size. Unlike gtk_tree_view_column_clear(),
this does not modify the renderer list and is therefore safe to call
from within a cell_data_func callback.

Tested that Debug and variable views don't have icons without the
fixed_height_mode off/on setting and icons are fine with it.
Assets 2
Loading