Re: Invalid TextBuffer iterator



Hi,

I think there is no need to create a new TextBuffer, you could just write (and that's what I did in an application that uses a TextView whithout crashing):
m_refTextBuffer = get_buffer();

Or maybe creating the Mark after linking the TextBuffer to the TextView would do the trick…

yann

On 07/12/12 09:26, ch01 wrote:

Hi, I get an error when inserting and scrolling the Gtk::TextBuffer, when i
get the error the program sometimes crashes. This is the error i get:

  Gtk-WARNING **: Invalid text buffer iterator: either the iterator is
uninitialized, or the characters/pixbufs/widgets in the buffer have been
modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a
position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can
be referred to by character offset)
will invalidate all outstanding iterators

---------------------------------------------------------------------------------------
Here's my source code: http://pastebin.com/jrVCU8pm.
I have tried all my best to fix it, but i just couldn't. Any sort of help
would be appreciated.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]