libgtk2.0 upgrade broke things in gtk apps such as mousepad and gedit

Bug #78665 reported by Lance Poore
14
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Medium
gtk+2.0 (Ubuntu)
Fix Released
High
Ubuntu Desktop Bugs

Bug Description

Binary package hint: libgtk2.0-0

I received some updates tonight for feisty. One of which was libgtk2.0-0. I was trying to edit some files in mousepad and noticed when I clicked the Open option from the file menu it froze mousepad, I restarted X and tried again, same issue. I fired up gedit and got the same problem. I was running both as root. However if i ran gedit as a normal user it worked fine. When i tried running mousepad as a normal user I got a segfault, so I decided to debug mousepad with gdb. This is the results:

$ gdb mousepad
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/mousepad
(no debugging symbols found)
Failed to read a valid object file image from memory.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1219246400 (LWP 627)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1219246400 (LWP 627)]
0xb7aacd5f in gdk_drawable_get_screen () from /usr/lib/libgdk-x11-2.0.so.0

As you can see it refers to the file /usr/lib/libgdk-x11-2.0.so.0

dpkg says these files are part of libgtk2.0-0

$ dpkg --search libgdk-x11-2.0.so.0
libgtk2.0-0: /usr/lib/libgdk-x11-2.0.so.0.1000.7
libgtk2.0-0: /usr/lib/libgdk-x11-2.0.so.0

Hopefully this is enough information for anyone to regenerate the issue and confirm it is a major bug.

thanks

Lance Poore

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. Could you get a backtrace with libgtk2.0-0-dbg installed?

Changed in gtk+2.0:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Lance Poore (lp-7413) wrote :

Yep I got a backtrace with the debug package installed

Here are the results:

Starting program: /usr/bin/mousepad
(no debugging symbols found)
Failed to read a valid object file image from memory.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1218922816 (LWP 3724)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218922816 (LWP 3724)]
0xb7afbd5f in IA__gdk_drawable_get_screen (drawable=0x4c4c) at gdkdraw.c:202
202 gdkdraw.c: No such file or directory.
        in gdkdraw.c

Revision history for this message
Lance Poore (lp-7413) wrote :

sorry for the split post.. i forgot the important part :)

(gdb) backtrace
#0 0xb7b8fd5f in IA__gdk_drawable_get_screen (drawable=0x4c4c)
    at gdkdraw.c:202
#1 0xb7bd3178 in IA__gdk_window_new (parent=0x4c4c, attributes=0xbf9e9bb4,
    attributes_mask=108) at gdkwindow-x11.c:673
#2 0xb7e02eef in text_window_realize (win=0x80f2c40, widget=0x8078f88)
    at gtktextview.c:7478
#3 0xb7e031a3 in set_window_width (text_view=0x80ba018,
    width=<value optimized out>, type=GTK_TEXT_WINDOW_LEFT, winp=0x80ba098)
    at gtktextview.c:8129
#4 0x08053914 in ?? ()
#5 0x080ba098 in ?? ()
#6 0x00000003 in ?? ()
#7 0x0000002d in ?? ()
#8 0x0804e11d in ?? ()
#9 0x080ae830 in ?? ()
#10 0x08055821 in ?? ()
#11 0xbf9e9c68 in ?? ()
#12 0xb787232c in g_value_peek_pointer () from /usr/lib/libgobject-2.0.so.0
#13 0xb7d30f58 in gtk_item_factory_callback_marshal (widget=0x60001,
    func_data=0x8078f88) at gtkitemfactory.c:188
#14 0xb785d9b9 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#15 0xb785062b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0xb78610e3 in ?? () from /usr/lib/libgobject-2.0.so.0
#17 0x080b02f8 in ?? ()
#18 0x00000000 in ?? ()

Lance Poore (lp-7413)
description: updated
Revision history for this message
Daniel Holbach (dholbach) wrote :

