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 447387 - panel keeps crashing
panel keeps crashing
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: general
2.19.x
Other Linux
: Normal critical
: ---
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-14 02:10 UTC by Brian J. Murrell
Modified: 2007-06-18 19:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Possible solution (601 bytes, patch)
2007-06-16 13:36 UTC, Vincent Untz
none Details | Review
Debugging patch (1.76 KB, patch)
2007-06-17 18:45 UTC, Vincent Untz
none Details | Review
Debugging patch, with even more output (2.91 KB, patch)
2007-06-18 09:04 UTC, Vincent Untz
none Details | Review
Debugging patch, with screen information (3.47 KB, patch)
2007-06-18 12:07 UTC, Vincent Untz
none Details | Review
Patch fixing the bug (4.71 KB, patch)
2007-06-18 14:08 UTC, Vincent Untz
committed Details | Review

Description Brian J. Murrell 2007-06-14 02:10:03 UTC
Just finished updating to latest Ubuntu gutsy (devel branch) and now the panel keeps crashing, and restarting and crashing.  Very annoying indeed.  Here is the backtrace:

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 12858)

  • #0 IA__g_type_check_is_value_type
    at /build/buildd/glib2.0-2.13.4/gobject/gtype.c line 3245
  • #1 IA__g_value_type_compatible
    at /build/buildd/glib2.0-2.13.4/gobject/gvalue.c line 322
  • #2 g_value_object_collect_value
    at /build/buildd/glib2.0-2.13.4/gobject/gobject.c line 1957
  • #3 IA__g_signal_emit_valist
  • #4 IA__g_signal_emit
    at /build/buildd/glib2.0-2.13.4/gobject/gsignal.c line 2243
  • #5 emit_active_window_changed
    at screen.c line 1946
  • #6 do_update_now
    at screen.c line 1706
  • #7 update_idle
    at screen.c line 1919
  • #8 g_idle_dispatch
    at /build/buildd/glib2.0-2.13.4/glib/gmain.c line 4096
  • #9 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.13.4/glib/gmain.c line 2061
  • #10 g_main_context_iterate
    at /build/buildd/glib2.0-2.13.4/glib/gmain.c line 2694
  • #11 IA__g_main_loop_run
  • #12 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #13 main

Comment 1 Vincent Untz 2007-06-15 14:45:06 UTC
It sounds as if you have a mix of old and new libwnck there. Does it still happen after a reboot? What is your version of gnome-panel and libwnck?
Comment 2 Brian J. Murrell 2007-06-16 12:30:44 UTC
gnome-panel: 2.19.3-0ubuntu1
libwnck-common: 2.19.3.1-0ubuntu1
libwnck18: 2.19.2-0ubuntu1
libwnck22: 2.19.3.1-0ubuntu1

$ lsof -p 4523 | grep wnck
gnome-pan 4523 brian  mem    REG     254,14  199252  278913 /usr/lib/libwnck-1.so.22.0.0

$ dpkg -S /usr/lib/libwnck-1.so.22.0.0
libwnck22: /usr/lib/libwnck-1.so.22.0.0

So, it appears that I am using gnome-panel 2.19.3 and libwnck 2.19.3.1.
Comment 3 Vincent Untz 2007-06-16 13:25:27 UTC
It might mean previously_active_window is not valid.

Can you create a new libwnck package with a small change?

In libwnck/screen.c, search for emit_active_window_changed() and change screen->priv->previously_active_window to NULL.

Also, what is the window manager you are using? And are you using sloppy focus (don't know if it's relevant yet, but it's always good to know ;-))?
Comment 4 Vincent Untz 2007-06-16 13:36:03 UTC
Created attachment 90071 [details] [review]
Possible solution

Ah, I might have found something. Can you also try this patch?

I can't reproduce the crash, so I can't test whether it fixes the issue or not.
Comment 5 Brian J. Murrell 2007-06-17 03:59:10 UTC
OK.  Patch added.  Stack trace of resulting crash:

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 25548)

  • #0 IA__g_type_check_is_value_type
    at /build/buildd/glib2.0-2.13.4/gobject/gtype.c line 3245
  • #1 IA__g_value_type_compatible
    at /build/buildd/glib2.0-2.13.4/gobject/gvalue.c line 322
  • #2 g_value_object_collect_value
    at /build/buildd/glib2.0-2.13.4/gobject/gobject.c line 1957
  • #3 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.13.4/gobject/gsignal.c line 2174
  • #4 IA__g_signal_emit
    at /build/buildd/glib2.0-2.13.4/gobject/gsignal.c line 2243
  • #5 ??
    from /usr/lib/libwnck-1.so.22
  • #6 ??
  • #7 ??
  • #8 ??

