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 754009 - Metacity crashes with chromium using Alt+Tab switcher
Metacity crashes with chromium using Alt+Tab switcher
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
trunk
Other Linux
: Normal critical
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2015-08-24 03:12 UTC by Balló György
Modified: 2015-09-12 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compositor: return cairo_surface_t instead of pixmap (8.09 KB, patch)
2015-09-05 17:47 UTC, Alberts Muktupāvels
committed Details | Review
screen: add error trap in get_window_pixbuf (881 bytes, patch)
2015-09-12 13:05 UTC, Alberts Muktupāvels
committed Details | Review

Description Balló György 2015-08-24 03:12:48 UTC
Steps to reproduce:
1. Open chromium browser.
2. Hit Alt+Tab.
3. Metacity immediately crashes.

Package versions:
- metacity current git master
- chromium 44.0.2403.157

Distribution: Arch Linux

Partial backtrace:
  • #0 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #1 g_log
    from /usr/lib/libglib-2.0.so.0
  • #2 ??
    from /usr/lib/libgdk-3.so.0
  • #3 ??
    from /usr/lib/libgdk-3.so.0
  • #4 _XError
    from /usr/lib/libX11.so.6
  • #5 ??
    from /usr/lib/libX11.so.6
  • #6 ??
    from /usr/lib/libX11.so.6
  • #7 _XReply
    from /usr/lib/libX11.so.6
  • #8 XSync
    from /usr/lib/libX11.so.6
  • #9 ??
    from /usr/lib/libcairo.so.2
  • #10 ??
    from /usr/lib/libcairo.so.2
  • #11 ??
    from /usr/lib/libcairo.so.2
  • #12 ??
    from /usr/lib/libcairo.so.2
  • #13 ??
    from /usr/lib/libcairo.so.2
  • #14 ??
    from /usr/lib/libcairo.so.2
  • #15 ??
    from /usr/lib/libcairo.so.2
  • #16 ??
    from /usr/lib/libcairo.so.2
  • #17 ??
    from /usr/lib/libcairo.so.2
  • #18 ??
    from /usr/lib/libcairo.so.2
  • #19 ??
    from /usr/lib/libcairo.so.2
  • #20 ??
    from /usr/lib/libcairo.so.2
  • #21 cairo_paint
    from /usr/lib/libcairo.so.2
  • #22 gdk_pixbuf_get_from_surface
    from /usr/lib/libgdk-3.so.0
  • #23 meta_ui_get_pixbuf_from_pixmap
    from /usr/lib/libmetacity-private.so.3
  • #24 meta_screen_ensure_tab_popup
    from /usr/lib/libmetacity-private.so.3
  • #25 meta_display_begin_grab_op
    from /usr/lib/libmetacity-private.so.3
  • #26 ??
    from /usr/lib/libmetacity-private.so.3
  • #27 ??
    from /usr/lib/libmetacity-private.so.3
  • #28 meta_display_process_key_event
    from /usr/lib/libmetacity-private.so.3
  • #29 ??
    from /usr/lib/libmetacity-private.so.3
  • #30 ??
    from /usr/lib/libmetacity-private.so.3
  • #31 ??
    from /usr/lib/libgdk-3.so.0
  • #32 ??
    from /usr/lib/libgdk-3.so.0
  • #33 gdk_display_get_event
    from /usr/lib/libgdk-3.so.0
  • #34 ??
    from /usr/lib/libgdk-3.so.0
  • #35 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #36 ??
    from /usr/lib/libglib-2.0.so.0
  • #37 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #38 main

Comment 1 Balló György 2015-08-24 03:24:05 UTC
It happens only when alt-tab-thumbnails are enabled.
Comment 2 Alberts Muktupāvels 2015-09-05 17:47:23 UTC
Created attachment 310712 [details] [review]
compositor: return cairo_surface_t instead of pixmap
Comment 3 Alberts Muktupāvels 2015-09-05 17:48:09 UTC
Can you test this patch?
Comment 4 Balló György 2015-09-10 00:27:18 UTC
Yes, I tested it, and it fixes the problem. Thanks!
Comment 5 Balló György 2015-09-10 09:45:04 UTC
Unfortunately I still get the same trace when I hit Alt-Tab after Chromium launched, but its main window is not appeared yet on the screen. It's a short period, but I could easily reproduce the crash.
Comment 6 Alberts Muktupāvels 2015-09-10 19:55:49 UTC
I could not reproduce with few tries...

If you can easily reproduce then can you add some debug info in 	meta_ui_get_pixbuf_from_surface? For example printing cairo_surface_status, also width and height?

Maybe adding this could stop it from crashing:
if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
return NULL;
Comment 7 Balló György 2015-09-12 11:42:38 UTC
I always get CAIRO_STATUS_SUCCESS when the crash occurs, so the above code does not solve the problem.

You could try to reproduce this problem by hitting Alt-Tab many times immediately after Chromium launched from the menu, and always release both Alt and Tab keys between calls.
Comment 8 Alberts Muktupāvels 2015-09-12 12:13:44 UTC
Ok, I will try again...

Can you get backtrace with cairo debugging symbols? Maybe bug is in cairo... What cairo version do you have?
Comment 9 Alberts Muktupāvels 2015-09-12 12:29:41 UTC
Ok, I think I might have solution. Wait for patch...
Comment 10 Alberts Muktupāvels 2015-09-12 13:05:29 UTC
Created attachment 311209 [details] [review]
screen: add error trap in get_window_pixbuf
Comment 11 Alberts Muktupāvels 2015-09-12 13:06:23 UTC
Please test patch above.
Comment 12 Balló György 2015-09-12 14:08:36 UTC
Okay, I cannot reproduce the crash after I applied your patch. Thanks!