My humblest apologies for the downtime. For some reason, Wordpress was looking at the wrong subdomain for the database - a subdomain I deleted a few days ago. It should be pointing in the right place now.

Let me talk to you about a fun C bug I encountered when helping some Operating Systems students.

The students keep track of a simple queue meant for storing process information. Remember that we’re dealing in C here, so there’s no friendly Queue class - students need to manage the pointers themselves.

So far as I could tell, this particular implementation for the queue was fine. A bit longer than necessary but generally bug free. So far as I could tell, this queue worked.

Until, of course, a user typed in “help,” at which point the queue was immediately emptied and everything in it destroyed. It wasn’t just that the queue’s head pointer was pointing at invalid memory which had somehow been deleted; the queue pointer had actually been set to NULL.

We managed to trace through the code and find out where the queue reassignment took place. Here’s where it gets fun. The offending line:

fclose(fptr);

Those familiar with C will recognize this as being the function which closes a file. A perfectly harmless function that shouldn’t go mucking about with other memory in any way. This didn’t just happen in the “help” function - anywhere where fclose was called, the queue would get emptied. I couldn’t think of a single feasible reason this should happen. I told them to comment it out until I determined exactly what was going wrong.

I traced through the entire program step-by-step. I rewrote half of the team’s functions thinking there might be some obscure memory access that was causing serious problems. I did a stack trace which yielded nothing helpful. And then I tried something shady.

I commented out the “remove_pcb” function and the program went down hard. Which I thought was funny, since at no point was remove_pcb called. I put a breakpoint in there, and somehow the code certainly was reaching that point.

A few breakpoints later and I found out that somehow the students’ “close” function was being called. Guess what that function does. Frees up all the dangling memory (queues included) that was being used by the program. I renamed the close function to shutdown, and the problem was gone.

Now, why did this all happen? I don’t know, but here’s the running theory:

fclose, at some point during its execution, calls a function named close. Ricky confirmed that there is, in fact, a close function in C. The students’ close function was overloading C’s close function. The method signature is different (the students’ version took no parameters, while the C version does), so the compiler should have known the appropriate one to call. However, Turbo C++ is old (over ten years old), and it’s very possible there was a bug in the compiler.

This is why I’m giving up on computers and taking up dance. Dancers never have to put up with this crap.

Listen up. There are things worth reading in this post. Things that may very well change the course of your entire life. This will, however, require that you make it to the end of the post*.

I got the position at EA for the summer, which means I’ll be shipping off to Chicago sometime near the end of May. I don’t have any details on what I’ll be working on yet. But you should know this - there’s a good chance an EA game is going to come out in the future that I will guilt you into buying. You won’t be able to say no because I will stare at you with puppy-dog eyes that could pierce the heart of Satan.

Ricky purchased Super Paper Mario and God of War (one). Reports will claim that Super Paper Mario is one of the better games of the year, and those reports will be rubbish. The game isn’t all that amazing. Once you get past the fact that it’s another Mario game (which may take all of twelve minutes), you start to realize that everything moves slow and is incredibly easy. The 2D-to-3D gimmick really doesn’t add much - the only significant change is that now you’re inspired to waste a lot more time looking for items which aren’t very useful. I’m hoping they make another Paper Mario that stays true to the RPG roots, but my faith is a bit shaken.

God of War, on the other hand, is a masterpiece. My first thought was “Devil May Cry” in Athens, and if you look close, you’ll realize just how accurate that statement is. The difference is mostly an aesthetic one - whereas in DMC everything seemed confined and a bit drab, in GoW the environments are epic. The game is technically amazing, with huge and dynamic areas. It never slows down, and it’s always challenging (Ricky has died well over 50 times, although at least 10 of these were because he was a fool). I’ve read that GoW2 basically just takes this and improves upon it, which can only be described as a Good Thing.

