Don’t ignore baseclass methods in OSObject

Having spent an hour so (and more than a few reboots) – here’s a reminder to myself (and other hapless souls). 

Just because OSObject is pretty abstract and can’t be constructed on it’s own that doesn’t mean you can ignore its methods. In my case I was stymied by an apparent ‘hanging’ reference even though I could see that my very simple OSObject subclass was allocated only once and free() was called as the reference count went to zero.

My mistake was not to call the baseclass OSObject::free() from my own method – so of course although I thought (knew) I was done with the object the rest of the IOKit/kernel wasn’t so convinced.

So… don’t forget that OSObject still does very important things – even if it does seem a bit of a placeholder !

Posted under Apple, Development

This post was written by awk on March 1, 2009

Tags: , , ,

25 years of Macintosh

On January 24 1984 Apple Computer introduced Macintosh – and suddenly for a great many people not only was 1984 not like 1984 neither was any of the next 25 years.

Being in the UK at the time I never saw the infamous SuperBowl Commercial – it was some years before I think I saw the first grainy QuickTime version. I had already been using an Apple IIe at my school, and during a trip to France in 1985 (I think, but it might actually have been the summer of 1984) I had my first exposure to a Macintosh in a small Apple Dealership in a town (whose name I now forget) not far from Paris. Little did I know at the time that I would eventually work for the then President of Apple France (Jean-Louis Gassee). However as a student a Macintosh was out of my financial reach and I had already become quite devoted to the BBC Microcomputer.

In 1991 whilst working in Munich for Digital I was finally able to afford a Macintosh IIci which then became my primary computer for the next few years. It formed part of my Undergraduate project (a transputer add-in card and host environment). I did add a PowerBook 150 a few years later and kept using it too for some time whilst working in Australia and travelling to the US. In 1996 just after the switch from 680×0 CPUs to PowerPC systems I purchased a PowerMac 7100/80av. The PowerMac 7100 could run a new OS – BeOS – a putative replacement for Apple’s aging System 9 OS. I became enamoured, and ultimately joined Be Inc working on the development of BeOS. Though by the time I started working for Be, Apple had made the decision to acquire Next and Be had adjusted focus to concentrate on an Intel/PC version of BeOS.

Since the PowerMac 7100/80av I’ve not owned very many ‘desktop’ Macs, rather I’ve had a series of PowerBooks (a couple of G4 models, and now a MacBook Pro). I did purchase a Mac Mini a couple of years ago which serves as a household media server and the like.

My development efforts for the Mac have really taken off over the last 8 years or so. After a brief hiatus between college and leaving Be when I was mostly working on Unix or BeOS development I’ve switched to doing about 60/40 (perhaps 70/30) Mac vs. Windows development. Working on OS X ports (from OS 9), plugins for browsers, audio applications, audio plugins, media applications, media device drivers, virtual platforms, and more device drivers.

I knew back in 1984 that I wanted a career in software development,  I knew then that the Mac would be interesting platform to work on. I don’t think I had any idea 25 years ago how far either the platform or I would go.

Posted under Apple

This post was written by awk on January 24, 2009

Tags: ,

Time Machine not Backing Up ?!

Recently my MacBook started to complain that it hadn’t been able to do a Backup successfully for the last 21 days !

My MacBook usually backs up regularly using Time Machine to a Volume shared from my Mac Mini (sharing a volume from another Mac is one of the few supported remote destination for backup options with Time Machine).

The volume was still shared from the Mac Mini but for some reason the MacBook didn’t see it when I connected via the Finder – other volumes and my home folder showed up fine though. Restarting the machines didn’t fix anything, so I resorted to Disk Utility to see if anything showed up there.

The only odd thing was that my Time Machine ‘server’ volume reported that “Owners Enabled” was “No” (at the bottom of the Disk Utility window). Disk utility doesn’t have a way to change/set this, but there is a command line utility you can run from Terminal that does :

vsdbutil -c /Volumes/TMServer
No entry found for '/Volumes/TMServer'.

If you run vsdbutil with the -a switch it will activate ownership on the specified volume :

bash-3.2# vsdbutil -a /Volumes/TMServer
bash-3.2# vsdbutil -c /Volumes/TMServer
Permissions on '/Volumes/TMServer' are enabled.

Once I re-enabled the Volume as a Shared Folder a Time Machine backup from the MacBook started almost immediately ! Success – Backups Restored !

Posted under Apple, Leopard

This post was written by awk on January 12, 2009

Tags: , ,

Mac OS X Desktop Virtualization

Craig Hockenberry (Iconfactory & Twitterific) is looking to encourage more developers to request Apple to support the use of Mac OS X Client (Desktop) virtualization and not just the Server version of Mac OS X :

Of course I have a vested interest in this and am not without bias on the issue – but all the same he raises valid points…

Posted under Apple, Development, VMware

This post was written by awk on March 21, 2008

iPhone SDK Restrictions

There’s been some ‘grumbling’ (here and here) about some of the restrictions that are placed on application developers and their products if they use the iPhone SDK.

Many of the commenters seem concerned that the SDK is much more restrictive than ‘regular desktop’ development, with restrictions on running in the background, a lack of access to certain parts of the platform, and pieces of functionality present in desktop Mac OS X but missing from Cocoa Touch.

Why are things so different ? Technical challenges ? No. The reason – in two words is: Legal Liability.

I think Apple is very concerned that there is a danger someone would try to use their iPhone in an emergency (to dial 911) and have it fail because of a failure (or out of control) third-party application. If that happens and lawyers get involved I don’t think they’re going to  go after small  one-person software developers with buggy code. Rather they’ll go for the deep pockets at Apple.

