Does our code suck or is there something we're not seeing? (Lutris, high DPI mouse)
I maintain Lutris, which is written in Python and uses PyGObject. I have also recently switched to Wayland permanently and purchased a high DPI Razer gaming mouse. With those 2 factors combined, I started experiencing frequent crashes in Lutris while handling my library of ~1400 games.
After investigation, the cause of those crashes became pretty clear. Any blocking task run in the main thread could cause the application to crash. Not moving the mouse at all would prevent a crash. Moving the mouse really fast during a background operation would guarantee a crash. From there on, our last release was mostly about finding those blocking operations and send them in a separate thread. This would prevent crashes on Wayland but it became apparent that we had a lot to deal with and Lutris 0.5.16 was shipped with a lot of possible causes of crashes.
During the development of the last release, there were some disagreements within the team. While I believed we should find and fix blocking operations, with the benefits of having a more responsive UI, Daniel argued that it is maybe not our responsibility to fix those crashes and catching all possible causes of crashes is a daunting task (it really is). After all, our UI was running fine on Xorg, without crashes. It's also harder to get repros on those crashes, it's all a combo of using a high DPI mouse, a rather large Lutris library, some games on HDD which have a tendency to put themselves to sleep and running Wayland.
While I'm all for improving our codebase, I find this may be unwanted behavior and might get fixed in the future. But with the existing installation base of Wayland in its current state, what's the best way to mitigate our crashes? I've been hesitant to use async / await, is this a possible solution?