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 708170 - Empathy dumps core when running on Wayland compositor
Empathy dumps core when running on Wayland compositor
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: wayland
 
 
Reported: 2013-09-16 16:32 UTC by Armin K.
Modified: 2016-03-19 16:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Armin K. 2013-09-16 16:32:57 UTC
Backtrace and program output here



Starting program: /usr/bin/empathy 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0x7fffdcff5700 (LWP 20762)]
[New Thread 0x7fffd7fff700 (LWP 20763)]
libEGL warning: failed to create a pipe screen for i965
libEGL warning: failed to create DRM screen
[New Thread 0x7fffc731b700 (LWP 20764)]
[New Thread 0x7fffc64bb700 (LWP 20765)]

(empathy:20758): GLib-GObject-WARNING **: invalid cast from 'GdkWindowImplWayland' to 'GdkWindowImplX11'
[New Thread 0x7fffbd615700 (LWP 20766)]
[New Thread 0x7fffbce14700 (LWP 20767)]
[New Thread 0x7fffb3fff700 (LWP 20768)]
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug


(empathy:20758): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -45 and height 21

(empathy:20758): Gtk-CRITICAL **: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed

(empathy:20758): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 32

(empathy:20758): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -11 and height 32

(empathy:20758): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -11 and height 32

(empathy:20758): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -11 and height 32

(empathy:20758): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -11 and height 32

(empathy:20758): Gdk-CRITICAL **: gdkwindow-wayland.c:668: mmap'ping temporary file failed: Invalid argument

Program received signal SIGSEGV, Segmentation fault.
wl_proxy_create (factory=factory@entry=0x0, interface=0x7fffeda20120 <wl_buffer_interface>) at wayland-client.c:220
220	wayland-client.c: No such file or directory.

  • #0 wl_proxy_create
    at wayland-client.c line 220
  • #1 wl_shm_pool_create_buffer
    at /usr/include/wayland-client-protocol.h line 423
  • #2 gdk_wayland_create_cairo_surface
    at gdkwindow-wayland.c line 720
  • #3 gdk_wayland_window_ensure_cairo_surface
    at gdkwindow-wayland.c line 758
  • #4 gdk_wayland_window_process_updates_recurse
    at gdkwindow-wayland.c line 1958
  • #5 gdk_window_process_updates_internal
    at gdkwindow.c line 3490
  • #6 gdk_window_process_updates_with_mode
    at gdkwindow.c line 3689
  • #7 _g_closure_invoke_va
    at gclosure.c line 840
  • #8 g_signal_emit_valist
    at gsignal.c line 3238
  • #9 g_signal_emit_by_name
    at gsignal.c line 3426
  • #10 gdk_frame_clock_paint_idle
    at gdkframeclockidle.c line 430
  • #11 gdk_threads_dispatch
    at gdk.c line 804
  • #12 g_timeout_dispatch
    at gmain.c line 4450
  • #13 g_main_dispatch
    at gmain.c line 3065
  • #14 g_main_context_dispatch
    at gmain.c line 3641
  • #15 g_main_context_iterate
    at gmain.c line 3712
  • #16 g_main_context_iteration
    at gmain.c line 3773
  • #17 g_application_run
    at gapplication.c line 1635
  • #18 main

Comment 1 Emilio Pozuelo Monfort 2013-09-16 17:23:34 UTC
(In reply to comment #0)
> (empathy:20758): GLib-GObject-WARNING **: invalid cast from
> 'GdkWindowImplWayland' to 'GdkWindowImplX11'

Seems like you're running empathy on wayland? What version of webkitgtk do you have, and are other webkit-using applications running properly? Please get a new backtrace with G_DEBUG=fatal-warnings set, so we know who is making that invalid cast.
Comment 2 Armin K. 2013-09-16 17:30:11 UTC
It's empathy, it uses gdk_x11_* symbols.



libempathy-gtk/empathy-avatar-image.c:		atom = gdk_x11_get_xatom_by_name ("_NET_CURRENT_DESKTOP");
libempathy-gtk/empathy-avatar-image.c:	window = gdk_x11_get_default_root_xwindow ();
libempathy-gtk/empathy-avatar-image.c:	display = gdk_x11_get_default_xdisplay ();
libempathy-gtk/empathy-ui-utils.c:  xev.xclient.message_type = gdk_x11_get_xatom_by_name ("_NET_CURRENT_DESKTOP");
libempathy-gtk/empathy-ui-utils.c:        gdk_x11_get_xatom_by_name ("_NET_WM_DESKTOP"), &number))
libempathy-gtk/empathy-ui-utils.c:  xscreen = gdk_x11_screen_get_xscreen (screen);
libempathy-gtk/empathy-ui-utils.c:      gdk_x11_window_get_xid (gdk_window));
telepathy-account-widgets/tp-account-widgets/tpaw-utils.c:      gdk_x11_window_move_to_current_desktop (gdk_window);



Last one was the one that caused core dump according to gdb when ran with G_DEBUG=fatal-warnings.

Reassigning to Empathy. Please wrap and/or replace gdk_x11_* calls with runtime checks and gdk wayland equivalent functions (if any).
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-04-28 17:36:24 UTC
Workspace management won't have Wayland equivalents. What are you using the workspace management calls for?
Comment 4 Danielle Madeley 2014-12-17 10:28:55 UTC
(Hi all it's me!)

Empathy would appear to include a copy of a bunch of wnck methods in order to do workspace switching. My GTK+ coding is rusty, but it would appear that if nothing else has handled the event (i.e. the shell's chat client) then it will move workspace to the chat window.

I'm not sure what this gets replaced with in a Wayland world. If if we really even want it over say gtk_window_present_with_time().

The code makes this note:

 /* Don't use tpaw_window_present_with_time () which would move the window      
  * to our current desktop but move to the window's desktop instead. This is    
  * more coherent with Shell's 'app is ready' notication which moves the view   
  * to the app desktop rather than moving the app itself. */

~

There's also use of gdk_window_set_filter (is this wayland safe?) which seems to be used to remove a popup (that I'm not sure how to even trigger) if you change workspace. This code could probably be safely removed...
Comment 5 Michael Catanzaro 2016-03-04 19:34:27 UTC
I disabled all the wnck stuff when running under Wayland a while back, should work in git master.