After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682971 - Invalid text buffer iterator pressing dot keyboard key
Invalid text buffer iterator pressing dot keyboard key
Status: RESOLVED DUPLICATE of bug 737291
Product: gnome-calculator
Classification: Core
Component: general
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-29 18:34 UTC by Ángel Guzmán Maeso (shakaran)
Modified: 2014-12-23 04:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Solve invalid text buffer iterator warning. (1.10 KB, patch)
2013-01-15 11:23 UTC, PioneerAxon
needs-work Details | Review
The call trace of errornous condition. (9.90 KB, text/plain)
2013-06-18 17:44 UTC, PioneerAxon
  Details

Description Ángel Guzmán Maeso (shakaran) 2012-08-29 18:34:34 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)
Comment 1 PioneerAxon 2013-01-15 11:23:51 UTC
Created attachment 233514 [details] [review]
Solve invalid text buffer iterator warning.

Use locale based radix character to identify correct key for decimal point.
Comment 2 Robert Ancell 2013-01-19 01:11:49 UTC
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
Comment 3 Robert Ancell 2013-01-19 01:13:03 UTC
Note there also seems to be a related issue with:

LANG=fr_FR.UTF-8 ./src/gnome-calculator

Entering "1 " has the same warning.
Comment 4 PioneerAxon 2013-06-18 17:44:54 UTC
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. :/
Comment 5 Michael Catanzaro 2014-05-29 14:36:21 UTC
Another way to trigger this warning (regardless of locale) is to enable the Show Thousands Separator preference and type four digits.
Comment 6 Michael Catanzaro 2014-12-23 04:18:43 UTC

*** This bug has been marked as a duplicate of bug 737291 ***