Touch events during weston-calibrator shutdown causes weston crash with segmentation fault in wl_resource_get_client. See attached gdb-backtrace. 1. Launch weston 2. Execute weston-calibrator 3. Touch the screen three times to obtain calibration values 3. Touch the screen while weston-calibrator close animation is executing. 4. Notice weston crash with segfault. Software Stack wayland (1.5) 1.4.93-0-g8511544 drm (master) libdrm-2.4.52-0-g46d451c mesa (10.2) heads/10.2-0-g0b3126b libva (master) libva-1.2.1-0-g88ed1eb intel-driver (master) 1.2.2-0-g121e70d cairo (1.12) heads/1.12-0-g59e2a93 libinput (master) heads/master-0-g97af5c3 weston (1.5) 1.4.93-0-g7098948
Created attachment 99043 [details] gdb-backtrace
When weston client is in fullscreen mode, touching the display while close/destroy animation is performing causes weston crash. Touch events during fullscreened client close animation, leads to segmentation fault in wl_resource_get_client. Another way to reproduce this issue is: 1. Launch weston-terminal 2. Enter fullscreen via <f11> 3. Press <mod> + k 4. Touch the display while close animation is performing. Observe weston crash. This is an issue under below software stack as well. wayland (HEAD) 1.5.0-0-g3ac62cd drm (HEAD) libdrm-2.4.54-0-g5126fcb mesa (HEAD) mesa-10.1.3-0-g0028eb1 libva (HEAD) libva-1.2.1-0-g88ed1eb intel-driver (HEAD) 1.2.2-0-g121e70d cairo (HEAD) 1.12.16-0-g8e11a42 weston (HEAD) 1.5.0-0-g8801936
Created attachment 105304 [details] [review] Stop crash when starting a touch during a fullscreen fade This issue is still reproducible today - I think this patch fixes it, but is only partially tested because I don't have a touchscreen (I just mashed up libinput to pretend my mouse is one). If you could test and confirm this works, that would be great.
(In reply to comment #3) > Created attachment 105304 [details] [review] [review] > Stop crash when starting a touch during a fullscreen fade > > This issue is still reproducible today - I think this patch fixes it, but is > only partially tested because I don't have a touchscreen (I just mashed up > libinput to pretend my mouse is one). > > If you could test and confirm this works, that would be great. Looks good, although I don't have a touchscreen to test either. One little question here: can we use if (find_resource_for_view(&seat->touch->resource_list, view)) instead of if (view) to avoid the problem just as weston_pointer_set_focus do it? If that can be used, the code will be much cleaner. I also suggest sending the patch to the mailing list for review.
Will try that and send the resulting patch to the list later today, thanks
I've posted a slightly changed version of this patch to the list that also stops another segfault (mod-touch during the fadeout would still crash even though just touching didn't) I don't think find_resource_for_view() helps, as it does a few additional checks. A direct substitution prevents the icons at the top of the screen from working.
I tested Derek’s patch from wayland-devel( http://lists.freedesktop.org/archives/wayland-devel/2014-August/016978.html) on touch screen with below s/s. This patch fixes Segfault in weston. So, it can be merged. Software Stack wayland (HEAD) remotes/origin/HEAD-0-g6d0f298 drm (HEAD) heads/master-16-gd686160 mesa (HEAD) remotes/origin/10.2-0-gd82ca4e libva (HEAD) libva-1.3.1-0-g053f70f intel-driver (HEAD) 1.3.1-0-ga720bc8 cairo (HEAD) heads/1.12-0-g59e2a93 libinput (HEAD) heads/master-163-gbb10ec8 weston (HEAD) remotes/origin/master-0-g652c794
Should be fixed by: commit 362656bfa308b653ed6c40b3e788b481d92b7cc8 Author: Derek Foreman <derekf@osg.samsung.com> Date: Thu Sep 4 10:23:05 2014 -0500 touch-input: Don't dereference NULL pointer during full screen fade
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.