Segfault in tree_node_get_position
Steps to reproduce
I'm not sure if the root cause is in GJS, but somehow I am causing TreeListModel to segfault when removing items from a child model inside a
Settings::changed signal handler.
- Set up a ListBox with a TreeListModel, with the parent model being a set of GSettings keys corresponding to string-array values and the child models holding those values in a ListStore. The ListBox rows update
TreeListRow.expandedwhen activated, causing the child model to load and populate itself with values.
- Set up
Settings::changedto update the child ListStore when updating the corresponding GSettings key.
- Strange bit: Updating a Settings value works as expected, including adding/removing/changing child items in response. It is only after collapsing the parent row and expanding again (running through
TreeListModel.create_func) that updating the Settings value and modifying the child model results in a segfault.
- GTK 4.2.1
- NixOS 21.11 (Porcupine)