Opened 11 years ago

Last modified 10 years ago

#4666 new defect

Pidgin GTK Byte index off the end of line.

Reported by: Jaywalker Owned by:
Milestone: Component: pidgin (gtk)
Version: Keywords:
Cc:

Description

In the current development version of pidgin, since 2.4.0-devel, I've been continuously receiving a "Byte index XX off the end of line" where XX is some integer offset. Pidgin is the only GTK application doing this currently. From my research on the error message, it should be a simple offset fix somewhere in the GTK, that is, if it's not just me. The most similar site I found was http://www.reinteract.org/trac/ticket/16. Provided there was the ticket along with a patch, although it was in python. Maybe helpful?

From what I can tell, it is not picky about any protocol. It does it for all of them when I'm either sending or receiving an IM.

Here is the output from a gdb session followed with a backtrace:

(13:35:28) Gtk: gtktextbtree.c:3997: byte index off the end of the line
(13:35:28) Gtk: Byte index 46 is off the end of the line

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb70366d0 (LWP 15089)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt full
#0  0xffffe410 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb71b88f5 in raise () from /lib/libc.so.6
No symbol table info available.
#2  0xb71ba1e1 in abort () from /lib/libc.so.6
No symbol table info available.
#3  0xb74e53fa in g_logv () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#4  0xb74e5439 in g_log () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#5  0xb7c84fc6 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#6  0xb7d3b1b7 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#7  0x00000004 in ?? ()
No symbol table info available.
#8  0xb7ddc2f0 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#9  0x0000002e in ?? ()
No symbol table info available.
#10 0xbfcd1f8c in ?? ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#11 0xbfcd1f6c in ?? ()
No symbol table info available.
#12 0x00000000 in ?? ()
No symbol table info available.

Attachments (1)

disable_invisible_text.diff (1.6 KB) - added by MarkDoliner 11 years ago.
The patch prevents the crashes from happening by disable the use of invisible text.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 11 years ago by seanegan

  • Milestone set to 2.4.0
  • priority changed from minor to blocker

I'm hitting this too. I haven't debugged it, but I think it's related to new-style typing notification.

comment:2 Changed 11 years ago by seanegan

  • pending changed from 0 to 1

I've disapproved the revision that added this bug for the time being.

What version of GTK+ are you using? (pkg-config --modversion gtk+-2.0)

comment:3 Changed 11 years ago by Jaywalker

  • pending changed from 1 to 0

I'm using GTK+ version 2.12.0 on a SUSE 10.3 system.

comment:4 Changed 11 years ago by Jaywalker

The issue was fixed when you rejected the patch, Sean, but now it's occurring again. I've verified it's not an issue in update_typing_message() as I thought it could have been... But even with all references to the function commented out, crashes still occur. I can usually get about 3 messages out before a window will crash, it's rarely instant unless I receive an offline message when I come online.

comment:5 Changed 11 years ago by MarkDoliner

I have this problem, too. I'm using GTK+ 2.12.0 on Ubuntu 7.10 (Gutsy Gibbon). This seems like a pretty serious problem, and it might be wise for us to not release 2.4.0 until it's fixed.

I can reproduce the crash every time by signing on to my IRC account, then switching from "freenode-connect" tab to the "NickServ?" tab in the conversation window. It ONLY happens when timestamps are turned off (both the built-in timestamps and the timestamp plugin). It seems like it's related to invisible text. It does NOT seem like it's directly caused by the typing notification messages, but it might be related to changes needed for those messages.

The last two lines of debug output before the crash are:

(23:51:18) Gtk: /build/buildd/gtk+2.0-2.12.0/gtk/gtktextbtree.c:3997: byte index off the end of the line
(23:51:18) Gtk: Byte index 100 is off the end of the line

And here's a backtrack with debug info:

Program received signal SIGABRT, Aborted.
[Switching to Thread 47379516107984 (LWP 32398)]
0x00002b1765c42765 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00002b1765c42765 in raise () from /lib/libc.so.6
#1  0x00002b1765c441c0 in abort () from /lib/libc.so.6
#2  0x00002b176501e63b in g_logv () from /usr/lib/libglib-2.0.so.0
#3  0x00002b176501e6d3 in g_log () from /usr/lib/libglib-2.0.so.0
#4  0x00002b1761dfdc04 in gtk_text_iter_set_visible_line_index () from /usr/lib/libgtk-x11-2.0.so.0
#5  0x00002b1761e0054e in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#6  0x00002b1761e03d83 in gtk_text_layout_get_iter_at_position () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00002b1761e03e29 in gtk_text_layout_get_iter_at_pixel () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00002b1761e1766c in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00002b1761d6115d in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
#10 0x00002b17649a599a in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#11 0x00002b17649b5cc8 in ?? () from /usr/lib/libgobject-2.0.so.0
#12 0x00002b17649b68c7 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#13 0x00002b17649b6cc3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#14 0x00002b1761e66f88 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x00002b1761d5a4fb in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x00002b1761d5b504 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x00002b17622311dc in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#18 0x00002b1765015fd3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#19 0x00002b17650192dd in ?? () from /usr/lib/libglib-2.0.so.0
#20 0x00002b17650195ea in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#21 0x00002b1761d5b883 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#22 0x0000000000487741 in main (argc=2, argv=0x7fff4ac3c768) at gtkmain.c:886
(gdb)

Changed 11 years ago by MarkDoliner

The patch prevents the crashes from happening by disable the use of invisible text.

comment:6 Changed 11 years ago by Jaywalker

<nosnilmot> I think the consensus is it's a gtk bug that might be fixed in gtk >= 2.12.3, if you have the problem with gtk that would fit that shout now
<Jaywalker> I'm on 2.12.5 and I still get it..
<Jaywalker> I suppose I should update the ticket about my upgrade

I'm doing just that... I since changed linux distro and upgraded gtk to 2.12.5 and the issue still exists.

comment:7 Changed 11 years ago by nosnilmot@…

(In 77c9ccd225ed49e37259c43a457a37245482706e) Disable invisible text things, if someone can conclusively prove this is fixed in a particular gtk version we can re-enable this accordingly References #4666

comment:8 Changed 11 years ago by sadrul

http://bugzilla.gnome.org/show_bug.cgi?id=382565 looks suspiciously similar to this one. But it looks like the fix is included in 2.12.0.

comment:9 Changed 11 years ago by Sim-on

  • Milestone set to 2.4.2

comment:10 Changed 11 years ago by mpadams

On a 32-bit Ubuntu Hardy machine with Pidgin 2.4.1, I'm seeing periodic CPU spikes to 100%, and it appears to be GTK-related, as when I switch the Appearance in GNOME, the overload goes away. I think the root cause of this is responsible for multiple bugs.

http://developer.pidgin.im/ticket/4666 http://developer.pidgin.im/ticket/2820

comment:11 Changed 10 years ago by bernmeister

Does this still occur in Pidgin 2.5.8?

comment:12 Changed 10 years ago by deryni

  • Status changed from new to pending

comment:13 Changed 10 years ago by nosnilmot

  • Status changed from pending to new

Of course this doesn't occur with 2.5.8, the relevant code has been commented out for 18 months because of this bug. We need someone who experience(d) this issue to try reverting 77c9ccd225ed49e37259c43a457a37245482706e and identify which version of Gtk it is fixed in (if not the earliest version, at least a safe version to enable this on).

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!