The end of an era


With the final build complete… I can finally sleep again.

All dramatics aside I am completely excited about my final project. Not because it’s over but because of how much fun I had working on it. I will have a full post mortem on the project page when its uploaded. I did encounter one final last minute game breaking bug that was one of the toughest ones to fix. To be more specific I had finished my build a few days ahead of schedule so I wanted my brother to try out my game. I sent him a copy of the build to test and I was so excited to hear his feedback. I did not expect to receive this:

“The game keeps crashing” he said. So I booted up the build on my computer and it worked fine. I asked him to uninstall and reinstall it… same error message. It’s like the old developer adage says… “Works on my machine!” But you cant leave a build like that. As far as I’m concerned if it’s broken for him… its broken for everyone. That’s not acceptable. So I decided to upload the build to the the cloud and try it on a different machine.

So I went to the only other computer in the house and I booted up the game. Fatal error! I couldn’t believe it! Not only that but the error message isn’t exactly clear. So I went back to my office and build a development version of the game. This is where I learned how to debug games using visual studio and an exe file. It was pretty interesting. The only problem was that the error message I was getting as just as difficult to find a fix for…

Somehow my game was attempting to access memory it had no right to access. But there were no real logs, or stacktrace to follow. The trail ended with this message. It would have been easier had a class been loaded so I could at least see the general area the error was happening. All I knew was that when I introduced the opening cinematic it broke the build. So I removed it, and built another version. The game booted properly. I was so perplexed! The cutscene is just a widget in a level, no code changes, no accessing other areas of memory. It didn’t make sense!

I went back to the Unreal Engine and installed debugging symbols. I ran it through visual studio code and by luck I was able to see 5 calls on the call stack. The error was caused by a rendering resolution. But I hadn’t changed any code related to rendering resolutions. Turns out the fix for this was to set the resolution in game to a common resolution like 1080p instead of the viewport resolution. DirectX12 was crashing trying to switch resolutions between gameplay and cutscenes. Once I made the change to have the game boot in 1080p with Fullscreen Windowed. It worked on every machine. The registry config stores the last resolution configuration so when my brother booted up the fixed game it still crashed. It wasn’t until he manually changed the resolution in the games menu that it overwrote the config and allowed him to play. Seems like a weird fix. But this error is apparently common in Unreal Engine 5. Oh well, lesson learned. The biggest takeaway is to have someone else on a different machine test my games in the future! Thanks for keeping up with me on Sid’s Adventure. I’m so pleased with how the game came out. Stay in touch with me and check out my website often for new projects! See you next adventure!!

Previous
Previous

Pain

Next
Next

Lights! Camera! Action!