GNOME Bugzilla – Bug 682971
Invalid text buffer iterator pressing dot keyboard key
Last modified: 2014-12-23 04:18:43 UTC
This bug is original reported in Launchpad in https://bugs.launchpad.net/bugs/1043034 as follow: --- I noted this issue in quantal, in lucid it previously work perfect. I am spanish with a spanish keyboard layout and spanish locale. When I try to make some simply maths like: 5 * 1,05 it works, because in my spanish locale, the decimal numers are noted with comma and thousand with dot. For example: 100.000,99 But sometimes you want use dot for decimal like: 5 * 1.05 that it is not valid in my locale, but spanish people often use english notation for decimals. Then the character is not written and in console appears this error: (gcalctool:31135): 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 My locale output: $ locale LANG=es_ES.UTF-8 LANGUAGE= LC_CTYPE="es_ES.UTF-8" LC_NUMERIC="es_ES.UTF-8" LC_TIME="es_ES.UTF-8" LC_COLLATE="es_ES.UTF-8" LC_MONETARY="es_ES.UTF-8" LC_MESSAGES="es_ES.UTF-8" LC_PAPER="es_ES.UTF-8" LC_NAME="es_ES.UTF-8" LC_ADDRESS="es_ES.UTF-8" LC_TELEPHONE="es_ES.UTF-8" LC_MEASUREMENT="es_ES.UTF-8" LC_IDENTIFICATION="es_ES.UTF-8" LC_ALL= ProblemType: Bug DistroRelease: Ubuntu 12.10 Package: gcalctool 6.5.90.1-0ubuntu1 ProcVersionSignature: Ubuntu 3.5.0-1.1-generic 3.5.0-rc3 Uname: Linux 3.5.0-1-generic i686 ApportVersion: 2.5.1-0ubuntu2 Architecture: i386 Date: Wed Aug 29 03:08:51 2012 InstallationMedia: ProcEnviron: TERM=xterm PATH=(custom, no user) LANG=es_ES.UTF-8 SHELL=/bin/bash SourcePackage: gcalctool UpgradeStatus: Upgraded to quantal on 2012-06-05 (84 days ago)
Created attachment 233514 [details] [review] Solve invalid text buffer iterator warning. Use locale based radix character to identify correct key for decimal point.
Review of attachment 233514 [details] [review]: This does not fix the problem for me. I ran: LANG=es_ES.UTF-8 ./src/gnome-calculator and entered "1." The following warning was printed to stderr: (gnome-calculator:6693): 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
Note there also seems to be a related issue with: LANG=fr_FR.UTF-8 ./src/gnome-calculator Entering "1 " has the same warning.
Created attachment 247189 [details] The call trace of errornous condition. This is the call trace of application (run with argument "--g-fatal-warnings") when the Warning appears. Seems like there is a problem with the way key press events are handled. Not sure how we can fix this. :/
Another way to trigger this warning (regardless of locale) is to enable the Show Thousands Separator preference and type four digits.
*** This bug has been marked as a duplicate of bug 737291 ***