[pygtk] gtk.IconView random segfault
Mitko Haralanov
mitko at qlogic.com
Thu Jul 10 07:02:47 WST 2008
On Tue, 08 Jul 2008 19:57:23 -0400
Felipe Reyes <felipereyes at gmail.com> wrote:
> I added a test case that shows (at least on my system) my trouble.
>
> somebody can give me a clue?
The issue is locking. Changing the code to this seems to have solved
the problem:
class FillListStore(threading.Thread):
def run(self):
gtk.gdk.threads_enter ()
model.clear()
for i in range(600):
a = random.randint(0, len(img)-1)
model.append ([gtk.gdk.pixbuf_new_from_file_at_size(rootdir + img[a], 64, 64),
str (i)])
gtk.gdk.threads_leave ()
thread = FillListStore()
thread.start()
win.show_all()
gtk.gdk.threads_enter ()
gtk.main()
gtk.gdk.threads_leave ()
--
Mitko Haralanov
==========================================
67. Well, _my_ files were backed up.
--Top 100 things you don't want the sysadmin to say
More information about the pygtk
mailing list