Can you try entering 'thread apply all bt full' instead of 'bt'? It'd be nice if you'd follow the instructions on https://wiki.ubuntu.com/DebuggingProgramCrash to get debug symbols for mousepad and libglib2.0-0

Revision history for this message
Lance Poore (lp-7413) wrote :
Download full text (4.2 KiB)

$ cat /tmp/gdb-mousepad.txt
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) set pagination 0
(gdb) run
Starting program: /usr/bin/mousepad
(no debugging symbols found)
Failed to read a valid object file image from memory.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1218640192 (LWP 18050)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218640192 (LWP 18050)]
0xb7b40d5f in IA__gdk_drawable_get_screen (drawable=0x4c4c) at gdkdraw.c:202
202 gdkdraw.c: No such file or directory.
        in gdkdraw.c
(gdb) backtrace
#0 0xb7b40d5f in IA__gdk_drawable_get_screen (drawable=0x4c4c) at gdkdraw.c:202
#1 0xb7b84178 in IA__gdk_window_new (parent=0x4c4c, attributes=0xbfc45614, attributes_mask=108) at gdkwindow-x11.c:673
#2 0xb7db3eef in text_window_realize (win=0x80f2c40, widget=0x8078f88) at gtktextview.c:7478
#3 0xb7db41a3 in set_window_width (text_view=0x80ba018, width=<value optimized out>, type=GTK_TEXT_WINDOW_LEFT, winp=0x80ba098) at gtktextview.c:8129
#4 0x08053914 in ?? ()
#5 0x080ba098 in ?? ()
#6 0x00000003 in ?? ()
#7 0x0000002d in ?? ()
#8 0x0804e11d in ?? ()
#9 0x080ae830 in ?? ()
#10 0x08055821 in ?? ()
#11 0xbfc456c8 in ?? ()
#12 0xb782332c in g_value_peek_pointer () from /usr/lib/libgobject-2.0.so.0
#13 0xb7ce1f58 in gtk_item_factory_callback_marshal (widget=0x60001, func_data=0x8078f88) at gtkitemfactory.c:188
#14 0xb780e9b9 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#15 0xb780162b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0xb78120e3 in ?? () from /usr/lib/libgobject-2.0.so.0
#17 0x080b02f8 in ?? ()
#18 0x00000000 in ?? ()
(gdb) info registers
eax 0x80772f0 134705904
ecx 0x60001 393217
edx 0x8078f88 134713224
ebx 0xb7bac23c -1212497348
esp 0xbfc45530 0xbfc45530
ebp 0xbfc45548 0xbfc45548
esi 0x4c4c 19532
edi 0x80f2c40 135212096
eip 0xb7b40d5f 0xb7b40d5f <IA__gdk_drawable_get_screen+31>
eflags 0x210202 [ IF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) thread apply all backtrace

Thread 1 (Thread -1218640192 (LWP 18050)):
#0 0xb7b40d5f in IA__gdk_drawable_get_screen (drawable=0x4c4c) at gdkdraw.c:202
#1 0xb7b84178 in IA__gdk_window_ne...

Read more...

Revision history for this message
Lance Poore (lp-7413) wrote :

I have a new logfile I generated with how mousepad works if ran by root, until you try to open a file from the menu. Here is the command I ran with valgrind

sudo valgrind -v --tool=memcheck --leak-check=full --num-callers=12 --log-file=valgrind2.log mousepad

Attached is the output

Thanks in advanced

Revision history for this message
Lance Poore (lp-7413) wrote :
Download full text (4.7 KiB)

Here is some more debugging information from gdb i got.

$ gdb mousepad 2>&1 | tee /tmp/gdb-mousepad-open.txt
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) set pagination 0
(gdb) run
Starting program: /usr/bin/mousepad
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1218402624 (LWP 25632)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218402624 (LWP 25632)]
0xb7b7ad5f in IA__gdk_drawable_get_screen (drawable=0x4c4c) at gdkdraw.c:202
202 gdkdraw.c: No such file or directory.
        in gdkdraw.c
