emacs23-x crashing in liboverlay-scrollbar-0.2.so.0

Bug #800387 reported by Roland Dreier
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
overlay-scrollbar
Fix Released
Medium
Andrea Cimitan
overlay-scrollbar (Ubuntu)
Fix Released
High
Canonical Desktop Experience Team
Oneiric
Fix Released
High
Canonical Desktop Experience Team

Bug Description

Binary package hint: overlay-scrollbar

In the past day or so my emacs23 (running under X) has become quite unstable. Running under gdb, I captured the attached traceback, which seems to point to overlay-scrollbar.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: overlay-scrollbar 0.2.1-0ubuntu2
ProcVersionSignature: Ubuntu 3.0-1.2-generic 3.0.0-rc3
Uname: Linux 3.0-1-generic x86_64
Architecture: amd64
Date: Tue Jun 21 13:35:07 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20101206)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.utf8
 LC_MESSAGES=en_US.utf8
 SHELL=/bin/bash
SourcePackage: overlay-scrollbar
UpgradeStatus: Upgraded to oneiric on 2011-06-03 (18 days ago)

Related branches

Revision history for this message
Roland Dreier (roland.dreier) wrote :
Revision history for this message
Roland Dreier (roland.dreier) wrote :
Revision history for this message
Roland Dreier (roland.dreier) wrote :

The really odd thing is that as far as I can tell, the code in os_utils_is_blacklisted() in overlay-scrollbar is properly deciding that "emacs" is blacklisted.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.
I can't reproduce the crash but if emacs is started as 'emacs23' instead of emacs then the overlay scrollbars are enabled and doesn't work. So emacs23 and emacs23-x should be blacklisted as well.

Changed in overlay-scrollbar (Ubuntu):
importance: Undecided → High
status: New → Triaged
Changed in overlay-scrollbar (Ubuntu Oneiric):
assignee: nobody → Canonical Desktop Experience Team (canonical-dx-team)
Revision history for this message
Roland Dreier (roland.dreier) wrote :

Indeed. And the problem seems to be that I created a unity launcher by searching for emacs and dragging "GNU Emacs 23" launcher. And that uses the emacs23.desktop file, which does indeed launch emacs23 instead of emacs. So blacklisting "emacs23" does seem like the correct fix.

Revision history for this message
Andrea Cimitan (cimi) wrote :

I'm more interested in seeing what chould be the issue, the code should now be safe and stable enough, but I know that emacs does really weird things with gtk+.

Revision history for this message
Roland Dreier (roland.dreier) wrote :

I'm happy to provide more information, or the crash was pretty quick to happen for me just using emacs as normal (loading files, editing, etc). Maybe I'll build a overlay-scrollbar package with debugging info and try to get a better traceback.

Revision history for this message
Roland Dreier (roland.dreier) wrote :
Download full text (3.4 KiB)

OK, rebuilt with debugging, and it took only a few seconds to crash emacs23... here's what gdb shows me:

Program received signal SIGSEGV, Segmentation fault.
os_pager_hide (pager=0x0) at /home/roland/X/ubuntu/./os/os-pager.c:378
378 priv = pager->priv;
(gdb) bt
#0 os_pager_hide (pager=0x0) at /home/roland/X/ubuntu/./os/os-pager.c:378
#1 0x00007fffecee258b in os_scrollbar_unrealize (widget=0x13be4e0)
    at /home/roland/X/ubuntu/./os/os-scrollbar.c:2494
