[pygtk] crash and burn in gtk app
shawn bright
nephish at gmail.com
Thu Mar 22 22:37:19 WST 2007
hello there all.
i am getting this error, sometimes it comes as a warning, and
sometimes it crashes my GUI.
GtkWarning: gtk_text_layout_real_invalidate: assertion
`layout->wrap_loop_count == 0' failed
buffer.insert(buffer.get_end_iter(), data)
i am sure that it has something to do with how i plant data in a
buffer for a view.
the code i am using looks like this.
def write_to_viewer(data, buffer, viewer):
data = '%s\n' % data
buffer.insert(buffer.get_end_iter(), data)
if buffer.get_line_count() > 1000:
buffer.delete(buffer.get_start_iter(), buffer.get_iter_at_line(200))
mark = buffer.create_mark("end", buffer.get_end_iter(), False)
viewer.scroll_to_mark(mark, 0.05, True, 0.0, 1.0)
i have several threads that share this code, in the thread i use something like
def buffer_add(self, data):
write_to_viewer(data, self.buffer, self.view)
and i call it with
gobject.idle_add(self.buffer_add, data)
is there something in all of this that could be causing my GUI to crash ?
thanks
More information about the pygtk
mailing list