Bizarre Droid auto-focus bug revealed
What was making the Droid camera go out of focus?
Verizon's launch of the Droid has been marred by a handful of bugs that Google and/or Motorola and/or Verizon appear to be squashing pretty quickly (seriously, how much buck-passing goes on behind the scenes when there's a bug with this device?). One of the most interesting bug stories I've heard in a while has to do with the auto-focus bug. Apparently it just didn't work. The on-board camera would focus, then blur out again.
And then it suddenly started working properly for everyone. The first theory of why it would fix itself was that there was some film on the lens when a Droid was fresh from the factory, but it got cleared off with use somehow. Folks claimed that directly cleaning the lens with a soft cloth would fix the problem, and that much made sense, but other theories had the film getting cleaned by the action of sticking the Droid in your pocket? I wish I lived in a world where things got cleaner the more you used them!
The next theory was that some kind of stealth patch got pushed to the Droids without the owner's knowledge. Officials quickly denied this rumor. Probably good news that they can't (or at least, won't) patch your phone without your choosing to accept the patch.
Finally the real reason for the bug and fix was revealed, and maybe it's just because I write web scripts for a living, but I really got a kick out of this. The auto-focus routines somehow make use of a timestamp, and the bug was due to a rounding error. In a comment on an Engadget post, someone claiming to be Google engineer Dan Morrill said:
There's a rounding-error bug in the camera driver's autofocus routine (which uses a timestamp) that causes autofocus to behave poorly on a 24.5-day cycle. That is, it'll work for 24.5 days, then have poor performance for 24.5 days, then work again.
The 17th is the start of a new "works correctly" cycle, so the devices will be fine for a while. A permanent fix is in the works.
How crazy is that? Engadget says they tested this by backdating their Droid to November 11th and sure enough, the problem returned. I pity the engineer who had to uncover this one; talk about finding a needle in a haystack.
Anyway, let's hope they get this patched up before the current 'good' cycle ends.
By the way, I'm considering springing for a Droid; if any readers have one, I'd love to hear comments on it. Are you happy with your purchase?