Damn.  Guess I forgot to install the new libwnck22-dbgsym library.  Just installed it.  I will run again and wait for another crash.

Comment 6 Brian J. Murrell 2007-06-17 04:02:13 UTC
Oh wow.  That happened a lot quicker than I thought it would:

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 23285)

  • #0 IA__g_type_check_is_value_type
    at /build/buildd/glib2.0-2.13.4/gobject/gtype.c line 3245
  • #1 IA__g_value_type_compatible
    at /build/buildd/glib2.0-2.13.4/gobject/gvalue.c line 322
  • #2 g_value_object_collect_value
    at /build/buildd/glib2.0-2.13.4/gobject/gobject.c line 1957
  • #3 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.13.4/gobject/gsignal.c line 2174
  • #4 IA__g_signal_emit
    at /build/buildd/glib2.0-2.13.4/gobject/gsignal.c line 2243
  • #5 emit_active_window_changed
    at screen.c line 1950
  • #6 do_update_now
    at screen.c line 1710
  • #7 update_idle
    at screen.c line 1923
  • #8 g_idle_dispatch
    at /build/buildd/glib2.0-2.13.4/glib/gmain.c line 4096
  • #9 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.13.4/glib/gmain.c line 2061
  • #10 g_main_context_iterate
    at /build/buildd/glib2.0-2.13.4/glib/gmain.c line 2694
  • #11 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.13.4/glib/gmain.c line 2898
  • #12 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #13 main


BTW: gdb is still sitting there at the prompt if there is anything you want me to query it about.  It's just occurred to me that I did not do an unoptimized build.  I will try to dig up the instructions for doing that on Ubuntu/Debian with dpkg-buildpackage and install those [d]debs tomorrow.  Happy to query gdb for you in the meanwhile though if you like.
Comment 7 John Ferlito 2007-06-17 07:33:05 UTC
I can trivially reproduce this bug. gnome-panel crashes for me everytime I close a window. I get a similar gdb backtrace and am running an up to date gutsy as well.

Let me know if there is any information I can provide.
Comment 8 Vincent Untz 2007-06-17 17:28:00 UTC
(In reply to comment #6)
> BTW: gdb is still sitting there at the prompt if there is anything you want me
> to query it about.  It's just occurred to me that I did not do an unoptimized
> build.  I will try to dig up the instructions for doing that on Ubuntu/Debian
> with dpkg-buildpackage and install those [d]debs tomorrow.  Happy to query gdb
> for you in the meanwhile though if you like.

I'd love to know if, when the crash happens, screen->priv->previously_active_window is NULL in emit_active_window_changed().

I'm trying to investigate here too, but I still can't reproduce :/
Comment 9 Vincent Untz 2007-06-17 18:45:18 UTC
Created attachment 90157 [details] [review]
Debugging patch

Alternatively, can you try the following patch which prints some stuff in the terminal, and copy the output in a comment?
Comment 10 John Ferlito 2007-06-18 02:16:23 UTC
When changing window focus I get

update active window: 0x84bfa70 1
update active window: 0x84bfa70 1
update active window: (nil) 0
update active window: (nil) 0
update active window: 0x894d430 1
update active window: 0x894d430 1

On closing window I got

update client list: 0x8596b90 1
update active window: (nil) 0
update active window: 0x8596b90 0


Segmentation fault (core dumped)

SOmetimes it goes into a close open crash loop with
update active window: (nil) 0
Floating point exception (core dumped)

In GDB now
update client list: 0x8952070 1
update active window: (nil) 0
update active window: 0x8952070 0

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1226950448 (LWP 19788)]
0xb76dacd8 in g_type_check_is_value_type () from /usr/lib/libgobject-2.0.so.0
(gdb) 


I'm also ocasionally seeing

(gnome-panel:18364): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.13.4/gobject/gsignal.c:2180: invalid unclassed object pointer for value type `WnckWindow'









Comment 11 Vincent Untz 2007-06-18 07:31:52 UTC
Ah, that's interesting. It means we're firing an event with some invalid data. I must be missing something obvious since I don't see how this can be invalid, but well...

Are you using metacity, or another window manager (maybe compiz/beryl)?
Comment 12 John Ferlito 2007-06-18 07:38:09 UTC
(In reply to comment #11)
> Are you using metacity, or another window manager (maybe compiz/beryl)?

metacity

Anything else I can do to help?
Comment 13 Vincent Untz 2007-06-18 09:04:34 UTC
Created attachment 90195 [details] [review]
Debugging patch, with even more output

That's really really weird: I'm on gutsy too, with metacity and I don't see this.

Are you running any special application that is dealing with window management (devil's pie, for example)? Does it really happen each time you close a window?

Also, this part was interesting:

update client list: 0x8596b90 1
update active window: (nil) 0
update active window: 0x8596b90 0

It means that, when you close a window, we enter update_active_window() twice. I can see why this happens, but it shouldn't do anything the second time.

Can you apply this new debugging patch, and then run the panel (alternatively, you can use one of the test-* programs available in the libwnck source, which lets you not install the new libwnck package...). I'd like to have the output when you:
 + run the program
 + open a new window
 + close the new window

Since it should crash for you, there won't be a lot of output.

Sorry for debugging this way :/ It's hard to understand what's happening since I can't reproduce the crash.
Comment 14 Brian J. Murrell 2007-06-18 11:40:41 UTC
(In reply to comment #13)
> Created an attachment (id=90195) [edit]
> Debugging patch, with even more output

$ gnome-panel

** (gnome-panel:13214): WARNING **: No toplevel on which to load object '00000001'


** (gnome-panel:13214): WARNING **: No toplevel on which to load object '00000002'

Key /apps/panel/objects/0t1038596772ut224898u1001p2461r472800895k3221219260/launcher_location is not set, cannot load launcher
Key /apps/panel/objects/3t1038803671ut664979u1001p4418r180955943k3221219228/launcher_location is not set, cannot load launcher
Key /apps/panel/objects/0t1039084875ut584117u1001p14204r2049903244k3221219228/launcher_location is not set, cannot load launcher
Key /apps/panel/objects/0t1039480294ut877608u1001p8691r1475752596k3221219244/launcher_location is not set, cannot load launcher
Key /apps/panel/objects/2t1038799177ut408040u1001p4418r826989620k3221219228/launcher_location is not set, cannot load launcher
Key /apps/panel/objects/1t1038799002ut139886u1001p4418r1604123788k3221219228/launcher_location is not set, cannot load launcher
Key /apps/panel/objects/0t1038798990ut222372u1001p4418r1722311443k3221219228/launcher_location is not set, cannot load launcher
update_client_list: opening 0x850b8d0
update_client_list: opening 0x84dfe60
update_client_list: opening 0x85093a0
update_client_list: opening 0x850a2a0
update_client_list: opening 0x850b730
update_client_list: opening 0x8458a00
update_client_list: opening 0x8490f50
update_client_list: opening 0x850a330
update_client_list: opening 0x8491960
update_client_list: opening 0x8458810
update_client_list: opening 0x850b820
update_client_list: opening 0x84592c0
update_client_list: opening 0x8490fb0
update_client_list: opening 0x850b9a0
update_client_list: opening 0x84e4da0
update_client_list: opening 0x850a270
update_client_list: opening 0x84dfd00
update_client_list: opening 0x84e3360
update_client_list: opening 0x84f5e70
update_client_list: opening 0x8520190
update_client_list: opening 0x84ebb70
update_client_list: opening 0x851bd70
update_client_list: opening 0x85198d0
update_active_window: new active 0x8490fb0 (xid = 29360695), old active (nil)
update_active_window: setting paw to (nil)
update_active_window: setting aw to 0x8490fb0
update_active_window: previously_active_window = (nil) (WNCK_IS_WINDOW = 0)

(gnome-panel:13214): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -9 and height 48
update_client_list: opening 0x84eba90
update_client_list: opening 0x84f5590
update_client_list: opening 0x843ac50
update_client_list: opening 0x8520330
update_client_list: opening 0x84e1fb0
update_client_list: opening 0x85f0420
update_client_list: opening 0x85f0200
update_client_list: opening 0x85f0510
update_client_list: opening 0x85f0350
update_active_window: new active 0x8490fb0 (xid = 29360695), old active (nil)
update_active_window: setting paw to (nil)
update_active_window: setting aw to 0x8490fb0
update_active_window: previously_active_window = (nil) (WNCK_IS_WINDOW = 0)
update_active_window: new active 0x851bd70 (xid = 127926276), old active 0x8490fb0
update_active_window: setting paw to 0x8490fb0
update_active_window: setting aw to 0x851bd70
update_active_window: previously_active_window = 0x8490fb0 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x851bd70 (xid = 127926276), old active 0x8490fb0
update_active_window: setting paw to 0x8490fb0
update_active_window: setting aw to 0x851bd70
update_active_window: previously_active_window = 0x8490fb0 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x8491960 (xid = 29360373), old active 0x851bd70
update_active_window: setting paw to 0x851bd70
update_active_window: setting aw to 0x8491960
update_active_window: previously_active_window = 0x851bd70 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x8491960 (xid = 29360373), old active 0x851bd70
update_active_window: setting paw to 0x851bd70
update_active_window: setting aw to 0x8491960
update_active_window: previously_active_window = 0x851bd70 (WNCK_IS_WINDOW = 1)
update_active_window: new active (nil) (xid = 0), old active 0x8491960
update_active_window: setting paw to 0x8491960
update_active_window: setting aw to (nil)
update_active_window: previously_active_window = 0x8491960 (WNCK_IS_WINDOW = 1)
update_active_window: new active (nil) (xid = 0), old active 0x8491960
update_active_window: setting paw to 0x8491960
update_active_window: setting aw to (nil)
update_active_window: previously_active_window = 0x8491960 (WNCK_IS_WINDOW = 1)
update_active_window: new active (nil) (xid = 0), old active (nil)
update_active_window: new active (nil) (xid = 0), old active (nil)
update_active_window: new active 0x85f0420 (xid = 67108984), old active (nil)
update_active_window: setting paw to (nil)
update_active_window: setting aw to 0x85f0420
update_active_window: previously_active_window = (nil) (WNCK_IS_WINDOW = 0)
update_active_window: new active 0x85f0420 (xid = 67108984), old active (nil)
update_active_window: setting paw to (nil)
update_active_window: setting aw to 0x85f0420
update_active_window: previously_active_window = (nil) (WNCK_IS_WINDOW = 0)
update_active_window: new active 0x85f0420 (xid = 67108984), old active 0x85f0420
update_active_window: new active 0x85f0420 (xid = 67108984), old active 0x85f0420
update_active_window: new active 0x85f0420 (xid = 67108984), old active 0x85f0420
update_client_list: opening 0x86dbf40
update_active_window: new active 0x86dbf40 (xid = 80999044), old active 0x85f0420
update_active_window: setting paw to 0x85f0420
update_active_window: setting aw to 0x86dbf40
update_active_window: previously_active_window = 0x85f0420 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x86dbf40 (xid = 80999044), old active 0x85f0420
update_active_window: setting paw to 0x85f0420
update_active_window: setting aw to 0x86dbf40
update_active_window: previously_active_window = 0x85f0420 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x85f0420 (xid = 67108984), old active 0x86dbf40
update_active_window: setting paw to 0x86dbf40
update_active_window: setting aw to 0x85f0420
update_active_window: previously_active_window = 0x86dbf40 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x85f0420 (xid = 67108984), old active 0x86dbf40
update_active_window: setting paw to 0x86dbf40
update_active_window: setting aw to 0x85f0420
update_active_window: previously_active_window = 0x86dbf40 (WNCK_IS_WINDOW = 1)
update_active_window: new active (nil) (xid = 0), old active 0x85f0420
update_active_window: setting paw to 0x85f0420
update_active_window: setting aw to (nil)
update_active_window: previously_active_window = 0x85f0420 (WNCK_IS_WINDOW = 1)
update_active_window: new active (nil) (xid = 0), old active 0x85f0420
update_active_window: setting paw to 0x85f0420
update_active_window: setting aw to (nil)
update_active_window: previously_active_window = 0x85f0420 (WNCK_IS_WINDOW = 1)
update_active_window: new active (nil) (xid = 0), old active (nil)
update_active_window: new active (nil) (xid = 0), old active (nil)
update_active_window: new active 0x86dbf40 (xid = 80999044), old active (nil)
update_active_window: setting paw to (nil)
update_active_window: setting aw to 0x86dbf40
update_active_window: previously_active_window = (nil) (WNCK_IS_WINDOW = 0)
update_active_window: new active 0x86dbf40 (xid = 80999044), old active (nil)
update_active_window: setting paw to (nil)
update_active_window: setting aw to 0x86dbf40
update_active_window: previously_active_window = (nil) (WNCK_IS_WINDOW = 0)
update_active_window: new active 0x86dbf40 (xid = 80999044), old active 0x86dbf40
update_active_window: new active 0x86dbf40 (xid = 80999044), old active 0x86dbf40
update_active_window: new active 0x84ebb70 (xid = 111149089), old active 0x86dbf40
update_active_window: setting paw to 0x86dbf40
update_active_window: setting aw to 0x84ebb70
update_active_window: previously_active_window = 0x86dbf40 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x84ebb70 (xid = 111149089), old active 0x86dbf40
update_active_window: setting paw to 0x86dbf40
update_active_window: setting aw to 0x84ebb70
update_active_window: previously_active_window = 0x86dbf40 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x86dbf40 (xid = 80999044), old active 0x84ebb70
update_active_window: setting paw to 0x84ebb70
update_active_window: setting aw to 0x86dbf40
update_active_window: previously_active_window = 0x84ebb70 (WNCK_IS_WINDOW = 1)
update_active_window: new active 0x86dbf40 (xid = 80999044), old active 0x84ebb70
update_active_window: setting paw to 0x84ebb70
update_active_window: setting aw to 0x86dbf40
update_active_window: previously_active_window = 0x84ebb70 (WNCK_IS_WINDOW = 1)
update_client_list: closing 0x86dbf40
update_client_list (closing aw): setting paw to 0x86dbf40 (will be invalid soon)
update_client_list (closing aw): setting aw to NULL
update_client_list: previously_active_window = 0x86dbf40 (WNCK_IS_WINDOW = 1)
update_client_list (fix soonish invalidity): setting paw to NULL
update_active_window: new active 0x84ebb70 (xid = 111149089), old active (nil)
update_active_window: setting paw to (nil)
update_active_window: setting aw to 0x84ebb70
update_active_window: previously_active_window = (nil) (WNCK_IS_WINDOW = 0)
update_active_window: new active 0x84ebb70 (xid = 111149089), old active 0x86dbf40
update_active_window: setting paw to 0x86dbf40
update_active_window: setting aw to 0x84ebb70
update_active_window: previously_active_window = 0x86dbf40 (WNCK_IS_WINDOW = 0)
Segmentation fault (core dumped)

Comment 15 Vincent Untz 2007-06-18 12:07:12 UTC
Interesting.

(In reply to comment #14)
> update_active_window: new active 0x84ebb70 (xid = 111149089), old active (nil)
> update_active_window: setting paw to (nil)
> update_active_window: setting aw to 0x84ebb70

Here we set screen->priv->active_window to 0x84ebb70 and...

> update_active_window: previously_active_window = (nil) (WNCK_IS_WINDOW = 0)
> update_active_window: new active 0x84ebb70 (xid = 111149089), old active
> 0x86dbf40

... here, screen->priv->active_window is 0x86dbf40.

Is there any chance you're running a multihead setup? If you don't know, just do the same thing, with the patch I'll attach in a few seconds.
Comment 16 Vincent Untz 2007-06-18 12:07:46 UTC
Created attachment 90202 [details] [review]
Debugging patch, with screen information
Comment 17 Brian J. Murrell 2007-06-18 12:19:20 UTC
(In reply to comment #15)
> 
> Is there any chance you're running a multihead setup?

Yep, 100% chance.  :-)

> If you don't know, just
> do the same thing, with the patch I'll attach in a few seconds.

Do you still want the output with this patch or does my 100% confirmation suffice?


Comment 18 Vincent Untz 2007-06-18 12:22:03 UTC
(In reply to comment #17)
> (In reply to comment #15)
> > 
> > Is there any chance you're running a multihead setup?
> 
> Yep, 100% chance.  :-)

Ah, good, I think I know what happens, then :-)

> > If you don't know, just
> > do the same thing, with the patch I'll attach in a few seconds.
> 
> Do you still want the output with this patch or does my 100% confirmation
> suffice?

No, it should be okay. I'll attach a new patch later today, and it should fix the bug. Testing will be necessary, of course ;-)
Comment 19 John Ferlito 2007-06-18 12:23:39 UTC
(In reply to comment #15)
> Is there any chance you're running a multihead setup? If you don't know, just
> do the same thing, with the patch I'll attach in a few seconds.

I'm running multihead too. Was going to mention it but forgot :)
Comment 20 Vincent Untz 2007-06-18 14:08:35 UTC
Created attachment 90209 [details] [review]
Patch fixing the bug

This should fix the bug.
The problem is that the active window/previously active window is saved for each screen, while the setting is shared for all screens (this might not be always true, but that's what happens right now). So we end up with an invalid previously active window that has already been destroyed for a screen.

Can you test the patch and tell me if it works?
Comment 21 Vincent Untz 2007-06-18 14:09:42 UTC
I never moved the bug to libwnck, but I really should have. Anyway, hopefully the patch is okay and we'll close the bug soon :-)
Comment 22 Brian J. Murrell 2007-06-18 18:57:05 UTC
(In reply to comment #20)
> Created an attachment (id=90209) [edit]
> Patch fixing the bug

Seems to work so far.  Have closed windows and no crash.  Yay.

Comment 23 Vincent Untz 2007-06-18 19:40:30 UTC
Cool. I've committed the patch, and it'll be in 2.19.4 (which I'll release within the next hour).