White Shining Rock Logo
White Shining Rock Logo

Bug Squash!

September 17, 2013 | Dukus | 17 Comments

I got to the bottom of my bug list today. And something evil and foreboding stared at me. The bug said 'Make the game recover properly from DXGI_ERROR_DEVICE_REMOVED.'

About a month ago I was complaining about this hardware bug that I've been experiencing. Basically my video card is failing and stops rendering randomly in the middle of the game. Due to its annoying nature and unpredictability, I had put it on the bottom of my bug list as a low priority task. So with only this one bug left (well, only bug on my current list), I decided to make an attempt of fixing it.

Knowing that it was hard to reproduce reliably, I wrote code so that at a key press the graphics system would reset itself. It releases all graphics resources, resets the video device, and then reloads all resources from disc where possible, or it recreates any that are dynamic. Once I got this working by pressing a key, I hooked it into handling the failure case.

Happily and luckily, the hardware issue decided at that moment to start showing itself, making the testing of my fix fairly easy.

So after a few hours of coding I can now recover from a device removal. This process takes about two seconds, and while that's quite a stutter, it will at least let players save their progress should should they start experiencing this problem.

This also means the game is able to continue running while installing new graphics drivers. Wonders will never cease!

Leave a Reply

Your email address will not be published.

17 comments on “Bug Squash!”

  1. Thanks for taking the time write these posts. It's fascinating to see the internal processes polishing a game like this.

    Very much looking forward to playing it.

  2. Nice job.
    Bug hunting is not always fun, but it helps get this closer to the point where I can give you my money!
    Keep up the good work!

  3. I've only been following this for a week or two so far, but I have to say it is really my most anticipated game so far. I can not find a game similar to this anywhere. That said, the fact that you are talking this yourself, just you, is simply mind-boggling. Kudos to you.

    That said, the fact that you have found a way to keep a game running despite massive gpu failure, is another awesome achievement.

    Keep up the good work. Also, when can I buy it? 😀

  4. Interesting. When you discussed this bug before, it sounded like you absolutely needed to save a massive amount of redundant data in order to handle it. Now, it sounds like you can handle it in a matter of just a few extra code lines. Ah, what a month of thinking can make 🙂

  5. Is there any concern that forcefully restarting the gpu when this error occurs is harmful to the gpu in the case that this happens repeatedly or in the middle of driver updates?

  6. Not sure how often you'd want to be updating your graphics driver while having anything running, but good to know it can handle it. 🙂 kudos to the creative handling of that case though.

  7. Brilliant! All too often we give up when we get a graphical issue; we seem to forget that the game is running just fine in the background behind a blank screen 😉

  8. Wow, I'm impressed. Continue a session despite a change in drivers... crazy.

    Also, I just want to add to the community voice saying that I'm enjoying the extra updates. Long posts are always great, but if you've got something to say, even if it's short, we have ears for it.

  9. So with this being the last bug in your list, does that mean we might get a preview soon?

    The things I would do to play this game.

  10. Does that mean you're out hunting for more bugs, going on your bike ride to the river, or getting ready for a preview? 🙂

    Really enjoying reading your insights, keep them coming.

  11. I look forward for your game to come out,i will be from the first support that will buy it 100 % it's like the game of my dreams.

    One suggestion if you mind : When in the game will have bad weather , i would like to see the water to be like "rough" like a storm,with waves and so on.

    Only a suggestion.
    Keep it up.

  12. It's interesting how lightly you put some thing like this, this is one of those cases that could've been hours and hours of work yet you're like bah.. after a few hours of code we're good lol.

    More importantly though, most wouldn't even address this at this stage. Guess it shows you're looking after the game, should be a good solid reliable game play, can't wait !

  13. "This also means the game is able to continue running while installing new graphics drivers."

    For some reason I found that line absolutely hilarious.

  14. Now that's what I call graceful error handling 🙂 Kudos.

    Did you by any chance test how screen capturing programs (fraps, dxtory) react to the graphics system resetting itself?

  15. sin duda es un excelente juego, lastima que vivo en un país subdesarrollado y todo llega supremamente tarde, éxitos en tu juego, cuando esté a la venta seré el primero en adquirirlo. 😀 desde Colombia.

More Posts

Code Rot

April 17, 2022
1 2 3 47
Back to devlog
Back to devlog
© Copyright 2021 Shining Rock Software
Website Design & Branding by Carrboro Creative
menu-circlecross-circle linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram