TRAUMA – Heisenberg Boss Bug

It seems like this project has a life of it’s own. It stubbornly refuses to get finished. It resists with all it’s might. And it delivered an overwhelming last blow today.

I started work on the image loading system. The system I was about to replace was one of the oldest bits of code in the project. I realized I was about to take out a vital organ out of my program and replace it with a new one. The problem with that organ is that it is attached to a lot of other organs. Some attachments aren’t even obvious or logical. So by removing it, I could accidentally rip out all of the guts in the process.

And this is exactly what happened.

After a hefty rewrite the program wouldn’t load things correctly anymore. If I did manage to load a level, some of the images didn’t display properly. It would throw all sorts of errors at me. But the worst thing happened when I went into Debug Mode to figure out what the errors mean. A very nasty bug appeared. A bug I have never seen before. One that couldn’t be localized and one that only appeared in Debug Mode. Even laboriously stepping through the code line by line didn’t help. The bug wouldn’t appear if I did that. A Heisenberg Bug if you want.

I did what every reasonable person would do in such case. I panicked and flipped out. After destroying two pens and a pair of headphones I stared trying things randomly. I thought about restoring an older version of the sourcecode but that seemed futile on a second thought. I would need to re-do a lot of work. I didn’t even have a clue what the old code would be missing. With my spirit shattered I desperately continued trying out random things. I found and fixed some other nasty bugs but they didn’t seem to be the problem. After a while I discovered I was able to make some assumptions about the Heisenberg Bug after all. It seemed to have something to do with the video loading system, not with the new image loading system. And sure enough, that horrible video API was the problem yet AGAIN.

I don’t want to go too much into details. Basically, some information of the video arrived much later than expected, didn’t arrive at all or arrived too many times. It also arrived in a very complicated, unusual manner. I had a system in place meant to deal with the case where the same information would arrive too many times. Because of the complicated API, it created an error within the API, not my own code. The problem was tripped due to a very minor change I did some time during my work on the image loader. I decided to just completely ignore that information and to implement workarounds so the game doesn’t need it. The result was profound. All the bug were gone at once and the levels even load much more quickly now.

It truly felt like the final boss of the entire project. I’m mentally and emotionally exhausted but as of now, Trauma working off my web server. It flawlessly loads all files from it on Mac and PC. The loading times are well within my expectations too.

I will do some tweaks, set up a bare-bone beta website over Christmas and begin sending out beta invitations this Weekend. Stay tuned!

Krystian Majewski

Krystian Majewski was born in Warsaw and studied design at Köln International School of Design. Before, he was working on a mid-size console project for NEON Studios in Frankfurt. He helped establish a Master course in Game Design and Research at the Cologne Game Lab. Today he teaches Game Design at various institutions and develops independent games.

13 responses to “TRAUMA – Heisenberg Boss Bug”

  1. Colton

    Congrats on finishing.
    Bug squashing can be a great way to pull out your hair. Glad to hear that’s done.
    Look forward to being able to play soon.

  2. Jessica

    Kudos for overcoming the final boss battle. I’m excited as ever to get my hands on this at last. Seeing your plans for the holidays, don’t forget to reserve some time for rest as well. Take care! :-)

  3. Christopher v. Bronsart

    Invitation.want.please

  4. Yu-Chung Chen

    A… brain bug!? The only good bug is a dead bug!

    Well done solving it better than Adobe, congrats!

    Actually it would be useful to know the exact nature of the bug, when you have time to tell it later on, so the world can avoid it.

    Make sure you send me one of those invitations!

    1. Krystian Majewski

      Good point! I got a “TypeError: Error #1006: value ist keine Funktion” / “TypeError: Error #1006: value is not a function” at a unspecified place. Usually, that’s the sign of treating a property like a method by supplying it with arguments. In this case this happened during a callback to a custom client object for a video stream object. I created a custom client object like this
      customClient["onCuePoint"] = cuePointHandler;
      customClient["onMetaData"] = metaDataHandler;
      stream.client = customClient;

      At some point I destroyed that object along with it’s functions
      customClient["onCuePoint"] = null;
      customClient["onMetaData"] = null;

      So when the callback happened, the API tried to call a function that wasn’t there anymore causing this error. Because the error popped up in the API, the Debug Mode wasn’t able show the place where it happened.

  5. whatever

    Thrilling!
    The creator in hands of its own creation. Seems like Trauma makes honour to his name, hehe.
    Your tale of the making of this game is also fantastic, like a suspense novel.
    Congratulations for the epic odyssey.

  6. Jonathan Moore

    I played your game at IGF this past spring. I was looking back at some of the indie games that had been released recently and I wondered “what happened to Trauma?” Well it’s really awesome to see that you’re about to go into beta. I’d love to be a beta tester if there’s room for me :)

  7. Boris

    Thanks for not giving up! I’m looking forward to the game :)

  8. Sarah

    Argh, ich verfolge dein TRAUMA Projekt ja schon seit dem IGF gespannt… Und endlich scheinst du am Ziel angekommen zu sein! Hooray!

    Falls du noch BETA-Tester suchst, stelle ich mich ebenfalls gerne zur Verfügung – oder anders gesagt, ich kann es kaum erwarten, es endlich zu spielen! :D

  9. Christopher Robin

    I’ve been looking forward to Trauma for months and am so excited it is nearly complete! I hope you will consider me for beta too!

  10. Bribase

    Congratulations Krystian.

    I can’t wait!

  11. Roomba reviews

    Wow I just watched your gameplay video, it looks like a great game. I can’t wait to play it. Good luck with the final hurdles!

  12. Giovanni

    I’m happy to herd nwes from this project! I’m following it since the partecipation at the IGF. Hope that we be able to play it soon!

    And if you need help with the beta contact me!

About

The Game Design Scrapbook is a second blog of group of three game designers from Germany. On our first blog, Game Design Reviews we describe some games we played and point out various interesting details. Unfortunately, we found out that we also need some place to collect quick and dirty ideas that pop into our minds. Hence, welcome to Game Design Scrapbook. You will encounter wild, random rantings. Many of then incoherent. Some of them maybe even in German. If you don't like it, you might enjoy Game Design Reviews more.

Twitter

follow Krystian on Twitter
follow Yu-Chung on Twitter
follow Daniel on Twitter