GNOME Bugzilla – Bug 385380
gnome-panel crashes to get_workspace_rect
Last modified: 2018-01-24 13:38:16 UTC
That bug has been opened on https://launchpad.net/bugs/75529 "Crashed on start of gnome. Will attach dump. ... http://librarian.launchpad.net/5373955/_usr_bin_gnome-panel.1001.crash crash report ... libwnck18 2.16.1-0ubuntu1 ... Core was generated by `gnome-panel --sm-config-prefix /gnome-panel-1yghQV/ --sm-client-id 110a4b160100'. Program terminated with signal 8, Arithmetic exception. ... crash report" Debug backtrace from gdb: 586 rect->width = (hsize - (spaces_per_row - 1)) / spaces_per_row; (gdb) bt
+ Trace 93777
The only reason why this would happen is because n_spaces < 1. This could be because the screen is not valid or because there's no workspace. Elijah, I see nowhere in the wm spec that _NET_NUMBER_OF_DESKTOPS must be at least 1.
It's not cleat to me what's the best way to fix this: + should we just do "n_spaces = MAX (1, wnck_screen_get_workspace_count (pager->priv->screen));" ? + should we assert on this? + should we gracefully return of this function without doing anything? + should we check that the screen is a valid screen (I can't think why it wouldn't be one, but it's always safer to check)?
*** Bug 395044 has been marked as a duplicate of this bug. ***
True, it isn't mandated by the EWMH but it is pretty much assumed; one statement that almost implies it is the statement about the current desktop: "This is always an integer between 0 and _NET_NUMBER_OF_DESKTOPS - 1". I'm not sure what the fix is, but we should really find out why there were only 0 (or less) total desktops. Is there any chance compiz or beryl (or another WM) were in use and that they cause this bug?
Well, in my most recent gnome start-up (just a few moments ago) I got this same issue again and I can tell you that, at least visually, on my panels, I have 4 workspaces on each screen. Is there some kind of configuration probe I can do to help you out?
Seems to be only happening at the start of GNOME. It's probably a race condition: we receive an event and we process it, but we didn't get the information about the screen yet. Based on the stack trace, here's what I believe is happening: + GNOME starts + pager is created + we get a screen for it, but we didn't fetch the information about it + we connect to the screen with wnck_pager_connect_screen() + for all windows, we do wnck_pager_connect_window() (this means "listen to a lot of signals related to this window") + geometry of a window is changed + we get the event + it goes to _wnck_window_process_configure_notify() + this function emits a geometry_changed signal + this causes window_geometry_changed_callback() to be called + this calls wnck_pager_queue_draw_window() + which calls wnck_pager_queue_draw_workspace() + which calls get_workspace_rect() + which tries to get the number of workspaces in the screen, but we didn't have time to fetch this information There's just a small problem with all this: to successfully call wnck_pager_connect_window(), we need to have a list of windows in the screen. This is done in do_update_now(), which is exactly the call that fetches the information about the screen. So we should have it. Still looks like a race condition, though.
gnome-bugs@interlinx.bc.ca: I'd love to know which window manager you were using when this happened. Was it metacity, compiz/beryl or something else? If you don't remember, do you remember the window managers you have used in the past few months? It sounds to me like this could happen if _NET_NUMBER_OF_DESKTOPS isn't set. Which happens when there's no ewmh-compliant WM running.
Btw, a possible fix would be to default to having one workspace when we can't get this information, since there's at least always one workspace.
(In reply to comment #7) > gnome-bugs@interlinx.bc.ca: I'd love to know which window manager you were > using when this happened. Always metacity.
(In reply to comment #8) > Btw, a possible fix would be to default to having one workspace when we can't > get this information, since there's at least always one workspace. I've done this in trunk.
(In reply to comment #9) > (In reply to comment #7) > > gnome-bugs@interlinx.bc.ca: I'd love to know which window manager you were > > using when this happened. > > Always metacity. How many workspaces did you have, how many rows in the workspace switcher did you have? Also, were you able to reproduce the crash? Or did it happen only once?
gnome-bugs@interlinx.bc.ca: I'd love to know if this only happend in 2.16, or if it also happened with 2.18. Also, was it always when the panel was starting? And did it happen many times or just once or twice?
(In reply to comment #12) > gnome-bugs@interlinx.bc.ca: I'd love to know if this only happend in 2.16, or > if it also happened with 2.18. Hrm. I dunno TBH. I'm tracking Ubuntu devel pretty close to daily. Maybe a Ubuntu person could correlate the date of the bug with what was in the devel branch. > Also, was it always when the panel was starting? > And did it happen many times or just once or twice? Hrm. There have been so many bugs lately with the panel an libwnck and applets that I'm really not sure any more. :-(
Thanks. While we don't know the root problem of this, I believe the change made in comment #10 fixes the crash. It might be that the number of workspaces was not set on one screen (since you're running a multihead setup). I'll mark the bug as NEEDINFO for now, so we can keep an eye on it and because I'd like to know if this can happen with libwnck >= 2.19.4, but I think we'll close the bug in the end. Don't hesitate to reopen the bug if you have any news!
the ubuntu submitter seems to not have the bug on gutsy
Ok, let's close the bug for now and reopen it if someone can see it again with 2.19.4 or later.
https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/147466 looks somewhat similar, reopening "#0 0x00002b97d94e2667 in get_workspace_rect (pager=0xa3e1c0, space=4, rect=0x7fffdea96de0) at pager.c:620 hsize = -22317 vsize = -22317 n_spaces = <value optimized out> widget = (GtkWidget *) 0xa3e1c0 col = <value optimized out> focus_width = 11159 __PRETTY_FUNCTION__ = "get_workspace_rect"
+ Trace 166856
i=1 and then space=4 doesn't make a lot of sense. I've asked questions on launchpad about the wm and a possible multihead setup, to help with blind guessing. Marking as NEEDINFO for now. Bugsquad: don't close the bug, and please reopen if there are new duplicates (version >= 2.20.0).
*** Bug 496247 has been marked as a duplicate of this bug. ***
Duplicate is happening with 2.20.1...
*** Bug 492527 has been marked as a duplicate of this bug. ***
*** Bug 495463 has been marked as a duplicate of this bug. ***
Is this bug still valid in GNOME 2.30.2 or GNOME 2.32.1 ?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libwnck/issues/76.