How can I debug (and reach some breakpoint) using gdbmy buggy program (using GTK3) that displays:
(monimelt:161): 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
FWIW, a failed program is some free GPLv3 software that I am developing (I asked the same question where I give more context and explanation). It is located on github: commit fc8e0b247d8dac4 (to reproduce my error, create it, run it as ./monimelt, enter exactly p a y TABin the window marked with the monimelt command).
I tried (everything, in the same session gdb):
, Gtk-WARNING **: Invalid text buffer iterator .
, GTK pthreads , , ...
....
- ( commit 82bb111402fdd97...). gtk_text_buffer_insert gtk_text_iter_get_offset ().
, . gtk+-3.21.6.tar.xz, gtk/gtktextiter.c 180 :
extern void basile_gtk_text_iter_warning (void);
void basile_gtk_text_iter_warning (void)
{
usleep (1000);
}
static GtkTextRealIter*
gtk_text_iter_make_surreal (const GtkTextIter *_iter)
{
GtkTextRealIter *iter = (GtkTextRealIter*)_iter;
if (iter->chars_changed_stamp !=
_gtk_text_btree_get_chars_changed_stamp (iter->tree))
{
g_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.\nYou must use marks, character numbers, "
"or line numbers to preserve a position across buffer "
"modifications.\nYou can apply tags and insert marks "
"without invalidating your iterators,\n"
"but any mutation that affects 'indexable' buffer contents "
"(contents that can be referred to by character offset)\n"
"will invalidate all outstanding iterators");
basile_gtk_text_iter_warning ();
return NULL;
}
, (w.r.t. pristine GTK3.21.26), - basile_gtk_text_iter_warning, gdb.
, , , .
, - , GTK3? , , , GDB (, GTK3).
, --g-fatal-warnings ,
(monimelt:21949): Gtk-WARNING **: Failed to get the GNOME session proxy:
The name org.gnome.SessionManager is not owned
, - Mate, Gnome. gtk_application_new g_application_run activate mom_gtkapp.
PS. Linux/Debian/Sid/x86-64 GTK3 3.21.5, GCC6 -g3 -Og...