From Problem to Resolution: The Journey of a Bug
As the Proton QA for CodeWeavers, I have seen quite a few bugs. In fact, practically every bug that has been fixed since Proton was released a year ago, including those listed specifically in the changelog and many more, has been tested by me.
Sometimes there is a bug that is so fun to watch or to reproduce that I almost can't stop.
One such bug was a mouse bug that affected every Unity title (or at least every one I tested!).
a) Moving your physical mouse upward causes the game camera to move downwards and to the right.
b) Clicking the mouse causes the camera to shift 1 pixel down and 1 pixel right. I took this video of the clicks causing the camera to shift a couple of pixels, which I found endlessly satisfying to do while I was testing the bug.**
One of the things I love about working on Proton is that we get to fix bugs that have been plaguing Wine for years. This particular bug existed in Wine long before Proton came to be; it was described and discussed in WineHQ Bug 42631 which was created in early 2017.
A user first reported that the bug was fixed with Wine-Staging on July 5, 2017. For those of you who are unfamiliar with Wine-Staging, it is a set of patches that are considered useful but not up to the standard of Wine. (For more details on the importance of high standards for Wine, and the relationship between Wine and Proton, see my other blog post here.) One of the goals of Wine-Staging is to give dangerous patches a place where users can test them fairly easily without compromising the standards of Wine itself.
Several users had corroborated that some piece of code or patch within the large number of Wine-Staging patches fixed the bug, but no developer had the time to dig into which specific patch was the key, much less improve the patch to the point where it would be accepted in Wine.
This bug showed up on my radar soon after Proton was released into the wild. Since it affected all Unity games, it kept popping up as I scanned through user feedback on the Proton GitHub page and ProtonDB.
I decided that this bug seemed achievable to fix now that we had the resources from Valve, and so I filed a bug in our internal Proton bug tracker.
I also took a look at the staging patches to try to narrow down the potentially relevant ones. Since I am not a developer, I ran into a dead end as soon as I tried to build Proton with some of the patches that caught my eye.
Luckily, Andrew (one of the CodeWeavers developers on the Proton project) took a look at the bug and the information I had gathered, and he was able to identify the single patch that fixed the bug. Not only were we able to pull the patch into Proton, but Andrew also got the patch accepted into upstream Wine -- the goal of most Wine-Staging patches.
Personally, I was excited that a bug that was so fun and easy to reproduce was also able to be fixed by finding a correct Wine-Staging patch and giving it the push it needed to be accepted into Wine.
As I was writing this blog post, I realized that this bug was a great example of how our Proton development benefits the larger open-source project of Wine. If you are interested, you can read Andrew's blog post here for many more examples.