Touch some edge points of the touchscreen the weston crash
Pekka Paalanen
ppaalanen at gmail.com
Mon Jun 27 08:48:49 UTC 2016
On Thu, 23 Jun 2016 17:17:03 +0800
zhaojinkun <zhaojinkun at xmgme.com> wrote:
> Hi,
>
> After calibrating , I can touch almost points correctly.But when I touch
> some edge points of the touchscreen the weston crash.
> The method of calibration is:
> 1.$libinput-list-devides
> Device: myts-ft5x0x
> Kernel: /dev/input/event0
> Group: 3
> Seat: seat0, default
> Capabilities: touch
> Tap-to-click: n/a
> Tap-and-drag: n/a
> Tap drag lock: n/a
> Left-handed: n/a
> Nat.scrolling: n/a
> Middle emulation: n/a
> Calibration: identity matrix
> Scroll methods: none
> Click methods: none
> Disable-w-typing: n/a
> Accel profiles: n/a
> Rotation: n/a
> 2.$weston-calibrator
> Calibration values: 1.286611 0.085774 -40.799133 -0.015215
> 1.211107 19.864624
> 3.Add the .rules file in /etc/udev/rules.d/
> $cat /etc/udev/rules.d/touch-calibration.rules
> ATTRS{name}=="myts-ft5x0x", ENV{WL_CALIBRATION}="1.286611
> 0.085774 -40.799133 -0.015215 1.211107 19.864624"
> 4.$/etc/init.d/udev restart
>
> Using the gdb to debug,I found that:
> #0 0x76d9e9c4 in __GI_raise (sig=5) at
> ../sysdeps/unix/sysv/linux/raise.c:55
> #1 <signal handler called>
> #2 weston_view_from_global_float (view=0x0, x=-nan(0x7f007c),
> y=9.18354962e-41, vx=0x7efff658, vy=0x7efff65c) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/compositor.c:1350
> #3 0x00012468 in weston_view_from_global_fixed
> (view=<optimized out>, x=<optimized out>, y=y at entry=211820,
> vx=0x7efff690, vx at entry=0x7efff688, vy=0x7efff694, vy at entry=0x7efff68c)
> at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/compositor.c:1379
> #4 0x00016e28 in default_grab_touch_down (grab=<optimized
> out>, time=671019, touch_id=0, x=<optimized out>, y=36292) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/input.c:248
> #5 0x00019988 in notify_touch (seat=<optimized out>,
> time=time at entry=671019, touch_id=touch_id at entry=0, x=-4092, y=36292,
> touch_type=touch_type at entry=0) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/input.c:1582
> #6 0x76c93ef0 in handle_touch_with_coords
> (libinput_device=libinput_device at entry=0x2b7628, touch_event=0x328f90,
> touch_type=touch_type at entry=0) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/libinput-device.c:250
> #7 0x76c94384 in handle_touch_down (touch_event=<optimized
> out>, device=0x2b7628) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/libinput-device.c:257
> #8 evdev_device_process_event (event=event at entry=0x328f90) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/libinput-device.c:320
> #9 0x76c93a6c in process_event (event=0x328f90) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/libinput-seat.c:161
> #10 process_events (input=<optimized out>) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/libinput-seat.c:171
> #11 0x76c93d14 in udev_input_dispatch (input=0x33b6c) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/libinput-seat.c:182
> #12 libinput_source_dispatch (fd=<optimized out>,
> mask=<optimized out>, data=0x33b6c) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/libinput-seat.c:192
> #13 0x76fca2e8 in wl_event_loop_dispatch (loop=0x304f0,
> timeout=timeout at entry=-1) at
> /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/event-loop.c:422
> #14 0x76fc8bb4 in wl_display_run
> (display=display at entry=0x30478) at
> /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/wayland-server.c:1004
> #15 0x0000f9c0 in main (argc=1, argv=0x7efffdb4) at
> /usr/src/debug/weston/1.9.0-r0/weston-1.9.0/src/main.c:818
>
> So when weston_view_from_global_float() access the view which is null,
> the weston crash.
>
> At last I found that after calling transform_absolute(device, &x, &y)
> which is in libinput's evdev.c,the variable x will change to
> negative.Then the weston will consider the view is Null.
> Is it the problem of weston-calibrator?
Hi,
there are two different things here:
1. Weston should not crash with unexpected coordinates, this is an
obvious bug. We should never generate NaNs or Infs in the coordinate
transformations, those need to be caught before they are produced. Even
when we get coordinates that are outside of any existing view, we
should not crash on NULL view.
2. Whether weston-calibrator is broken or not, and whether your
calibration values are right, I cannot say off-hand. If you used
weston-calibrator, and using that calibration you get all touch point
positions correct, ignoring the crash, I'd think there is nothing wrong
here. This would be particularly ok if your touch sensor really extends
beyond the screen area.
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160627/7f03a1d0/attachment.sig>
More information about the wayland-devel
mailing list