Ticket #1205 (new defect)

Opened 4 years ago

Last modified 4 years ago

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.)

Attachments

tree-model-sort-crash.hs (1.3 kB) - added by guest 4 years ago.
Run with --crash to reproduce the crash.

Change History

Changed 4 years ago by guest

Run with --crash to reproduce the crash.

Changed 4 years ago by guest

  • cc gtk2hs-bug-tracker@… added
Note: See TracTickets for help on using tickets.