I picked up Amplitude and Def Jam: Fight for NY, which have both received significantly less play than the previous two. This doesn’t speak on their quality so much as it shows how wrapped up we’ve gotten in GoW. Amplitude (a music game by Harmonix) got my attention simply because it was a Harmonix offering with high reviews on gaming sites, and it offers some interesting (and very challenging) play mechanics. What it has there, though, seems to be a bit limited, and I’m not sure how much more time I’m going to invest in it. I haven’t had a chance to do much with Def Jam, which is unfortunate because I haven’t won a single fight yet. Technically, though, the game caught my eye - I wasn’t aware the PS2 could push some of the graphics that were being thrown around.

This past Wednesday I decided to skip my first class and go out and get me a Wii again. The local FYE told me they would get them in on Wednesday if they were getting any. That little tidbit coupled with the fact that nearly everyone in town had told me they were getting some in again near the beginning of April, gave me what I thought was a pretty good shot. Like its predecessor, Operation Wii 2 failed miserably. Three gamestops, 1 FYE, 1 Wal*Mart, and 1 Target later, I was still Wii-less. I nearly gave up on my search entirely and decided that I would get one when I saw one on the shelf. In my frustration, I calculated, from what all the stores had been telling me, just how many Wiis Morgantown has gotten in the past 6 weeks. The answer was around 50… FIFTY! 50 Wiis in 6 weeks, that is it. No wonder they are so rare. That number doesn’t count Sam’s Club, since that place is sealed up.

I went home this weekend( Wednesday night, actually ) and ended up getting my sister off of my cell phone plan for good because our plan was up and I could do that. But that isn’t the real point of this paragraph, the real point is that the Gamestop right across from the Verizon store had gotten in 9 Wiis just before I got to the mall. I walked in and asked, expecting a no, only to be delighted with a surprised yes from the store clerk. I am now the proud owner of a Wii! It only took 4 long months of searching to actually get one. Now the spot I had made on my “entertainment center” for the Wii all those moons ago is filled, and I love it.

On the Wii being accessible, nay, enjoyable, to those who don’t normally play video game systems: My entire family essentially stood in front of the TV perfecting their bowling scores all weekend long. My sister was home for longer than 20 minutes for the first time in 6 years. My mother bowled a 222. My father bowled a 278. My girlfriend played along side my family for over 10 hours easy this weekend. My parents stayed up way past their bedtime to play Wii all night. So yes, Nintendo, you are right, everyone loves your damned system. For the record, just about my entire household plus girlfriends is now Pro in bowling. Shiny bowling balls all around. My dad nearly went out and bought one himself after taking the first stroke at Wii golf. I am really hoping Nintendo will be releasing more awesome minigame games that are easily accessible to everyone. It was a good weekend.

I notice that I tend to write here when I’m avoiding doing real work. That trend continues right now.

We have a forum. Most of you either don’t know this or don’t care, and I’m emotionally stable enough to handle either scenario. However, spammers do know, and apparently the word has spread like we’re the hottest thing on the internet. The forum suddenly shot up to about twenty registered members and about an equal number of posts, and nothing there constitutes the work of a real person. When the spammers realize they’re advertising to nobody, they’re going to very sad. They may shed tears. We have a very similar problem with the 72HGDC forum, which does get traffic, and it’s been an obstacle keeping up with the spammers. Frustrating stuff.

I’ve also become amazingly frustrated with Windows’s default wireless network manager. The typical scenario is that I try to connect and it tells me it couldn’t connect (twice, each with a different message) before finally connecting without a word. It’s irritating and shouldn’t happen with such a high-profile piece of software, but I’ve come to accept it. This weekend, it would do the same thing, and then go on to say it was connected without actually being connected. It would go so far as to tell me I had a very good connection without any problems, which of course was a teacherous lie. Ricky and I diagnosed the problem to discover that it decided to no longer detect our network security, and thus it wasn’t able to authenticate. None of our attempts at changing its mind proved successful, so we just switched to Intel PROSet. Everything’s worked blissfully since.