(gdb) backtrace
#0 0xb7b7ad5f in IA__gdk_drawable_get_screen (drawable=0x4c4c) at gdkdraw.c:202
#1 0xb7bbe178 in IA__gdk_window_new (parent=0x4c4c, attributes=0xbfa824c4, attributes_mask=108) at gdkwindow-x11.c:673
#2 0xb7dedeef in text_window_realize (win=0x80f2c40, widget=0x8078f88) at gtktextview.c:7478
#3 0xb7dee1a3 in set_window_width (text_view=0x80ba018, width=<value optimized out>, type=GTK_TEXT_WINDOW_LEFT, winp=0x80ba098) at gtktextview.c:8129
#4 0x08053914 in show_line_numbers (text_view=0x80ba018, visible=1) at linenum.c:287
#5 0xb7d1bf58 in gtk_item_factory_callback_marshal (widget=0x60001, func_data=0x8078f88) at gtkitemfactory.c:188
#6 0xb78489b9 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#7 0xb783b62b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#8 0xb784c0e3 in ?? () from /usr/lib/libgobject-2.0.so.0
#9 0x080b02f8 in ?? ()
#10 0x00000000 in ?? ()
(gdb) info registers
eax 0x80772f0 134705904
ecx 0x60001 393217
edx 0x8078f88 134713224
ebx 0xb7be623c -1212259780
esp 0xbfa823e0 0xbfa823e0
ebp 0xbfa823f8 0xbfa823f8
esi 0x4c4c 19532
edi 0x80f2c40 135212096
eip 0xb7b7ad5f 0xb7b7ad5f <IA__gdk_drawable_get_screen+31>
eflags 0x210202 [ IF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) thread apply all backtrace

Thread 1 (Thread -1218402624 (LWP 25632)):
#0 0xb7b7ad5f in IA__gdk_drawable_get_screen (drawable=0x4c4c) at gdkdraw.c:202
#1 0xb7bbe178 in IA__gdk_window_new (parent=0x4c4c, attributes=0xbfa824c4, attributes_mask=108) at gdkwindow-x11.c:673
#2 0xb7dedeef in text_window_realize (win=0x80f2c40, widget=0x8078f88) at gtktextview.c:7478
#3 0xb7dee1a3 in set_window_width (text_view=0x80ba018, width=<value optimized out>, type=GTK_T...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

From the duplicate:

"If I start gedit from the terminal and select settings/add line numbers gedit crashes. If I restart it the line numbers are active. It crashes again if I remove the line numbers and select them again.

I get this error in the terminal "Segmentation fault (core dumped)""

I've forwarded that upstream: http://bugzilla.gnome.org/show_bug.cgi?id=396826

Changed in gtk+2.0:
importance: Undecided → High
status: Needs Info → Confirmed
Revision history for this message
didier (did447-deactivatedaccount) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the comment didier

Fixed with this upload:

 gtk+2.0 (2.10.7-0ubuntu2) feisty; urgency=low
 .
   * debian/patches/090_from_svn_fix_textview_window_crasher.patch:
     - patch from SVN, fix GtkTextView crasher (Ubuntu: #78665)

Changed in gtk+2.0:
status: Confirmed → Fix Released
Revision history for this message
Lance Poore (lp-7413) wrote :

The upstream of version 2.10.7-0ubuntu2 fixed the problem running mousepad as a normal user. Mousepad now runs properly as a normal user, however the bug with gedit/mousepad when clicking "open file" still remains unfixed.

To reproduce this bug just run "sudo gedit" and hit open on the toolbar, or run sudo mousepad and then click file > open from the menu bar.

All information I could produce is in the above attachments.

Changed in gtk:
status: Unknown → Rejected
Changed in gtk:
status: Rejected → Fix Released
Changed in gtk:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.