[pygtk] Making gtk.IconView sortable. Crashes at model.clear().

Osmo Maatta osmoma at gmail.com
Wed Feb 24 23:49:59 WST 2010


Hello,

I have a small application that shows thumbnail-images in a gtk.IconView 
widget.
The thumbnails are sortable on filename, file size and date. The sorting 
seems to work fine.

But the program crashes when I try to reload the thumbnails.

Here is a picture of the application.
http://bildr.no/view/595635
When I press the [Reload thumbnails] button 2'nd time, the program 
crashes with "Segmentation fault". 
No other error messages appear.

The crash happens at self.clear_display() function. It simply finds the 
model/ListStore and clears it.

model_sort = self.get_model()
model = model_sort.get_model()
model.clear()

Can you help me to spot the error.

The first version was un-sortable and it worked very well. But I really 
want to make it sortable.
Here is a complete test-code: http://www.futuredesktop.com/tmp/Test6.zip

My system is Ubuntu Linux 9.10, 64bit.
-----
Most kindly
  Moma Antero


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20100224/1cc2feb6/attachment-0001.htm 


More information about the pygtk mailing list