XWayland on i915GM

Knut Petersen Knut_Petersen at t-online.de
Wed Sep 5 03:27:38 PDT 2012


> try to attach gdb on X then:

Did that already.

#0  0xb5b35521 in xcb_cursor_images_load_cursor (wm=0x83b7030, images=0x0) at window-manager.c:182
#1  0xb5b355d6 in xcb_cursor_library_load_cursor (wm=0x83b7030, file=0xb5b3ea94 "top_side") at window-manager.c:207
#2  0xb5b371ab in weston_wm_create_cursors (wm=0x83b7030) at window-manager.c:988
#3  0xb5b381a3 in weston_wm_create (wxs=0x83b8bf0) at window-manager.c:1469
#4  0xb5b3a41a in bind_xserver (client=0x838a248, data=0x83b8bf0, version=1, id=11) at launcher.c:165
#5  0xb74c4318 in display_bind (client=0x838a248, resource=0x83ad9b0, name=12, interface=0x83ae71c "xserver", version=1, id=11) at wayland-server.c:923
#6  0xb74bb522 in ffi_call_SYSV () at ../../../libffi/src/x86/sysv.S:64
#7  0xb74bb2be in ffi_call (cif=0x83ae6a0, fn=0xb74c4272 <display_bind>, rvalue=0xbffb8b8c, avalue=0x83ae6b8) at ../../../libffi/src/x86/ffi.c:324
#8  0xb74c8aa5 in wl_closure_invoke (closure=0x83ae648, target=0x83ad9b0, func=0xb74c4272 <display_bind>, data=0x838a248) at connection.c:855
#9  0xb74c2fb1 in wl_client_connection_data (fd=25, mask=1, data=0x838a248) at wayland-server.c:284
#10 0xb74c671d in wl_event_source_fd_dispatch (source=0x84908f8, ep=0xbffb8c40) at event-loop.c:79
#11 0xb74c7065 in wl_event_loop_dispatch (loop=0x80654e0, timeout=-1) at event-loop.c:410
#12 0xb74c4896 in wl_display_run (display=0x80654b0) at wayland-server.c:1103
#13 0x08056679 in main (argc=1, argv=0xbffb9044) at compositor.c:4131

With that the problem is easy to identify: An undetected fail of XcursorLibraryLoadImages()
in xcb_cursor_images_load_cursor(). The returned null-pointer is assigned to images, later
it causes the segmentation violation in xcb_cursor_images_load_cursor().

Immediate workaround: Make sure that a proper xcursor theme is installed as default:

       export XCURSOR_PATH=$PREFIX/share/icons
       ln -s path_to_cursor_theme $XCURSOR_PATH/default
       $PREFIX/bin/weston --xserver


Todo:

The build documentation really should be updated to document the xcursor dependency.

In the code the  pointer returned by XcursorLibraryLoadImages() must be checked before
it is used, but I think the best idea would be to abort at weston startup if the required cursor
images are not provided by the system.

cu,
  Knut


More information about the wayland-devel mailing list