[PATCH weston v2 00/16] Tablet device support for weston
Maniraj Devadoss (RBEI/ECF3)
Maniraj.Devadoss at in.bosch.com
Tue Nov 28 08:48:00 UTC 2017
Hi Jason,
Thanks for testing and sharing the backtraces. I will go through the logs and try to find out the root cause.
Best regards,
Devadoss Maniraj
RBEI/ECF3
Tel. +91 80 6136-4382
-----Original Message-----
From: Jason Gerecke [mailto:killertofu at gmail.com]
Sent: Tuesday, November 28, 2017 3:27 AM
To: Maniraj Devadoss (RBEI/ECF3) <Maniraj.Devadoss at in.bosch.com>
Cc: wayland-devel at lists.freedesktop.org
Subject: Re: [PATCH weston v2 00/16] Tablet device support for weston
On Thu, Nov 23, 2017 at 2:17 AM, Maniraj Devadoss <Maniraj.Devadoss at in.bosch.com> wrote:
> Hi,
>
> The previous posting of this series was at
> https://lists.freedesktop.org/archives/wayland-devel/2017-October/0355
> 34.html
>
> which had some issues when Jason Gerecke <killertofu at gmail.com> tried to test it.
> https://lists.freedesktop.org/archives/wayland-devel/2017-November/035
> 716.html
>
> In this v2 series, I resolved one possible NULL pointer access issue
> in input.c
>
> Best Regards,
> Maniraj D.
>
Thanks for the updated patches, Maniraj. I'm still running into a crash when the pen is brought into proximity for a second time, this time with the following backtrace (full coredump available on
request):
#0 0x00007f0dffda7b6f in surface_stash_subsurface_views
(surface=0x55e380cc1930) at libweston/compositor.c:2141
#1 0x00007f0dffdac626 in weston_compositor_build_view_list
(compositor=compositor at entry=0x55e380b49400) at
libweston/compositor.c:2252
#2 0x00007f0dffdacb1e in weston_output_repaint (output=0x55e380d040e0,
repaint_data=repaint_data at entry=0x55e380d27da0) at
libweston/compositor.c:2308
#3 0x00007f0dffdaeeb7 in weston_output_maybe_repaint (output=output at entry=0x55e380d040e0, now=now at entry=0x7fff9627cde0,
repaint_data=repaint_data at entry=0x55e380d27da0) at
libweston/compositor.c:2408
#4 0x00007f0dffdaef51 in output_repaint_timer_handler
(data=0x55e380b49400) at libweston/compositor.c:2474
#5 0x00007f0dffb8f2ca in () at /usr/lib/libwayland-server.so.0
#6 0x00007f0dffb8f9b2 in wl_event_loop_dispatch () at
/usr/lib/libwayland-server.so.0
#7 0x00007f0dffb8e14c in wl_display_run () at /usr/lib/libwayland-server.so.0
#8 0x000055e37eaacb64 in main (argc=<optimized out>,
argv=0x7fff9627d3a8) at compositor/main.c:1970
GDB states that it "Cannot access memory at address 0x454341465245540e" when trying to print the value of "sub->surface"
from frame 0. Because of this, I tried recompiling with "-fsanitize=address" and consistently got the following error when bringing the pen into proximity for a second time (full log attached):
==12921==ERROR: AddressSanitizer: heap-use-after-free on address
0x616000052b80 at pc 0x7f02c7fdb6fa bp 0x7ffd10383910 sp
0x7ffd10383900
READ of size 8 at 0x616000052b80 thread T0
#0 0x7f02c7fdb6f9 in weston_compositor_build_view_list
libweston/compositor.c:2252
#1 0x7f02c7fdc15f in weston_output_repaint libweston/compositor.c:2308
#2 0x7f02c7fe17e3 in weston_output_maybe_repaint libweston/compositor.c:2408
#3 0x7f02c7fe19a7 in output_repaint_timer_handler
libweston/compositor.c:2474
#4 0x7f02c7da52c9 (/usr/lib/libwayland-server.so.0+0x92c9)
#5 0x7f02c7da59b1 in wl_event_loop_dispatch
(/usr/lib/libwayland-server.so.0+0x99b1)
#6 0x7f02c7da414b in wl_display_run (/usr/lib/libwayland-server.so.0+0x814b)
#7 0x5563675582dd in main compositor/main.c:1970
#8 0x7f02c6b7cf69 in __libc_start_main (/usr/lib/libc.so.6+0x20f69)
#9 0x55636754da99 in _start (/usr/local/bin/weston+0x9a99)
0x616000052b80 is located 0 bytes inside of 576-byte region
[0x616000052b80,0x616000052dc0)
freed by thread T0 here:
#0 0x7f02c8314711 in __interceptor_free
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:45
#1 0x7f02c7fdba56 in weston_view_destroy libweston/compositor.c:1872
#2 0x7f02c7fe4fcf in tablet_tool_unmap_sprite libweston/input.c:1524
#3 0x7f02c7fe636f in tablet_tool_set_cursor libweston/input.c:2823
#4 0x7f02c5f951c7 in ffi_call_unix64 (/usr/lib/libffi.so.6+0x61c7)
previously allocated by thread T0 here:
#0 0x7f02c8314ce1 in __interceptor_calloc
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:70
#1 0x7f02c7fd16b4 in zalloc shared/zalloc.h:38
#2 0x7f02c7fd16b4 in weston_view_create libweston/compositor.c:270
#3 0x7f02c7fe63f9 in tablet_tool_set_cursor libweston/input.c:2832
#4 0x7f02c5f951c7 in ffi_call_unix64 (/usr/lib/libffi.so.6+0x61c7)
I also notice that the "default_grab_tablet_tool_proximity_out"
function has a comment indicating that it should be trying to hide the cursor, but I don't see the pen cursor disappearing when the pen leaves prox. Perhaps it is related?
Jason
---
Now instead of four in the eights place / you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....
> Bastian Farkas (3):
> tablet: Fixed compilation errors resulting from tablet patches.
> tablet: Fixing compilation issues in weston desktop-shell related to
> tablet support patches.
> tablet: reordered changes in weston_seat struct to not break ABI
> compatibility
>
> Lyude Paul (13):
> tablet: Add initial tablet support to weston
> tablet: add handling of tablet focus
> tablet: add weston grab interfaces for tablet tools
> tablet: hook up libinput tablet events
> tablet: handle tablet cursors in the compositor
> clients: add support for handling tablets
> client: Add tablet cursor support into libtoytoolkit
> client: Add support for tablet cursor motion to window frames in
> libtoytoolkit
> tablet: Add support for moving windows around using the stylus
> tablet: Add tablet support to the top panel of the desktop shell
> tablet: Add binding to activate surfaces using the tablet tool
> tablet: Add demo application for tablets
> tablet: Remove tablet-specific tools on disconnect
>
> .gitignore | 1 +
> Makefile.am | 20 +-
> clients/desktop-shell.c | 56 +++
> clients/tablet.c | 254 ++++++++++++
> clients/window.c | 686 +++++++++++++++++++++++++++++++
> clients/window.h | 93 +++++
> configure.ac | 2 +-
> desktop-shell/shell.c | 289 +++++++++++++
> libweston/bindings.c | 39 +-
> libweston/compositor.c | 8 +
> libweston/compositor.h | 204 ++++++++++
> libweston/input.c | 963 ++++++++++++++++++++++++++++++++++++++++++++
> libweston/libinput-device.c | 340 ++++++++++++++++
> libweston/libinput-device.h | 4 +-
> shared/cairo-util.h | 4 +
> shared/frame.c | 38 ++
> 16 files changed, 2994 insertions(+), 7 deletions(-) create mode
> 100644 clients/tablet.c
>
> --
> 2.7.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list