GNOME Bugzilla – Bug 737291
Crash when thousands separators are enabled
Last modified: 2014-12-23 04:18:43 UTC
* Enable thousands separators in preferences * Type a long number * See a bunch of warnings repeated a bajillion times * It will crash after a couple seconds (gnome-calculator:27188): 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-calculator:27188): Gtk-CRITICAL **: gtk_text_buffer_set_mark: assertion 'gtk_text_iter_get_buffer (iter) == buffer' failed (gnome-calculator:27188): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed (gnome-calculator:27188): GtkSourceView-WARNING **: Completion context without mark
+ Trace 234123
Hi, I can reproduce the warnings. However I'm unable to get it to crash. I'll try to use the trace provided, to figure out what's wrong. Thank you. :)
Hi, I upgraded the entire system to 3.14, and now I have the same issue. It seems that some change between GTK-3.12 and GTK-3.14 caused this issue. I don't have a system running 3.12, where I can test this. Can you check if it's true? Thanks.. :)
It's probably due to a change in either GtkSourceView or GTK+. I bet it won't crash if we fix the invalid iterator problem.
I figured out that the following two lines in create_autocompletion function results in the crash. When separators are inserted in the equation, the iterator somehow becomes invalid due to modified equation and hence the crash. completion.add_provider (new FunctionCompletionProvider ()); completion.add_provider (new VariableCompletionProvider (equation)); I am currently working on fixing this bug. Probably would find a solution for this soon enough.
Any update ? this would be fantastic to have fixed in 3.14.1. Just typing "1," into the calculator and having it crash is not great :-(
Created attachment 289186 [details] [review] Fix invalid GtkTextIter after inserting thousands separator So, I actually can't reproduce the crash anymore, I guess due to a change in GTK+ or maybe GtkSourceView. This patch fixes the warning and criticals. If anyone is still getting the crash, please reopen.
Attachment 289186 [details] pushed as 0d838a7 - Fix invalid GtkTextIter after inserting thousands separator
*** Bug 739811 has been marked as a duplicate of this bug. ***
*** Bug 682971 has been marked as a duplicate of this bug. ***