#2 0x00007ffff6937d54 in g_closure_invoke (closure=0xcdf0b0, return_value=0x0, n_param_values=1,
    param_values=0x14a4200, invocation_hint=<value optimized out>)
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c:771
#3 0x00007ffff69499f4 in signal_emit_unlocked_R (node=<value optimized out>, detail=0,
    instance=0x13be4e0, emission_return=0x0, instance_and_params=0x14a4200)
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c:3294
#4 0x00007ffff69531c7 in g_signal_emit_valist (instance=<value optimized out>,
    signal_id=<value optimized out>, detail=<value optimized out>, var_args=0x7fffffffbd68)
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c:2987
#5 0x00007ffff6953392 in g_signal_emit (instance=<value optimized out>,
    signal_id=<value optimized out>, detail=<value optimized out>)
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c:3044
#6 0x00007ffff79f6be2 in gtk_widget_unrealize () from /usr/lib/libgtk-x11-2.0.so.0
#7 0x00007ffff79f6fc5 in gtk_widget_unparent () from /usr/lib/libgtk-x11-2.0.so.0
#8 0x00007ffff7821e33 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#9 0x00007ffff6937d54 in g_closure_invoke (closure=0xec0a50, return_value=0x0, n_param_values=2,
    param_values=0x13330c0, invocation_hint=<value optimized out>)
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c:771
#10 0x00007ffff6949397 in signal_emit_unlocked_R (node=<value optimized out>, detail=0,
    instance=0x14c1370, emission_return=0x0, instance_and_params=0x13330c0)
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c:3186
#11 0x00007ffff69531c7 in g_signal_emit_valist (instance=<value optimized out>,
    signal_id=<value optimized out>, detail=<value optimized out>, var_args=0x7fffffffc268)
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c:2987
#12 0x00007ffff6953392 in g_signal_emit (instance=<value optimized out>,
    signal_id=<value optimized out>, detail=<value optimized out>)
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c:3044
#13 0x00007ffff79f9b55 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007ffff693b780 in g_object_run_dispose (object=0x13be4e0)
    at /build/buildd/glib2.0-2.29.8/./gobject/gobject.c:945
#15 0x00000000004d80b4 in ?? ()
#16 0x00000000004a24f7 in ?? ()
#17 0x000000000043f327 in ?? ()
#18 0x00000000004efeea in ?? ()
#19 0x00000000004f245a in ?? ()
#20 0x00000000004f44a9 in ?? ()
#21 0x0000000000558394 in ?? ()
#22 0x00000000004e5b5e in ?? ()
#23 0x000000000055826a in ?? ()
#24 0x00000000004e7c29 in ?? ()
#25 0x00000000004e7cca in ?? ()
#26 0x00000000004e7e07 in ?? ()
#27 0x00000000004137cf in ?? ()
#28 0x00007ffff361ce1f in __libc_start_main (main=0x412e40, argc=1, ubp_av=0x7fffffffe0e8,
    init=<value optimiz...

Read more...

Revision history for this message
Roland Dreier (roland.dreier) wrote :

Actually just came up with a quick way to reproduce this too. It seems to happen when emacs deletes a subwindow. So an easy way to provoke it is to start emacs, type "C-x 2" (control-X then "2") to split the window into two buffers, and then "C-x 1".

Revision history for this message
Roland Dreier (roland.dreier) wrote :

Issue seems to be that for whatever reason, emacs does os_scrollbar_dispose() first and then ends up in the crash trace above. Unfortunately this seems to be coming through emacs lisp, so I just get a call trace like

#0 os_scrollbar_dispose (object=0x12084e0) at /home/roland/X/ubuntu/./os/os-scrollbar.c:2210
#1 0x00007ffff693b780 in g_object_run_dispose (object=0x12084e0)
    at /build/buildd/glib2.0-2.29.8/./gobject/gobject.c:945
#2 0x00000000004d80b4 in ?? ()
#3 0x00000000004a24f7 in ?? ()
#4 0x000000000043f327 in ?? ()
#5 0x00000000004402d5 in ?? ()
#6 0x00000000004efeaa in ?? ()
#7 0x00000000004f245a in ?? ()
#8 0x00000000004f44a9 in ?? ()
#9 0x0000000000558394 in ?? ()
#10 0x00000000004e5b5e in ?? ()
#11 0x000000000055826a in ?? ()
#12 0x00000000004e7c29 in ?? ()
#13 0x00000000004e7cca in ?? ()
#14 0x00000000004e7e07 in ?? ()
#15 0x00000000004137cf in ?? ()
#16 0x00007ffff361ce1f in __libc_start_main (main=0x412e40, argc=1, ubp_av=0x7fffffffe0e8,
    init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>,
    stack_end=0x7fffffffe0d8) at libc-start.c:226

in any case, this dispose happens first and sets priv->pager to NULL before we end up in the call to os_pager_hide above, so we crash for obvious reasons.

I think I've reached the limit of my ability to debug emacs's use of gtk, so someone else will have to take this from here.

