GNOME Bugzilla – Bug 116923
metacity segfaults with mplayer when gtk+ 2.2.2 is installed
Last modified: 2004-12-22 21:47:04 UTC
This bug occurs on both unstable and stable gnome. Downgrading to gtk+ 2.2.1 fixes the problem. When I fire up mplayer, metacity produces the following error: Window manager warning: Window 0x2c00011 (MPlayer) sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 360 x 80; this doesn't make much sense. Segmentation fault Backtrace from metacity:
+ Trace 38495
Probably a metacity bug that depends on some way on GTK+. Havoc?
The code is: drawable = gdk_pixmap_foreign_new (xpixmap); cmap = get_cmap (drawable); So if foreign_new() is supposed to be able to return NULL, it's a metacity problem for not checking that I would think.
If you trap errors and pass in a bad XID you'll get a NULL return.
This problem is still occurring in the latest builds of gnome/gtk (gnome 2.3.6). However, the problem appears to have worsened - I now experience the same problem sometimes when alt-tabbing, and when I load up mplayer metacity seems to core and reload itself many times over. This seems to be to be a pretty major issue - What are the chances of a bug fix getting in for gnome 2.4 release?
I'll fix it tonight.
Well, I wasn't able to reproduce this running the latest absolutely everything from CVS. However, I can still fix the bug. It looks like all the functions that call meta_gdk_pixbuf_get_from_pixmap are already hardened against a null return from it, so all that's necessary is to check for a null return from gdk_pixmap_foreign_new, since we are indeed trapping errors when we call this function. A patch is attached.
Created attachment 19437 [details] [review] check for null return
Patch looks good, but we need to mail release-team@gnome.org and get two approvals to commit it. Want to send the mail?
Release team has given approval. I'll commit it this evening.
committed.
Still having problems :( Backtrace: Starting program: /usr/bin/metacity --display=:0 [New Thread 16384 (LWP 18272)] Window manager warning: Failed to a open connection to a session manager, so window positions will not be saved: SESSION_MANAGER environment variable not defined Window manager warning: Broken client! Window 0x1c00003 (aterm) changed client leader window or SM client ID Window manager warning: Window 0x1e00019 (MPlayer) sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 440 x 120; this doesn't make much sense. Window manager warning: Log level 16: invalid uninstantiatable type `<invalid>' in cast to `GObject' Window manager warning: Log level 8: file gobject.c: line 1337 (g_object_unref): assertion `G_IS_OBJECT (object)' failed Program received signal SIGSEGV, Segmentation fault.
+ Trace 40005
Thread 16384 (LWP 18272)
Sorry - should have mentioned, this is with the RC-1 gnome 2.4 release stuff, and latest mplayer. It did appear to have disappeared in the beta 2 release.
This is a totally different bug, so for future reference the right thing to do would have been to open a new report rather than reopen this one. Thanks for the backtrace.
Apologies - I assume by your response I should just leave it as is for now? Or would you like me to open another bug?
If you're an "all the ducks in a row" kind of person you could open a new bug, but I'm not going to insist on it. ;-)
Is there any chance we can nail this in time for 2.4-release?
I looked at it breifly and didn't see anything obviously wrong. The window->icon is somehow becoming a dangling pointer; either freed twice or never initialized. Since Gnome 2.4 comes out today, I don't see this getting fixed in time.
wait a sec: you said that this was working after my patch above, but broke again? There weren't any source code changes between my patch and the RC1 release... Does this crash still happen in the Gnome 2.4 release?
Are you sure this is still happening? If so is the backtrace always the same?
This does appear to be still happening but in a more bizarre pattern now - running gnome 2.4 - it now seems to happen every other time I use mplayer. But even this does not appear to be a regular pattern, sometimes it will load more than once without problem. If it would help and can try and provide some more backtraces.
*** Bug 123309 has been marked as a duplicate of this bug. ***
2003-09-29 Havoc Pennington <hp@redhat.com> * src/ui.c (meta_gdk_pixbuf_get_from_pixmap): fix warning that probably explains remaining crash on bug #116923. Jeez, need to use -Werror here or something.
*** Bug 126403 has been marked as a duplicate of this bug. ***