Hi all, I'm programming a syntax-highlighting engine on top of the new text widget, but I get some segfaults. This is the start of the backtrace: Program received signal SIGSEGV, Segmentation fault. 0x4012aabc in _gtk_text_line_previous_could_contain_tag () from /usr/lib/libgtk-x11-2.0.so.0 #0 0x4012aabc in _gtk_text_line_previous_could_contain_tag () from /usr/lib/libgtk-x11-2.0.so.0 #1 0x4013a597 in gtk_text_iter_backward_to_tag_toggle () from /usr/lib/libgtk-x11-2.0.so.0 #2 0x0804b790 in doc_highlight_line (doc=0x808a4e8) at highlight5.c:769 #3 0x0804bcd3 in buffer_insert_text_lcb (textbuffer=0x808ab60, iter=0xbfffe104, string=0x81475d0 " ", len=1, doc=0x808a4e8) at highlight5.c:886 The line of code where the segfault happens: gtk_text_iter_backward_to_tag_toggle(&itstart,slist->data); itstart is initialized from: GtkTextMark *mark = gtk_text_buffer_get_insert(doc->buffer); gtk_text_buffer_get_iter_at_mark(doc->buffer, &itstart, mark); gtk_text_iter_set_line_offset(&itstart, 0); slist is a taglist initialized from: gtk_text_iter_get_tags(&itstart) so itstart is an iterator on the start of the line, and the tag I look for is actually started at the same position itstart is on at that very moment. it's not easy to reproduce in a very short program, so I hope this information will do. I noticed Debian also has a gtk2-debug package, would it help to do a backtrace with that package installed? regards, Olivier
Attachment:
pgpvwYFuqFz3Y.pgp
Description: PGP signature