Strange Firefox+Mac WordPress Admin Page

Below is a screencap of what part of my WordPress 2.6.1 admin page looks like when I view it using Firefox 3.0.1 on Leopard.

If you click on it to view it better, you’ll see the problem. The stats graph is shifted about 200 pixels to the right and about 150 pixels down. On Safari it looks perfect, but not on Firefox. This doesn’t happen with Firefox on Windows, so it’s some sort of quirk with the Mac version.

Has anyone else seen this, and do you have any suggestions?

Apple Still Working on MobileMe

I just received an email from Apple regarding MobileMe. Here’s what it said

We have already made many improvements to MobileMe, but we still have many more to make. To recognize our users’ patience, we are giving every MobileMe subscriber as of today a free 60 day extension. This is in addition to the one month extension most subscribers have already received. We are working very hard to make MobileMe a great service we can all be proud of. We know that MobileMe’s launch has not been our finest hour, and we truly appreciate your patience as we turn this around.

It’s good to see the bit in there about this launch not being their “finest hour.” That shows that they recognize how bad this rollout has been. But they better solve it soon or they’ll be giving everyone a free year. We’re already up to 90 days of free service.

I really like MobileMe, though the only part of it that I really use is syncing bookmarks and stuff between my Mac Pro and iBook. I tried to setup the Outlook integration on my Windows laptop the other day, but it didn’t seem to actually do anything. I guess that’s part of what’s broken with the service, maybe.

Strange Seg Fault In Simple Cocoa App

I just got Aaron Hillegass’ 3rd edition of Cocoa(R) Programming for Mac(R) OS X (3rd Edition) and am working through it as if I never went through the 2nd edition. (It’s been so long since I did any Cocoa, that seemed like the smart thing to do.) Anyway, I’m in Chapter 4 on memory management and things were going fine. Until all of a sudden, the program started dying with a segmentation fault. After trying to figure out what I’d done wrong, I figured I’d mistyped something and just wasn’t seeing it, so I reverted my changes back to what I had in my Subversion repo. I then started making the changes again. And again the program died with a segfault. 

Any time I’m working through a programming book, I always type all the examples in by hand, rather than downloading pre-written code. I learn better that way. But in cases like this, I don’t have a problem with looking at the author-provided code to see where I went wrong. I downloaded the solutions from Aaron’s site and started comparing. I found the problem pretty quickly.

Originally, the code for creating the NSCalendarDate object for today’s date was

NSCalendarDate *now = [[NSCalendarDate alloc] init];

which, when you later add the code to release it, would have worked fine. But at some point between when I wrote that line of code and when I added the release, Aaron mentioned a convenience method on NSCalendarDate for getting back an autoreleased date object. That code looks like this

NSCalendarDate *now = [NSCalendarDate calendarDate];

I had changed my code to use that instead of the original version. That was in Chapter 3. So, when I hit Chapter 4 and added the call to release the date object, I ended up with my segfault. The chapter assumed that you still had the alloc & init calls, and so made no mention of the calamity that would ensue if you had switched to the other way of getting today’s date.

What made this difficult to find was when the segfault occurred. It didn’t happen when I called release on the date object. It happened on this line

[pool drain];

which is one line before the program ends. That’s boilerplate code there, so it was really strange that it was barfing. The reason this caused the problem is that this way of getting a date is autoreleased, which means that unless I retain it somewhere, it’s going to get deallocated when the NSAutoReleasePool is deallocated. But when I called release on it, I ended up setting it’s retain count to 0, so when the pool was drained, it ended up sending a release message to an object that had already been deallocated, which is a no-no.

Bottom line is that had this been a big program, this could have been really hard to track down. Of course, turning on the Objective-C 2.0 garbage collector would have solved the problem too, but then you have a Leopard-only program.

I Paid My $99 To Apple

As I said yesterday, I finally got my acceptance letter from Apple that essentially allows me to pay them $99 in order to develop iPhone software. I have just now paid the $99, so now it’s just a matter of waiting for the license or whatever it is that they will send out. Let’s hope it doesn’t take as long as it did for the acceptance letter.

As I write this, I am downloading the iPhone SDK. I played around with the first beta Apple released, but I haven’t really done anything with it since then. That was before they got Interface Builder going, so it should be a lot better now than it was then. I’m looking forward to getting started; now I just need to think of something that needs writing.

07/13/2008 00:37 Update: About 20 minutes after posting this, my Activation Code email arrived from Apple. Fun times ahead.

So *Now* Apple Will Let Me In…

After months of waiting, I received this email from Apple just a few minutes ago:

Thank you for applying to the iPhone Developer Program.

We have reviewed the information you submitted when you initiated your program enrollment request and we are ready to instruct you on the steps required to complete the enrollment process.

Please click here to review and agree to the Standard License Agreement. You must execute this agreement prior to completing the purchase and activation process for the iPhone Developer Program.

Once you complete and activate your purchase, your enrollment will be complete.

Thank you,

iPhone Developer Program

I guess now that the App Store is live, they can let more people into the program. Now I guess I’ll have to re-download the SDK and pony up.

MiddleClickClose for Safari 3.1.1

06/14/2009 Update: It now works with the just-released Safari 4, too.

Someone wrote to tell me that MiddleClickClose was no longer working after upgrading to Safari 3.1.1. I hadn’t yet installed the latest version, so this was news to me. I just upgraded, but MCC still worked for me. I’m not sure what the user’s problem was. Maybe he upgraded from Safari 3.0 to 3.1.1, skipping 3.1, which I can see how that would have broken it for him.

I did change the MaxBundleVersion in Info.plist to 5525.18, which is the current version of Safari, so if you’re having problems, install the copy linked below. Or edit the Info.plist file in MiddleClickClose.bundle/Contents yourself.

iTunes Should Remember Window Size

I subscribe to a lot of podcasts, and lately I’ve been subscribing to lots of video podcasts. I love watching GeekBrief in ginormous HD format. But not all of the videocasts come in that large format, so I have to right-click on them and select ‘Double Size.’ But the next time I watch GeekBrief, it spans both monitors, because iTunes applied my ‘Double Size’ selection to this video as well.

What would be nice is if iTunes remembered your video settings for each subscription instead of one setting for all. This would allow me to set ‘Actual Size’ for GeekBrief, but ‘Double Size’ for The Buzz Report. That would be really nice.

MiddleClickClose Updated

I announced here that I had updated MiddleClickClose to work with Safari 3.1, but that it had problems loading under Safari 3.0. Actually, the problem was that it wouldn’t load on a PPC chip; I was testing on my iBook G4, but I hadn’t generated a universal binary. That was caused by having the iPhone SDK installed. Anyway, I dropped back to Xcode 3.0 and got a universal binary built, and now everything is happy.

If you want the plugin, ensure you have SIMBL installed, download the binary package below, and unzip it in ~/Library/Application Support/SIMBL/Plugins and restart Safari.

As usual, it’s distributed under the GPL.

My, What a Large Amount of Virtual Memory You Are Using

I just checked my Activity Monitor to see how much of my 6 gigabytes of RAM was in use. I was shocked (shocked!) to discover that a Java RMI server program (that I wrote) appeared to be using a bit more virtual memory than it should. Take a look at this screenshot of this process:

I’m sure it’s just a reporting error, but it was still funny to see.