Le 29/01/2015 18:39, Derek Foreman a écrit :
> Keyboards and pointers aren't freed when devices are removed,
> so we should really be testing keyboard_device_count and
> pointer_device_count in most cases, not the actual pointers.
> Otherwise we end up with different behaviour after removing a
> device than we had before it was inserted.
> 
> There are some cases (new device setup) where the pointers still
> need to be tested directly.
> 

Hello Derek,
I have tested your patch and for me it doesn't solve the problem of
disappearing seats. I have a quite simple test case to reproduce seat
arrival / leaving:
* launch weston with valgrind (to have it really slow) => valgrind
./weston --backend=rdp-backend.so --port=3389 --rdp-tls-cert=cert.pem
--rdp-tls-key=private.pem --width=800 --height=600 ;
* launch a lot of xfreerdp connections => for x in `seq 0 10`; do
xfreerdp `hostname` & done ;
* when a new xfreerdp window appears kill a previous one, and...

crash !!!

I have added some weston_log(), printing when a seat is freed and when a
seat is retrieved using wl_resource_get_user_data(). And for me the
problem is that we retrieve a released seat pointer, so IMHO accessing
seat->keyboard_device_count instead of seat->keyboard will not solve the
root cause of the problem. On IRC people seemed to confirm this.

Anyway I don't really see how to fix that !

Regards

-- 
David FORT
website: http://www.hardening-consulting.com/

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to