Adium, Facebook Chat, and a Mac OS X Mystery

Adium (my favorite chat client) just released the Adium 1.3 Beta. As implied by “beta”, it’s not quite ready for prime time yet, but I decided to give it a shot anyhow.

I noticed they’d added Facebook chat to the client, added my Facebook account, and suddenly saw all my Facebook friends who were either actively online or idling on Facebook. It was a surprising experience for me because most of the folks in the list aren’t the type who would use a regular chat client, but there they were on Facebook, and I could chat with them. Chat, from my perspective, is something that usually separates the true tech user from the casual tech user. Casual tech users either don’t understand chat or just don’t want it. Chat requires a person to hang out near the computer, and the casual user has no desire to do so.

Still, I gave chat a try with Steph and with Eddie because they happened to be on at the time. Something strange happened during my chat with Steph that I think is very worth mentioning. When you receive a message, Facebook makes a soft “pop” sound. Steph had never heard this before, and said, “Do you hear that popping sound? What is that?” and then after the second or third message, “It’s my computer! Why is it doing that?” Facebook was open in a tab in Safari, but in the background. Nothing odd so far.

After I guided her to Safari and to Facebook, she chatted for a second and then closed the tab. Here’s where things get strange, especially if you’re a Computer Science person. She closed the tab, but she still appeared to be online in Adium, so I sent a message. A “pop” came from her computer. “Stop it!” she said.

She closed Safari. I sent another message. Pop.

She closed all other applications except the Finder. I sent another message. Pop.

Even if you’re not a geek, you probably know that should not be happening. Facebook should not be able, through Safari or any browser, to maintain some kind of persistent connection with your computer after the processes rendering and interacting with their website have been quit. I’m not saying Facebook is doing something malicious. It seems likely to me there is some strange bug in Safari that allows this live connection to linger after Safari has been quit. (Perhaps one of Safari’s frameworks is still loaded and active in memory since it is shared across apps, and it is talking to the networking layer? I don’t know. I’m mostly just taking stabs in the dark.)

Still, the bug isn’t easy to recreate. The only way we were able to stop the popping was to have Steph log out of her user session entirely. We tried to reproduce the issue without success.