Re: Invalid TextBuffer iterator





Yann LEYDIER wrote:
> 
> 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.
>>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> https://mail.gnome.org/mailman/listinfo/gtkmm-list
> 
> 

I have modified the code to your suggestions but still no changes i still
get the same error :( .
here's the modified code:  http://pastebin.com/jrVCU8pm
-- 
View this message in context: http://old.nabble.com/Invalid-TextBuffer-iterator-tp34769943p34770071.html
Sent from the Gtkmm mailing list archive at Nabble.com.



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