What was the most frustrating bug you've dealt with?
Freezes, crashes, and glitches... oh my! Our Discord community shares the toughest bugs they beat.
Each week we pose a question to our game developer community on the Microsoft Game Dev Discord. The beating heart of our online developer community, our Discord server allows developers to connect with each other, share their projects, get support, and network with peers in a thriving discussion space.
This week’s question is: What is the most frustrating bug you've encountered and how did you fix it?
MrDucktheFifth: “I once spent a week trying to fix a bug that would freeze the game after starting to edit a build. I ended up only needing to delete a single line of code.”
Nea “Vazde” Mehtonen, a “.NET fangirl”: “Of the somewhat recent bugs I’ve encountered, one of the most frustrating and surprising was an NVIDIA driver bug. Or feature 🤷♀️
At some point I started to notice that sometimes if I left my PC idle and the screen went off, both the GPU and the CPU would shoot up to a high utilization. It took quite a while to first rule out the usual suspects, especially because it didn't happen every time. I finally noticed that it was my own game that was doing it - reproductible every time the screen went off. It took some more debugging to figure out that it was due to the driver returning swap chain images somewhat immediately after rendering the frames: it was no longer bound by vsync (or any other sync). So instead of the 20 (non-focused) or 144 Hz it usually ran, it started to render at like 1000+ Hz, with the power usage to match. I ended up looking into the winapi power notifications, implemented functionality to detect when the screen is off, and limit it to 1 Hz myself, and call it a day. No more noise. Sigh.”
Manuel Cota, Software by Tarh Ik: “When a game within the Windows ecosystem crashes, a crash report is generated. The information in this report depends on the player’s privacy settings: It could range from being fully detailed (including a minidump that points out what happened at the time of the crash), to as vague as a single error code.
About five years ago, all my games started to report a sporadic crash. To my surprise, all crash reports had the word “Unknown” as the cause of the failure and, of course, no minidump included. I debugged my code, I looked everywhere, and I could not replicate the problem. According to the Windows Store statistics, in one day, one single session reported three crashes. I resigned myself to endure the negative review, hoping that at least it would shed some light on the problem. But no negative review ever happened.
Then, while working on my latest game, I noticed that after launching it from within the Xbox One console, nothing happened. I tried again and everything started working as it should. However, that little hiccup gave me the clue I needed to fix this sporadic crash. Long story short, it turns out that, every now and then, when Windows launches a game, it tries to resize the game’s screen size before creating it. I don’t know why it happens (not that I need to know either), but I suspect that this was the cause since all my games run in full screen mode.”
Tyler “Coffee” Merker, currently working on Bow-Bots: “Multiplayer In World Widgets in Unreal Engine 5 cannot be operated by themselves, OR by the 3D object holding them in real space. You have to port all of the information to control them back to the Player Pawn or Player Controller in order for client-users to make replicable changes to the information.
But storing that information, for every type of level, every type of widget, on the player controller, is a brittle implementation and not good OO design, so I had to instead write an interface to move the information back through the player controller, just to call a function back on the widget it was coming from on the server's side.
Amirtha “Chaak” Krishnan, currently working on Tooth and Nail for this year’s lowrezjam: “It was when I was making "No Offense", a very simple game with just one button for all actions. What happened was that there was a shield that protects the player from incoming fire. It worked, but it wasn't "visible”. After a good two hours of banging my head, I took a much-needed lunch break. I plugged my laptop in to charge, and then ran the game... The shield was visible.
Turns out, the editor-play mode in the version of Godot that I was using at the time halved the FPS when the laptop was running on battery power, and this affected the shield’s visibility. Fun times 💀”
InnoGZ: “Well, every bug that takes more than two hours to fix is already a frustrating type of bug. Also, bugs that are regressive in nature and get worse with lower frame rates. I encountered these recently with Player Colliders and Obstacle Colliders slamming into each other and making the player stuck. I fixed it with manual transform manipulation and trigger checks. The fixes are quite desperate to be honest. But they worked! 😜
Want to join in on the fun? Visit the Microsoft Game Dev community on Discord to hang out with us, we’d love to see you there!