Everytime there is a VT switch, XWayland creates new pointer and keyboard objects.
When it reaches the number of 40 pointers and keyboards, X crashes with all the X applications.
*** This bug has been marked as a duplicate of bug 79609 ***
From what I remember this is not the same exact problem than bug 79609, and I remember we solved it. Just forgot to say this has been fixed.