Worst Hotfixes

Started by
0 comments, last by SmkViper 8 years, 8 months ago

In this thread we share stories of some of the worst hotfixes we've seen and/or applied.

In a game I had to present I was experiencing an extremely obscure bug where after some time pointers would randomly point to garbage values, crashing the game. I had an hour to get it working before the presentation.

I spent 45 minutes trying to reproduce it with no success. It happened at seemingly random times, but for some reason it was always the same two pointers that were modified.

Seeing as I was running out of time, I ended up inserting checks which would replace the garbage value (when it occurred) with the correct value again - the correct value I knew because I saw it in the debugger and it seemed to remain consistent.


if(game->settings_doc != 0x63e1b0)
    game->settings_doc = 0x63e1b0; /* from debugger */

After the presentation I sat down with valgrind and found the problem. A buffer overrun was writing into memory it wasn't supposed to.

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty
Advertisement
Had a bug in our game cause a script to go into an infinite loop - this is past ship, so we had to fix it in a patch, which also meant we couldn't break any save games or the like. Due to the way the script system worked, the VM would refuse to load the fixed script function until the existing function finished running (and it wouldn't finish running because it was in an infinite loop).

The solution was to have the VM, on save game load, check to see if that specific function was running and hash the byte code. If the hash matched a pre-defined value (calculated from the buggy version of the function), it would manually adjust the loop variable in the script stack to pop it out of the loop.

This let the function exit, and the next time the function was called the fixed version was loaded and didn't cause any more issues.

And of course we fixed the bug in the game that caused the loop in the first place tongue.png

This topic is closed to new replies.

Advertisement