Bug 94899

Summary: Weston crashes on zoom (Mod-Wheel) when the pointer is over weston-presentation-shm
Product: Wayland Reporter: Link Mauve <bugs>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: jadahl
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Not very useful trace of the segfault
Stack trace of the crash

Description Link Mauve 2016-04-11 19:32:00 UTC
Created attachment 122871 [details]
Not very useful trace of the segfault
Comment 1 Link Mauve 2016-04-20 17:44:23 UTC
Created attachment 123093 [details]
Stack trace of the crash

Here is a more useful stack trace of this crash, where we can see pointer->focus_client is NULL.

This issue is actually Weston trying to send axis events to clients not having any wl_pointer bound, which leads to this crash.  It also happens when simply scrolling over weston-simple-shm.
Comment 2 Jonas Ådahl 2016-04-21 03:47:22 UTC
This should fix it: https://patchwork.freedesktop.org/patch/82561/
Comment 3 Jonas Ådahl 2016-04-22 02:39:15 UTC
Fixed by:

commit ed6014a9e481772580f7eb9fc7a1200aca7aec5c
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Thu Apr 21 10:21:48 2016 +0800

    input: Don't try to send axis_source when there are no resources
    
    The focus_client pointer may be NULL here if the focused client has no
    pointer resources. To avoid a crash, NULL check focus client before
    proceeding to send the events.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=94899
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.