Ticket #1205 (new defect)
cellLayoutSetAttributes on a TreeModelSort leads to crashes
| Reported by: | guest | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11.0 |
| Component: | general (Gtk+, Glib) | Version: | 0.11.0 |
| Keywords: | Cc: | gtk2hs-bug-tracker@… |
Description
I wanted to make my existing tree view sortable. So I wrapped my ListStore? in a TreeModelSort?, and assumed that my existing code would work as-is using the wrapped model.
But unfortunately it crashes. By comparing my code to the TreeSort?.hs example, I've constructed a test case (attached). Using cellLayoutSetAttributeFunc and manually translating the wrapped iter into an iter on the underlying model, retrieving the row, and using that value works; using cellLayoutSetAttributes to set a callback that receives the value directly crashes with:
** (tree-model-sort-crash:27346): CRITICAL **: gtk2hs_store_get_impl: assertion `GTK2HS_IS_STORE(store)' failed
So this seems like it's probably a bug in either the TreeModelSort? binding, or the CustomStore? implementation. This occurs with 0.11.0 (in Debian) and darcs head as of a few weeks ago. (I'm on a flakey conference network, so can't pull the very latest.)