Bug 73950 - weston aborts on touching the secondary output when primary output (touch device) is unplugged
Summary: weston aborts on touching the secondary output when primary output (touch dev...
Status: VERIFIED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 22:54 UTC by Anu Reddy
Modified: 2014-04-28 19:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
SIGABRT-gdb-backtrace (13.32 KB, text/plain)
2014-01-22 23:00 UTC, Anu Reddy
Details

Description Anu Reddy 2014-01-22 22:54:55 UTC
In multi display setup, unplugging primary display which is a touch device and touching the new primary display causes SIGABRT. 

Steps:
1. Identify primary as display1(touch device)and secondary as display2 (touch is not mapped to display2)
2. Launch Weston
3. Unplug display1
4. Touch display2
6. Observe Weston crash


Software Stack
Kernel: 3.9.5-301.fc19.x86_64
wayland (HEAD) remotes/origin/master-0-g47bbc6b
drm (HEAD) libdrm-2.4.50-0-g4c5de72
mesa (HEAD) remotes/origin/10.0-0-g3a62718
libva (HEAD) libva-1.2.1-0-g88ed1eb
intel-driver (HEAD) 1.2.1-0-g8f306e3
weston (HEAD) 1.3.93-0-g7cccfca
Comment 1 Anu Reddy 2014-01-22 23:00:47 UTC
Created attachment 92626 [details]
SIGABRT-gdb-backtrace
Comment 2 U. Artie Eoff 2014-01-22 23:34:46 UTC
First bad commit is http://cgit.freedesktop.org/wayland/weston/commit/?id=17bccaed
Comment 3 Ander Conselvan de Oliveira 2014-04-22 15:03:35 UTC
I wasn't able to reproduce this one, but I think I was able to write a fix anyway. I sent it to the mailing list:

http://lists.freedesktop.org/archives/wayland-devel/2014-April/014370.html
Comment 4 Kristian Høgsberg 2014-04-25 22:04:50 UTC
commit ae826cead7caa46e03984955d38631ad0ea0c8fd
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Thu Apr 24 15:11:16 2014 +0300

    evdev: Fix assertion error for unplugged output with paired touchscreen
    
    If the output a touchscreen is paired to is unplugged, events coming
    from it should be ignored. Commit 17bccaed introduced logic for that
    in evdev_flush_pending_damage(). However, the break statements it
    introduced would cause the assertion after the switch statement to
    fail.
    
    That function has the odd behavior that goto's are used to skip the
    assertion after the switch statement and jump to the hunk of code that
    marks the event as processed. Only in the case where the event type has
    an invalid value the assertion should trigger. So this patch fixes the
    problem by moving the assertion into the default case of the switch
    and replacing the goto statements with break ones.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=73950


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.