Jump to content
  • Advertisement
Sign in to follow this  

Worst Hotfixes

This topic is 1222 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!