I’m baaaaack.
Last time I was talking about the recent patch to WAR, and the sudden CTDs I was getting as a result each time I tried to log out to the character selection screen. My guildmates’ reaction to this was “Eh, patches cause crashes.”
There are two things I want to examine about this situation. One, what might have caused a game to be released with a bug so severe that it shuts the client down, and two, why we as users think not just that this is OK, but that it is expected and accepted.
As I said before, I have been professionally developing commercial software for 20 years now. Standard disclaimer applies: I have never programmed a game in my life, and I certainly have no knowledge of the working of the WAR program. That said, there are some overarching concepts in software development the apply regardless of what you are developing.
In part one I brought up the concept of the “software triangle” and mentioned I did not think that it was responsible for the bugs in this latest patch. While it’s certainly possible, the honest truth of the matter is that this patch has been very smooth for the most part. The fact that not everyone is crashing to desktop (I and Jennifer at GirlIRL are the only two that I know of at this point) indicates that the software triangle probably was not the cause. Problems with the triangle are usually more catestrophic.
So what did happen? Most likely a simple truth is the cause of our CTD woes: Software is complicated. All software, even the simplest “Hello, world” program is complicated. Those out there who remember Charles Petzold and “Programming the OS/2 Presentation Manager” remember the eight pages of raw C init code you needed just to get your “Hello” to display know what I’m talking about. Add multiple layers to that, interacting subsystems, OS, hardware and myriad other things and you start to get an idea what I mean by “complicated”.
So, let’s look at this CTD issue in WAR 1.2. For those not experiencing it, when you log out of the game to go to the character selection screen, the game window disappears and shuts itself down, poof. Colloquially known as a “crash to desktop”, developers refer to them as “abend” (that’s ab-end, as in “abnormal end”) and the most common reason for that to happen is the program tried to use some data that simply was not there, something known as a “null pointer reference”. When the program could not find what it was looking for, and there was not protective code surrounding it (i.e., no error catching), the application simply shuts itself off.
So, that does not sound too bad, right? We know that it happens something like 4 out of 5 times (I was able to log out successfully once) going to the character screen, we know we are looking for a “null pointer reference”, whatever that is, so it should not be too hard to find, right?
Wrong. The great bugaboo with errors like this is inconsistency. 4 out of 5 times means that 20% of the time the code is not hitting the “null pointer reference” Why? It’s only happening on some people’s machines. Why?
Now you start to see (I hope) why I said I did not think that the software triangle was responsible for this error. If it were, this would have happened on everyone’s machine, all the time (OK, OK, most machines most of the time…happy?). The point is, it probably would have been caught before it went out the door. But, a crash that only happens on some machines some of the time is much less likely to be caught for the reason I stated above. It’s complicated. Lining up all the moving parts of a complex program like an MMO and stepping through every single iteration of every single possibility of everything that could go wrong…would be nearly impossible. It makes cleaning the Augean stables look like child’s play.
So we’ve answered question one, above, why did this happen. Because testing every single possibility in a complex system is not feasible (note I did not say ‘possible’) in a reasonable amount of time, so bugs will slip through. I’ll save the answer to question two for the next installment. See you then!