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 611069 - Using invisible chars causes a Gtk-ERROR: Byte index is off the end of the line
Using invisible chars causes a Gtk-ERROR: Byte index is off the end of the line
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-02-25 13:16 UTC by Noam Yorav-Raphael
Modified: 2018-04-15 00:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Short Python file needed to reproduce the bug (395 bytes, text/x-python)
2010-02-25 13:16 UTC, Noam Yorav-Raphael
  Details
Traceback created by gdb (2.72 KB, text/plain)
2010-02-25 13:17 UTC, Noam Yorav-Raphael
  Details
Another python program which shows the bug, using GI (487 bytes, text/plain)
2012-02-04 22:59 UTC, Noam Yorav-Raphael
  Details
A patch which fixes the bug! (1017 bytes, patch)
2012-02-04 23:00 UTC, Noam Yorav-Raphael
none Details | Review

Description Noam Yorav-Raphael 2010-02-25 13:16:34 UTC
Created attachment 154681 [details]
Short Python file needed to reproduce the bug

Hello,

This report follows https://bugs.launchpad.net/dreampie/+bug/525429 ; I've managed to reproduce it without the need of a big GUI application.

To reproduce:

Download the attached fold_bug.py file.
Run: python fold_bug.py.

A window appears, blank because it didn't have the time to refresh.
Move the mouse cursor over the window.
I get this:

fold_bug.py:19: GtkWarning: /build/buildd/gtk+2.0-2.18.3/gtk/gtktextbtree.c:4017: byte index off the end of the line
  gtk.main_iteration(False)

Gtk-ERROR **: Byte index 12 is off the end of the line
aborting...
Aborted (core dumped)

I attach the relevant lines from the stack trace created by gdb.

I'm using ubuntu karmic 9.10 on i386.

Thanks,
Noam
Comment 1 Noam Yorav-Raphael 2010-02-25 13:17:08 UTC
Created attachment 154682 [details]
Traceback created by gdb
Comment 2 Noam Yorav-Raphael 2012-02-04 22:59:19 UTC
Created attachment 206794 [details]
Another python program which shows the bug, using GI

I changed the Python program a bit, to use GI and to be a bit clearer.
It now adds the lines when idle, so the window is drawn.
Comment 3 Noam Yorav-Raphael 2012-02-04 23:00:58 UTC
Created attachment 206795 [details] [review]
A patch which fixes the bug!

(copied from the patch: )
GtkTextView uses does some processing when idle. However, if events
are handled before the processing is done, the program may crash.
This change makes sure that the processing is done before events
are handled.
Comment 4 Szymon 2012-08-09 22:34:46 UTC
Please fix it, we have patch, you just need to review it and implement it..

How long it usually takes them ( developer ) to fix bug ?
Comment 5 Matthias Clasen 2018-02-10 05:16:22 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 6 Matthias Clasen 2018-04-15 00:08:32 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new