Yes Mac OS X uses protected memory, and is a pre-emptive operating system. But it’s still vulnerable to people using too many resources and there are places in the OS where the failure of one application at the wrong time can lead other applications to fail (for example Disk Notification on the desktop  Mac OS X can cause Finder to stall if you fail to respond to the notification request in a timely manner).

Personally I’m grateful for a little care, attention and large walls in this space – my phone is probably more important than my desktop, especially in an emergency, making sure it’s always there when I need it is very important.

Posted under Apple, Development, iPhone

This post was written by awk on March 13, 2008

iPhone SDK, App signing and Beta Testing

Part of the iPhone SDK is a requirement to spend $99/year if you wish to distribute your application through the iTunes Store.

The $99 also gives you the ability to load your application into your own phone for testing without needing to use the store. Apparently it does this by giving you a certificate which you can use to sign your application, the same certificate needs to be installed into the phone for the application to run.

This is part of Apples mechanism to ensure that only approved (blessed) applications will be distributed through the store – apps on the store will be signed with a different certificate that Apple will control and that certificate will be installed on all iPhones running V2.0 of the iPhone OS.

What about beta testing your application on a larger pool of users than just your phone – testing is always a good thing – but right now it’s unclear how you can distribute your application to a pool of testers and let them install it. Using the store won’t be a good thing because that exposes the app to everyone. Require every tester to have paid $99 for the tools to self-sign (as it’s called) and install the app on their phone ? That seems expensive. Distribute your certificate with each app and have testers install it alongside the app ? Better – but still the question of exactly how is the app installed.

How to test the fruits of your labours seems quite unanswered right now !

Posted under Apple, Development, iPhone

This post was written by awk on March 7, 2008

iPhone to Android – I’ll see your 10 million and raise you another 90 million

One of the things that Google announced with Android (though they’ve revised the rules once already) was a competition with between $25,000 and $275,000 in prize money for the best mobile applications on Android.

Today’s ‘One More Thing…’ announcement from Steve Jobs during the iPhone SDK event was for John Doerr from the VC Partners Kleiner Perkins Caulfield & Byers announcing that they’ve created a $100 million fund to invest in the development of applications for the iPhone. You can find the FAQ here – Kleiner has one of the better track records of picking good tech firms to fund. Gaining their funding would be a huge leg up for any developer !

Frankly I prefer Apple’s approach – it seems a little more professional and a little less like a competition for students !

Posted under Apple, Development, iPhone

This post was written by awk on March 6, 2008

Finally !

It what was probably one of the most anticipated and predicted Apple Hardware announcements – Apple today announced new MacBook Pro’s and MacBooks.Like many I’ve been waiting since the beginning of the year to upgrade – my order is now in, it’s supposed to arrive by March 3.  

Posted under Apple

This post was written by awk on February 26, 2008

Gruber on the Keynote

John Gruber writes :

But, on the other hand, if Apple is charging for the iPod Touch upgrade to comply with Sarbanes-Oxley, why is the Apple TV upgrade free? As far as I know, they’re not accounting for Apple TV sales on a subscription basis. I’m left with the feeling that they’re charging $20 for the iPod Touch upgrade simply because they can.

Actually I think Apple did say that they would account for AppleTV revenue on a subscription model – it was one of things that made me realize there would be new features for it, and one of the reasons I was happy to purchase. Unfortunately I cannot now find a reference for that statement.

Also if you’ve not watched Randy Newman’s post keynote performance, you really should – he may be getting old, but he’s still great.

Posted under Apple

This post was written by awk on January 16, 2008

Steve Jobs on Android

In a post Macworld interview with John Markoff of the New York Times Jobs is quoted :

 “Having created a phone, it’s a lot harder than it looks,” he said. “We’ll see how good their software is and we’ll see how consumers like it and how quickly it is adopted.” In seeking not to get locked out of the mobile phone world, “I actually think Google has achieved their goal without Android, and I now think Android hurts them more than it helps them. It’s just going to divide them and people who want to be their partners.”

This seems to repeat the assumption of many people that Google will make money from the applications on the platform itself, or from the simple increase in the number of web users (or hours of web use) and the associated likelihood of eyeballs seeing Google provided advertising on the new platform.

I disagree…

I think Google’s most likely stream of revenue from the phone is from delivery contracts with the mobile operators. Today mobile web browsing is a ‘OK’ but problems of poor wireless speeds are compounded by what is a somewhat inefficient approach to the movement of modern web pages, their graphics and the associated elements of the web experience. Google has a widely deployed (Internationally now as well as domestically) topology of data centers and the exceedingly fat pipes that link them. If Google is in a position to ‘own’ the software on the handset and is confident of localized connectivity between the handset and a nearby Google datacenter they can do many things to improve the handheld browsing experience :

  • Localized caching of information
  • Compression of certain elements above and beyond what’s already done
  • Wholesale replacement of the HTTP protocol between the handset and the datacenter to further accelerate browsing.

These sort of things are services that a wireless operator would like to see to differentiate themselves from the competition, it’s also the sort of thing the operator would pay for directly with Google – a single large source of revenue. It can also be easily made part of any opensource project, indeed even done on the iPhone ! Since the real ‘magic’ is the datacenters, their performance and the smart software therein.

Don’t forget that the lead developers of the Android project are the folks from Android Inc. (an acquisition Google made a few years ago). This is the same team behind Danger and the T-Mobile Sidekick – a platform that has a significant service component for which Danger receives revenue from T-Mobile for operating, providing and upgrading.

This sort of thing is a great way for Google to leverage their widely deployed high bandwidth network and datacenters and start getting revenue to cover the cost of all the ‘dark fiber’ they apparently snapped up many years ago.

Posted under Apple

This post was written by awk on January 16, 2008