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 116923 - metacity segfaults with mplayer when gtk+ 2.2.2 is installed
metacity segfaults with mplayer when gtk+ 2.2.2 is installed
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.4.x
Other Linux
: High critical
: METACITY2.6.x
Assigned To: Metacity maintainers list
Metacity maintainers list
: 123309 126403 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-07-07 21:26 UTC by Simon Watson
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2


Attachments
check for null return (1.28 KB, patch)
2003-08-22 03:46 UTC, Rob Adams
none Details | Review

Description Simon Watson 2003-07-07 21:26:25 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:

  • #1 get_cmap
    at ui.c line 402
  • #2 meta_gdk_pixbuf_get_from_pixmap
    at ui.c line 499
  • #3 try_pixmap_and_mask
    at iconcache.c line 404
  • #4 meta_read_icons
    at iconcache.c line 788
  • #5 update_icon
    at window.c line 5093
  • #6 meta_window_new
    at window.c line 505
  • #7 event_callback
    at display.c line 1627
  • #8 filter_func
    at ui.c line 105
  • #9 gdk_event_apply_filters
    at gdkevents-x11.c line 299
  • #10 gdk_event_translate
    at gdkevents-x11.c line 712
  • #11 _gdk_events_queue
    at gdkevents-x11.c line 1942
  • #12 gdk_event_dispatch
    at gdkevents-x11.c line 2002

Comment 1 Owen Taylor 2003-07-07 21:59:28 UTC
Probably a metacity bug that depends on some way on
GTK+. Havoc?
Comment 2 Havoc Pennington 2003-07-07 22:15:06 UTC
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.
Comment 3 Owen Taylor 2003-08-05 18:51:01 UTC
If you trap errors and pass in a bad XID you'll get a NULL
return.
Comment 4 Simon Watson 2003-08-21 20:24:01 UTC
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?
Comment 5 Rob Adams 2003-08-21 20:30:07 UTC
I'll fix it tonight.
Comment 6 Rob Adams 2003-08-22 03:46:16 UTC
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.
Comment 7 Rob Adams 2003-08-22 03:46:40 UTC
Created attachment 19437 [details] [review]
check for null return
Comment 8 Havoc Pennington 2003-08-29 14:49:14 UTC
Patch looks good, but we need to mail release-team@gnome.org and get 
two approvals to commit it. Want to send the mail?
Comment 9 Rob Adams 2003-08-29 17:13:06 UTC
Release team has given approval.  I'll commit it this evening.
Comment 10 Rob Adams 2003-08-30 01:49:08 UTC
committed.
Comment 11 Simon Watson 2003-09-06 22:57:17 UTC
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.

Thread 16384 (LWP 18272)

  • #0 g_type_check_instance_cast
    at gtype.c line 265
  • #1 meta_window_free
    at window.c line 1015
  • #2 event_callback
    at display.c line 1630
  • #3 filter_func
    at ui.c line 83
  • #4 gdk_event_apply_filters
    at gdkevents-x11.c line 306
  • #5 gdk_event_translate
    at gdkevents-x11.c line 770
  • #6 _gdk_events_queue
    at gdkevents-x11.c line 2001
  • #7 gdk_event_dispatch
    at gdkevents-x11.c line 2061
  • #8 g_main_dispatch
    at gmain.c line 1751
  • #9 g_main_context_dispatch
    at gmain.c line 2299
  • #10 g_main_context_iterate
    at gmain.c line 2380
  • #11 g_main_loop_run
    at gmain.c line 2600
  • #12 main
    at main.c line 361
  • #13 __libc_start_main
    from /lib/libc.so.6

Comment 12 Simon Watson 2003-09-06 22:59:24 UTC
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.
Comment 13 Havoc Pennington 2003-09-06 23:16:26 UTC
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.
Comment 14 Simon Watson 2003-09-07 08:40:46 UTC
Apologies - I assume by your response I should just leave it as is for
now? Or would you like me to open another bug?
Comment 15 Havoc Pennington 2003-09-07 17:45:53 UTC
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. ;-)
Comment 16 Simon Watson 2003-09-09 14:21:07 UTC
Is there any chance we can nail this in time for 2.4-release?
Comment 17 Rob Adams 2003-09-09 14:47:01 UTC
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.
Comment 18 Rob Adams 2003-09-20 17:39:09 UTC
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?
Comment 19 Havoc Pennington 2003-09-25 00:58:04 UTC
Are you sure this is still happening? If so is the backtrace always
the same?
Comment 20 Simon Watson 2003-09-25 08:55:07 UTC
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.

Comment 21 Rob Adams 2003-09-26 15:34:32 UTC
*** Bug 123309 has been marked as a duplicate of this bug. ***
Comment 22 Havoc Pennington 2003-09-30 20:08:57 UTC
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.
Comment 23 Rob Adams 2003-11-06 23:41:54 UTC
*** Bug 126403 has been marked as a duplicate of this bug. ***