GNOME Bugzilla – Bug 782701
Editing fail in silent crash for assertion: gtk_text_view_get_iter_location: assertion 'gtk_text_iter_get_buffer (iter) == get_buffer (text_view)'
Last modified: 2017-05-17 06:19:49 UTC
Created attachment 351983 [details] source edited Try to edit the source in attachment, a simple C++ source. Activated CLang completions. Trying to sobstitute the for limits (4000000000) with defined HOWMUCH, editing the constant in the first for is ok, in the second triggered the assertion: Warning: python3-lxml is not installed, no documentation will be available in Python auto-completion jedi not found, python auto-completion not possible. 18:06:48.0365 ide-source-snippet[ 21822]: CRITICAL: ide_source_snippet_begin: assertion '!self->buffer' failed 18:06:48.0365 Gtk[ 21822]: CRITICAL: gtk_text_buffer_get_iter_at_mark: assertion 'GTK_IS_TEXT_MARK (mark)' failed 18:06:48.0365 Gtk[ 21822]: CRITICAL: gtk_text_buffer_get_iter_at_mark: assertion 'GTK_IS_TEXT_MARK (mark)' failed (gnome-builder:21822): 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 (gnome-builder:21822): 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 (gnome-builder:21822): 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 18:06:48.0379 Gtk[ 21822]: CRITICAL: gtk_text_view_get_iter_location: assertion 'gtk_text_iter_get_buffer (iter) == get_buffer (text_view)' failed (gnome-builder:21822): 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 (gnome-builder:21822): 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 18:06:48.0379 Gtk[ 21822]: CRITICAL: gtk_text_view_get_iter_location: assertion 'gtk_text_iter_get_buffer (iter) == get_buffer (text_view)' failed (gnome-builder:21822): 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 Segmentation fault (core dumped)
hi, you edit it by using "open file" so outside of a project right ? I can't reproduce it, sorry. If you can, try provide a backtrace with debug symbols, thanks. The first error is a complain about a missing buffer in ide-source-snippet, but snippets are triggered by using TAB. The missing python3-lxml one does not make sense in this context (a c++ file) but is not the fatal error.
Hi, in fact. It's not a project, it's a folder like: "cpp" | |-- "01 - exc01" | | | |-- "exc01.cpp" | |-- "02 - exc02" | | | |-- "exc02.cpp" . . . etc. This is the dump with debug symbols: Warning: python3-lxml is not installed, no documentation will be available in Python auto-completion jedi not found, python auto-completion not possible. 20:41:15.0896 ide-source-snippet[ 5125]: CRITICAL: ide_source_snippet_begin: assertion '!self->buffer' failed 20:41:15.0896 Gtk[ 5125]: CRITICAL: gtk_text_buffer_get_iter_at_mark: assertion 'GTK_IS_TEXT_MARK (mark)' failed 20:41:15.0896 Gtk[ 5125]: CRITICAL: gtk_text_buffer_get_iter_at_mark: assertion 'GTK_IS_TEXT_MARK (mark)' failed (gnome-builder:5125): 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 (gnome-builder:5125): 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 (gnome-builder:5125): 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 20:41:15.0905 Gtk[ 5125]: CRITICAL: gtk_text_view_get_iter_location: assertion 'gtk_text_iter_get_buffer (iter) == get_buffer (text_view)' failed (gnome-builder:5125): 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 (gnome-builder:5125): 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 20:41:15.0905 Gtk[ 5125]: CRITICAL: gtk_text_view_get_iter_location: assertion 'gtk_text_iter_get_buffer (iter) == get_buffer (text_view)' failed (gnome-builder:5125): 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 Segmentation fault (core dumped) Hope it helps, builder is a great ide, so fast, so adwaita! :D
If it is not helpful, tell me how to bring you the dump you need, I will try :)
Yep we need a backtrace (bt under gdb) and even with that, no guarantee results. So, it depend how do you run gnome-builder: - under jhbuild: in a jhbuild shell do: G_DEBUG=fatal-warnings make run -under flatpak: general guide: https://github.com/flatpak/flatpak/wiki/Tips-&-Tricks https://blogs.gnome.org/mclasen/2017/01/20/debugging-a-flatpak-application/ so after having install the sdk: flatpak run -d --command=sh org.gnome.Builder G_DEBUG=fatal-warnings gdb /app/bin/gnome-builder r -vvvv from here you run gnome-builder under gdb and stop after each errors, c to continue if it's not your error (there can be some gtk at start), bt to show the backtrace terminal output (debug and trace statements can be useful too) - under your distro installed gnome-builder: G_DEBUG=fatal-warnings gdb /app/bin/gnome-builder r -vvvv For more realtime help, come see us on irc gimpnet #gnome-builder
So much output, pasted it: https://pastebin.com/JKTFHuLb This is with "gdb gnome-builder" :)
Excellent, thanks for going through the extra effort to help us out. I know how frustrating that can be sometimes. It looks like we have a snippet that hasn't been anchored while using the clang autocompletion plugin.
Created attachment 351996 [details] [review] clang: try harder to keep iter valid When performing our operation to activate the clang completion item, we want to ensure the iter passed to us stays valid. We also want to pass the iter location into push_snippet just to ensure we get the same location.
Created attachment 351997 [details] [review] sourceview: ensure we have valid textmarks for animations This checks that the marks we got from the source snippet are valid. Otherwise the textiters could be left in an invalid state. This also checks to ensure that animations are enabled before calling the animation helper.
It looks like there might be a bit of a race when cleaning up the textmarks from the snippet. They should be set after insertion, and we were expecting that. It cascaded into the iters being in an undefined state. I'll merge this to 3.24 as well. Attachment 351996 [details] pushed as f125e4b - clang: try harder to keep iter valid Attachment 351997 [details] pushed as 854174d - sourceview: ensure we have valid textmarks for animations
np, thank you for builder guys :D