Revision history for this message
Andrea Cimitan (cimi) wrote :

many many thanks, precious work. I'll dive into it tomorrow or next week

Andrea Cimitan (cimi)
Changed in overlay-scrollbar (Ubuntu Oneiric):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package overlay-scrollbar - 0.2.3-0ubuntu1

---------------
overlay-scrollbar (0.2.3-0ubuntu1) oneiric; urgency=low

  * New upstream release.
    - New thumb design.
    - Scrollbars now use Gtk+ colors.
    - Scrollbars are now less rounded.
    - Support RTL locales and different scrolled window placements.
    - Added tolerance to pageup and down buttons before dragging.
    - Adjusted timings before hiding the thumb.
    - Shrink the thumb size on small scrolled windows.
    - Cannot scroll in small areas (LP: #771450)
    - support left (and top) scrollbar placements (LP: #761138)
    - Overlay scrollbars do not work in right to left locales (LP: #782022)
    - emacs23-x crashing in liboverlay-scrollbar-0.2.so.0 (LP: #800387)
 -- Ken VanDine <email address hidden> Thu, 30 Jun 2011 17:45:35 +0100

Changed in overlay-scrollbar (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Fabio Duran Verdugo (fabioduran) wrote :

I can confirm with overlay-scrollbar - 0.2.3-0ubuntu1 fix the problem, thank

Revision history for this message
Roland Dreier (roland.dreier) wrote :

Really? I still see emacs23 crashing if I do 'C-x 2' then 'C-x 1' (with 0.2.3-0ubuntu1 installed). I'll build a debug version of liboverlay-scrollbar tomorrow and see what's up.

Revision history for this message
Roland Dreier (roland.dreier) wrote :

With a build of 0.2.3 with debugging enabled, I see pretty much the same crash, just in os_pager_set_parent instead of os_pager_hide:

Starting program: /usr/bin/emacs23 [12/241]
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffeb23e700 (LWP 16302)]

(emacs23:16299): Gtk-CRITICAL **: IA__gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed

Program received signal SIGSEGV, Segmentation fault.
os_pager_set_parent (pager=0x0, parent=0x0)
    at /home/roland/X/overlay-scrollbar-0.2.3/./os/os-pager.c:672
warning: Source file is more recent than executable.
672 /* return if pager is NULL, happens on emacs23,
(gdb) bt
#0 os_pager_set_parent (pager=0x0, parent=0x0)
    at /home/roland/X/overlay-scrollbar-0.2.3/./os/os-pager.c:672
#1 0x00007fffec2b8e98 in os_scrollbar_unrealize (widget=<value optimized out>)
    at /home/roland/X/overlay-scrollbar-0.2.3/./os/os-scrollbar.c:2828
#2 0x00007ffff6939d54 in g_closure_invoke (closure=0xbaa9c0, return_value=0x0, n_param_values=1,
    param_values=0x13b5580, invocation_hint=<value optimized out>)
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c:771
#3 0x00007ffff694b9f4 in signal_emit_unlocked_R (node=<value optimized out>, detail=0,
    instance=0x14384f0, emission_return=0x0, instance_and_params=0x13b5580)
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c:3294

etc.

Changed in overlay-scrollbar (Ubuntu Oneiric):
status: Fix Released → Confirmed
Revision history for this message
Roland Dreier (roland.dreier) wrote :

On my system, the patch here seems to be both necessary and sufficient for emacs23 to work with overlay-scrollbar.

Revision history for this message
Andrea Cimitan (cimi) wrote :

Thanks roland ;)

tags: added: patch
Revision history for this message
Andrea Cimitan (cimi) wrote :

are you able to scroll with them? I'm not!

Changed in overlay-scrollbar (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Revision history for this message
Roland Dreier (roland.dreier) wrote :

No, the scrollbars don't work for me. But I never use scrollbars in emacs, so I'm happy if emacs doesn't crash on normal use.

David Barth (dbarth)
Changed in ayatana-scrollbar:
status: New → In Progress
assignee: nobody → Andrea Cimitan (cimi)
importance: Undecided → Medium
Changed in ayatana-scrollbar:
status: In Progress → Fix Released
Changed in overlay-scrollbar (Ubuntu Oneiric):
status: Fix Committed → Fix Released
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.