Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Bizarre Droid Auto-Focus Bug Revealed

timothy posted more than 4 years ago | from the each-droid-has-a-moth-enclosed dept.

Bug 275

itwbennett writes "Pity the poor engineer who had to find this one. One of the more interesting of the handful of bugs that have appeared since the launch of Verizon's Droid smartphone has to do with the on-board camera's auto-focus. Apparently it just didn't work. And then suddenly it did. Naturally, this off-again, on-again made the theories fly. But the real reason for the bug was revealed in a comment on an Engadget post by someone claiming to be Google engineer Dan Morrill: '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,' said Morrill. '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.'"

cancel ×

275 comments

Sorry! There are no comments related to the filter you selected.

When Signed/Unsigned Strikes (5, Informative)

eldavojohn (898314) | more than 4 years ago | (#30147842)

It's all over the comments on the engadget page but since 2^31 milliseconds is about 24.5 days, it's highly probably we're dealing with a very classic not so funny sign extension bug here [wikipedia.org] . So if I may presume the real problem, it's that autofocusing depends on catching timestamps from the system to know how long it's been since the last sampling in order to adjust the lens and check for accuracy. It's casting this to a signed 32 bit variable which means that during the 24.5 days it is miscast to a negative number, thus breaking the algorithm when it measures time deltas and causing it to mis focus before snapping the picture.

The patch is simple, make that signed int something like an unsigned long or truncate it properly. Hopefully we're not waiting long.

"Not waiting long"? (5, Funny)

Singularity42 (1658297) | more than 4 years ago | (#30147956)

I've been waiting a long long time for standardization of integer types.

Re:When Signed/Unsigned Strikes (5, Funny)

Whalou (721698) | more than 4 years ago | (#30148026)

Hopefully we're not waiting long.

We're waiting unsigned long.

Re:When Signed/Unsigned Strikes (5, Funny)

rsborg (111459) | more than 4 years ago | (#30148098)

Hopefully we're not waiting long.

We're waiting unsigned long.

As long as it's not a justin long... he's already signed.

Re:When Signed/Unsigned Strikes (0)

Anonymous Coward | more than 4 years ago | (#30148502)

Of course he's signed, we can only unsign him then.

Re:When Signed/Unsigned Strikes (1, Informative)

Zero__Kelvin (151819) | more than 4 years ago | (#30148468)

Oh, yeah! Well we've been waiting an unsigned long long [gnu.org] time!

Re:When Signed/Unsigned Strikes (0, Troll)

Anonymous Coward | more than 4 years ago | (#30148506)

Wish I had mod points, this entire thread is one of the funniest ever on /.

Re:When Signed/Unsigned Strikes (-1, Flamebait)

ZeRu (1486391) | more than 4 years ago | (#30148880)

Sorry to be a grammar nazi, but you should've written "Wish I had mod points, this entire thread is one of the funniest ever on /.." - the first dot is a dot in "slashdot" and the second dot ends the sentence properly.

Or you could've constructed your sentence differently if you don't like consecutive dots, like "Wish I had mod points, this is one of the funniest threads on /. ever.".

Re:When Signed/Unsigned Strikes (1)

sootman (158191) | more than 4 years ago | (#30148104)

I was just about to post, asking "Why does the autofocus need to know what time it is?" Thanks for the info.

Re:When Signed/Unsigned Strikes (0)

Anonymous Coward | more than 4 years ago | (#30148486)

It is still very shortsighted to try to truncate a 4-byte into 2-byte before doing computation without knowing what you are doing. Heck, in most cases, those 2 extra bytes will NOT result in any reduction of performance of the device and it would be fool-proof. But oh well, optimize memory usage, don't test and then OOPS!

There are people doing more stupid things anyway, like,

    void *dst_ptr = (void*)(int)(src_ptr);

or,

    if( "test" == "" )

etc. etc. etc..

Re:When Signed/Unsigned Strikes (5, Funny)

Anonymous Coward | more than 4 years ago | (#30148134)

Waiting long? Hopefully we're not waiting double!

Re:When Signed/Unsigned Strikes (-1, Flamebait)

SerpentMage (13390) | more than 4 years ago | (#30148142)

This is what I hate about "smart" programmers at Google. They come up with the cleverest algo's, and they demand from their tests the ability to develop these algo's. Then they release something and along comes this sort of bug that simply does not need to happen!

So why does it happen, because their programmers are "clever"...

And the worst part this is the sort of bug that consumers will laugh their head off about. The reason why Apple sells so well is not because they are rocket scientists, but because when people use their products people say, "hey this is pretty cool..." Whereas techie's say, "hey this is pretty cool..." WRONG FOCUS...

Re:When Signed/Unsigned Strikes (4, Funny)

nhytefall (1415959) | more than 4 years ago | (#30148258)

WRONG FOCUS...

Sounds like you are on the wrong end of the 24.5 day cycle :)

Re:When Signed/Unsigned Strikes (4, Informative)

Anonymous Coward | more than 4 years ago | (#30148562)

The support for the camera in the Droid was developed by Motorolla, not Google.

Re:When Signed/Unsigned Strikes (1)

osu-neko (2604) | more than 4 years ago | (#30148574)

Yeah... only "clever" programming causes bugs. /eyeroll

Re:When Signed/Unsigned Strikes (4, Interesting)

msauve (701917) | more than 4 years ago | (#30148160)

Probably not measuring the times per sampling, but measuring the time the focus mechanism is moving. To keep costs down, I suspect the mechanism has no feedback mechanism, so to focus you move one way for a set amount of time (guaranteed to hit a mechanical stop). Then the software might keep track of focus position by how long it's driven the lens in one direction or the other starting at that known position (oops, I moved "out" 100 ms, but overshoot, so now I'll move "in" 50 ms). Or it might be that the bug makes it so the lens never gets properly reset to it's starting position.

Re:When Signed/Unsigned Strikes (1)

Jeff DeMaagd (2015) | more than 4 years ago | (#30148200)

What I don't get is why a time stamp is needed to focus. Most cameras don't seem to need to know what time it is in order to do that.

Re:When Signed/Unsigned Strikes (5, Informative)

BitZtream (692029) | more than 4 years ago | (#30148396)

Most cameras do, they just don't use a RTC value to do so.

You don't want it continually focusing, you want it to focus then wait a bit otherwise it'll bounce all over the place. You check the distance, wait a moment, and check again, is it close to the same? If so use that as your focal length, other wise you'll probably end up never in focus cause you'll be using all the various raw values given to you by the sensor. This is likely input averaging to get a smooth value and throw out bad samples.

Take a look at the raw input values provided by most game controllers, try to hold an analog stick in one spot and not get jitter in the raw values, unless the device itself is averaging you won't got a solid result. Plug a xbox controller into your PC and use the Windows control panel (if you're using windows, never plugged a joystick into a unix box myself) to see how jumpy it is.

A sensor measuring the environment outside, in someones hand is going to bounce around like a mad man, so it has to be smoothed out somehow.

Re:When Signed/Unsigned Strikes (1)

Brian Gordon (987471) | more than 4 years ago | (#30148210)

Sounds like something to add to the jargon file [catb.org] :)

Re:When Signed/Unsigned Strikes (1)

BitZtream (692029) | more than 4 years ago | (#30148306)

Seems like having a system timer trigger the auto focus update event would be a far better method of dealing with it rather than polling to check if its time to update again in some sort of loop.

Android DOES have timers usable by drivers doesn't it? Requiring drivers to poll would be very shitty indeed, especially on devices with lower CPU power..

Re:When Signed/Unsigned Strikes (1)

AaronW (33736) | more than 4 years ago | (#30148460)

When I first read about this that was the first thing that came into my mind as well. Elsewhere I found another post where a permanent fix should be available on December 11th, which is the day that the bug will re-appear.

Re:When Signed/Unsigned Strikes (3, Informative)

noidentity (188756) | more than 4 years ago | (#30148578)

it's highly probably we're dealing with a very classic not so funny sign extension bug here [...] It's casting this to a signed 32 bit variable which means that during the 24.5 days it is miscast to a negative number

This involves truncation, not sign-extension, actually. Sign-extension occurs when widening a value, not narrowing it. A value outside the range representable by a two's complement 32-bit integer is being cast to one, and apparently this platform simply truncates to 32 bits and treats the highest bit as having the value -2^31, rather than 2^31 as it had in the input value. This isn't the only way to handle such a situation; common alternatives are raising an exception or saturating (i.e. anything >= 2^31 converts to 2^31-1, and anything less than -2^31 converts to -2^31).

Re:When Signed/Unsigned Strikes (1)

DeadCatX2 (950953) | more than 4 years ago | (#30148848)

The engadget poster mentions a rounding bug, not a sign-extension bug. (and for it to be a sign-extension bug, they would need to be extending from 32-bit timestamps to 64-bit timestamps).

That doesn't mean it's not the 2^31 ms ~= 24.5 days. It could be that the platform "rounds toward zero", and the developers anticipated that to mean "round down" in the context of numbers that are always positive...and when the numbers become negative, it rounds up instead, and screws them.

The best theory I've heard so far was that a timestamp is being used to figure out where to move the lens. Other than that, perhaps it's being used in some GUID-like fashion and the rounding causes a violation of the uniqueness requirement?

Re:When Signed/Unsigned Strikes (1)

pedantic bore (740196) | more than 4 years ago | (#30148874)

Well, if it's written in Java like the rest of Android, it could be a bit more work. T'aint no "unsigned" in Java.

Does it use an Intel CPU? (1, Funny)

Jailbrekr (73837) | more than 4 years ago | (#30147864)

Just curious.....

Re:Does it use an Intel CPU? (1)

alvinrod (889928) | more than 4 years ago | (#30148014)

No, it uses an ARM Cortex A8 according to Wikipedia [wikipedia.org] . As another poster has pointed out, this probably is due to a software bug.

Re:Does it use an Intel CPU? (-1, Flamebait)

Anonymous Coward | more than 4 years ago | (#30148040)

WHOOOSH!

Re:Does it use an Intel CPU? (1)

Sebastopol (189276) | more than 4 years ago | (#30148130)

wow, almost 15 years later and they still get sh*t for fdiv. of course, this joke is so stale we'll probably hear it on jay leno tonight.

Re:Does it use an Intel CPU? (4, Funny)

Bakkster (1529253) | more than 4 years ago | (#30148512)

Read and be enlightened [wikipedia.org] .

Of course my favorite joke about the matter:
Q: "How did Intel decide to name the 586 processor?"
A: "They took 486, added 100, and came up with 585.999999999999824"

Auto-Focus (5, Funny)

kellyb9 (954229) | more than 4 years ago | (#30147870)

... Droid doesn't

Re:Auto-Focus (0)

Anonymous Coward | more than 4 years ago | (#30147910)

I salute you.

Re:Auto-Focus (1, Funny)

Anonymous Coward | more than 4 years ago | (#30147944)

Erm. Actually, Droid DOES. Just not all the time... I suppose that's not as funny, though, so may I recommend:

"Sporadically bugs: iDoesn't. Droid does."

Re:Auto-Focus (1)

m.ducharme (1082683) | more than 4 years ago | (#30148256)

Failed, you have; to be funny.

Re:Auto-Focus (5, Funny)

josteos (455905) | more than 4 years ago | (#30147990)

... Droid might

Schrodinger's Auto-Focus (4, Funny)

Dareth (47614) | more than 4 years ago | (#30148322)

It is necessary to have some radioactive elements in your phone for it to focus.

PS, it may or may not also kill cats!

Re:Auto-Focus (2, Funny)

hippo_of_knowledge (445662) | more than 4 years ago | (#30148356)

I would have expected a Schrodinger's camera joke by now. Step up your game, Slashdot.

Re:Auto-Focus (1)

hippo_of_knowledge (445662) | more than 4 years ago | (#30148376)

And I've been beaten like a rented mule. Bravo.

In case you were worried.... (5, Funny)

EdIII (1114411) | more than 4 years ago | (#30147894)

Spring Break, the biggest part of it, occurs within a working cycle.

Re:In case you were worried.... (1, Funny)

Anonymous Coward | more than 4 years ago | (#30147984)

But does is coincide with the monthly cycle of the subjects likely to be photographed by these Droids? ;-)

A timestamping overflow error (1, Insightful)

idontgno (624372) | more than 4 years ago | (#30147926)

hoses up the camera autofocus?

Is this Slashdot, or The Daily WTF [thedailywtf.com] ?

Re:A timestamping overflow error (0)

clone53421 (1310749) | more than 4 years ago | (#30148042)

Same reaction I had.

Why on earth does the autofocus routine care what the date is?

Re:A timestamping overflow error (1)

Yamata no Orochi (1626135) | more than 4 years ago | (#30148088)

Why on earth does the autofocus routine care what the date is?

Herf derp, at least read the summary.

Re:A timestamping overflow error (1)

clone53421 (1310749) | more than 4 years ago | (#30148192)

I did. It explained that the autofocus routine needed the timestamp. It failed to explain why it should need it.

Re:A timestamping overflow error (1)

clone53421 (1310749) | more than 4 years ago | (#30148198)

And yes, I saw that this question was answered in the first post.

Makes sense. But it didn't, until that guy explained it.

Re:A timestamping overflow error (0)

Anonymous Coward | more than 4 years ago | (#30148548)

Time delta since last auto-focus.

Re:A timestamping overflow error (0)

Anonymous Coward | more than 4 years ago | (#30148114)

(as another poster has pointed out) it will need to know how long it has been since the algorithm was run. Any periodic process will indirectly need some means of telling time.

Re:A timestamping overflow error (0)

Anonymous Coward | more than 4 years ago | (#30148122)

Because it doesn't autofocus constantly. The routine is fired every few milliseconds. If the timestamp since the last autofocus has been truncated, then IsItTimeToAutoFocusYet() isn't going to be triggered on time.

Re:A timestamping overflow error (0)

Anonymous Coward | more than 4 years ago | (#30148140)

Congratulations. You are among the few (but growing in number) who not only can't RTFA, but lack the attention span or comprehension skills to read the summary itself.

MTV has a network for you.

Re:A timestamping overflow error (5, Funny)

ground.zero.612 (1563557) | more than 4 years ago | (#30148330)

Congratulations. You are among the few (but growing in number) who not only can't RTFA, but lack the attention span or comprehension skills to read the summary itself.

MTV has a network for you.

Is that network called MTV?

Re:A timestamping overflow error (0)

Anonymous Coward | more than 4 years ago | (#30148388)

Oh yeah?

You feckin' asswhit!

Re:A timestamping overflow error (1)

mea37 (1201159) | more than 4 years ago | (#30148372)

Depends what method of autofocus is used. I haven't been able to find any reference to which type of AF it uses, and I guess that isn't surprising as most people using a phone as a camera probably don't know or care much about the differences between AF methods...

Re:A timestamping overflow error (1)

clone53421 (1310749) | more than 4 years ago | (#30148534)

The first guy to comment made hit upon the most likely explanation, probably... the autofocus re-adjusts itself every n milliseconds, and if the timestamp is interpreted as a signed value then 50% of the time it will yield incorrect results when it calculates the interval between autofocuses.

Didn't occur to me until I read his comment, but it makes sense now.

Alleged... (5, Funny)

Anonymous Coward | more than 4 years ago | (#30147938)

by someone claiming to be Google engineer Dan Morrill

Yeah, it could also be one of those lame Dan Morrill impersonators who solve perplexing engineering/programming issues, then post the solution under his name. MAN that's annoying..

iFocus ... NOT (4, Funny)

OzPeter (195038) | more than 4 years ago | (#30147980)

This is definitely NOT the Droid you are looking for

Re:iFocus ... NOT (1)

Zero__Kelvin (151819) | more than 4 years ago | (#30148616)

Considering that the bug will likely be fixed later today and pushed to the customer shortly thereafter, whereas it would probably never have been discovered so quickly on the iPhone due to it's closed source nature, I accept your humble apology.

Simple solution (3, Funny)

Anonymous Coward | more than 4 years ago | (#30148020)

Just buy two with opposing date stamps.

Restraining Bolt (0)

Anonymous Coward | more than 4 years ago | (#30148028)

They just need to take the restraining bolt off! Luke Skywalker had the same problem!

Just one more thing... (0)

Anonymous Coward | more than 4 years ago | (#30148030)

...that iDon't

Time-releated bugs (5, Interesting)

Iphtashu Fitz (263795) | more than 4 years ago | (#30148054)

15+ years ago I had to debug some code in a report printing app for OS/2 (remember that OS?). The bug would cause the app to crash when a report was printed out. But the bug would only happen on certain days. Certain days in September. Only on Wednesdays in September. Only when it was a Wednesday in September after the 9th.

The bug? The original programmer had tried to optimize memory usage as much as possible and was off by a count of one. With "September" being the longest month spelled out, "Wednesday" the longest day spelled out, and a 2 digit date, the header that the program put together to send to the printer would overflow its buffer by one character.

Re:Time-releated bugs (1)

FishOuttaWater (1163787) | more than 4 years ago | (#30148252)

Simply classic. ...but think of all the bytes he saved!

Re:Time-releated bugs (4, Funny)

qoncept (599709) | more than 4 years ago | (#30148326)

I got a "bug report" that our Oracle Forms app would give an undefined error message after you "type in a first name, push tab twice, and click save 17 times." I didn't debug it, but I did offer a workaround.

I also had a bug report for when you tried to add a prerequisite that didn't exist to a training task (the system tracked flight Air Force crew training and experience), an error would pop up that said "All this time and it still doesn't work..." In that case, apparently debugging was as far as anyone ever got.

Re:Time-releated bugs (3, Interesting)

amicusNYCL (1538833) | more than 4 years ago | (#30148892)

I also had a bug report for when you tried to add a prerequisite that didn't exist to a training task (the system tracked flight Air Force crew training and experience), an error would pop up that said "All this time and it still doesn't work..." In that case, apparently debugging was as far as anyone ever got.

Please tell me these aren't the same developers who wrote the Air Force's current LMS. If so, that would explain a lot. I actually submitted a bug report to the Air Force once about their LMS complete with the section of code (Javascript) that was incorrect, an explanation about why it was incorrect, the corrected code, and an explanation about why the changes fixed the issue. They responded and said that they were "reluctant" to agree with me, and never made the changes.

Oh yeah, the "bug fix" was the difference between this:

score = parseInt(score);

and this:

score = parseInt(score, 10);
if (isNaN(score)) score = 0;

Not printing on tuesdays. (2, Informative)

gehrehmee (16338) | more than 4 years ago | (#30148754)

There was a wonderful bug in ubuntu where it wouldn't print on tuesdays. It would generate a postscript file, which includes the date, but a faulty entry for file-type detection caused postscript on tuesday to be interpreted as some kind of erlang file... which obviously didn't print very well :)

http://bugs.launchpad.net/ubuntu/+source/file/+bug/248619 [launchpad.net]

IIRC, this is the same sort of bug (4, Insightful)

wiredog (43288) | more than 4 years ago | (#30148060)

that caused Windows 95 to require a reboot in about the same timeframe.

Re:IIRC, this is the same sort of bug (5, Funny)

NoYob (1630681) | more than 4 years ago | (#30148152)

Huh. I ended up giving my Win 95 box a woman's name and just chalked it up to "that time of the month."

I didn't realize there was a real software reason for it.

I wonder if there's a way to do the same for my wife - you know, fix a software bug.

Gotta run she's home!

Re:IIRC, this is the same sort of bug (1)

3waygeek (58990) | more than 4 years ago | (#30148340)

Just get her on Seasonale [drugs.com] or an equivalent.

Re:IIRC, this is the same sort of bug (0)

Anonymous Coward | more than 4 years ago | (#30148758)

I highly recommend Mirena [mirena-us.com] , but then what do I know I've never even left my basement.

Re:IIRC, this is the same sort of bug (4, Funny)

kalirion (728907) | more than 4 years ago | (#30148382)

Same timeframe? You could actually keep a Win 95 system up and running for 24 days?

Re:IIRC, this is the same sort of bug (4, Informative)

Mr.Mustard (58247) | more than 4 years ago | (#30148482)

It was actually 49.7 days [microsoft.com] .

Re:IIRC, this is the same sort of bug (2, Funny)

Zero__Kelvin (151819) | more than 4 years ago | (#30148764)

I don't believe that one was ever seen in the wild, since Windows 95 also had several bugs that caused it to require a reboot approximately every 24.5 minutes ;-)

Wow (3, Funny)

QuoteMstr (55051) | more than 4 years ago | (#30148066)

Considering that a lunar cycle is 29.5 days long, we've actually found a bug that depends (approximately) on the phase of the moon!

Re:Wow (1)

wanerious (712877) | more than 4 years ago | (#30148120)

That's because causation generates correlation. :)

New Moon? (0)

Anonymous Coward | more than 4 years ago | (#30148194)

I am so sick of all this Twilight crap...

Re:New Moon? (1)

QuoteMstr (55051) | more than 4 years ago | (#30148436)

Huh? Joking that a bug depends on the phase of the moon is old as time itself [catb.org] .

A permanent fix (2, Funny)

MisterZimbu (302338) | more than 4 years ago | (#30148170)

"'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,' said Morrill."

Cool! The device will later be fixed to properly behave poorly only every 24.45 days!

Rounding error? (0, Troll)

geekoid (135745) | more than 4 years ago | (#30148174)

In excusable. The industry is too mature for that type of shit.

Re:Rounding error? (4, Funny)

Anonymous Coward | more than 4 years ago | (#30148226)

In excusable. The industry is too mature for that type of shit.

Spelling error? Inexcusable. The English language is too mature for that type of shit.

(In case you missed it, your argument has just as much validity in the real world due to differences in people.)

Re:Rounding error? (0)

Anonymous Coward | more than 4 years ago | (#30148318)

Didn't you know the unwritten rule of Slashdot? It's only cool if you say this kind of thing about Microsoft.

Re:Rounding error? (0)

Anonymous Coward | more than 4 years ago | (#30148634)

Inside of what? Or do you mean inexcusable as one word?

Typos happen, bugs happen.

Life's to short to waste on you.

Verizon's Droid? (0)

Anonymous Coward | more than 4 years ago | (#30148232)

I thought it was Motorola's Droid, but I guess because Verizon bundles it with contracts, it's "theirs"?

Re:Verizon's Droid? (1)

Scyber (539694) | more than 4 years ago | (#30148504)

IIRC, Verizon is the one licensing the name Droid. In other countries where the phone is going to be sold it is known as the Motorola Milestone. So while technically the phone is Motorola's, when referring to it with the Droid name, it is specifically referencing the Verizon version of the phone.

in Action... (1)

TrippTDF (513419) | more than 4 years ago | (#30148236)

I can verify this- I got a Droid on launch day, and one thing that drove me nuts was how long it took a barcode scanning app to focus and accquire the barcode... i just tried it again after writing off that ability, and sure enough, the time to focus is much, much shorter now.

Will they remember at review/raise time? (1)

dltaylor (7510) | more than 4 years ago | (#30148254)

"Tasks accomplished: fixed timestamp rounding error in autofocus subroutine"

vs.

"Tasks accomplished: designed/implemented autofocus subroutine"

Be symphatetic... (0)

Anonymous Coward | more than 4 years ago | (#30148302)

... come on... phones are like woman... they just have those bad days!

iPhone 3G/3GS GPS bug (5, Interesting)

acidblood (247709) | more than 4 years ago | (#30148314)

Since we're talking about phone bugs, here's one I had to fight with for a while...

Lots of users are having problems with the GPS functionality on the iPhone 3G/3GS (see e.g. here [apple.com] ). No apparent pattern there, but in Brazil, lots of users from one specific carrier were having GPS problems, and the beginning of these problems coincided with the start of Daylight Savings Time in Brazil. My iPhone, as well as my girlfriend's, are with this carrier and were experiencing the problem. Those with unlocked phones report trying other carriers' SIM cards and had GPS working again, but once you popped back the problematic carrier's SIM card, the GPS was dead again.

This nearly drove me nuts as I paid an obscene amount of money for the TomTom app and couldn't get it to work, so keeping up with the engineer spirit, I tried to debug the problem myself. I observed an interesting fact: there's a Clock app on the iPhone with a World Clock pane, and if I added a clock from any time zone, including my own, it was off by one hour. However the iPhone's main clock, shown on the top of the screen, was showing the right time. Eventually I discovered that if I restored my phone as a brand new phone (not restoring from backup) the GPS would work fine and world clocks would be fine... until you reboot the phone. After rebooting, the GPS is gone again and the world clock is off by one hour again.

Now you might ask what the time has to do with GPS. A lot, it turns out. GPS works by triangulating your distance from the satellites in the GPS constellation, which depends on knowing the exact position of the satellites. Since their orbits are corrected every so often, you must rely on so-called ephemeris data from each satellite, which is the required information to compute fairly exact orbits, and is updated fairly often (Wikipedia says GPS receivers should update ephemeris data every 4 hours). Originally this data is broadcast by the satellites themselves in their navigation message, at an awfully slow rate of 50 bits/s. You read it right, bits, not bytes or KB or MB, that's bits. As the navigation message is 1500 bits long, it takes at least 30 seconds to download it, which is about the time most standalone GPS receivers take to get a fix from a cold start (i.e. with stale ephemeris data). To work around this delay, most phones with GPS use the assisted-GPS variety, which downloads ephemeris data from a faster channel such as the cellular network. My theory is that some WTF-worthy excuse for an engineer at the carrier decided that, rather than doing time zone updates the right way, by updating configuration files to point to the new time zone, he'd just rather adjust the clock forward by one hour. The GPS chipset probably works with time zone neutral clocks so it asks for (say) UTC time and gets it off by one hour, and then computes the satellite orbits as though it were one hour later than it actually is. Obviously this means the triangulation computations go horribly wrong and rather than reporting something absurd, the chipset just pretends it couldn't get a fix.

It took a lot of complaining from a lot of people (to the carrier and to the government agencies responsible for telecommunications), but the carrier finally fixed the problem. However, it was a nightmare trying to deal with clueless customer support representatives who didn't try in the least to help (and probably were thinking all along `what does this wacko think GPS has to do with DST?'), just blindly suggesting that we restore the phone, or even try to uninstall the built-in Maps app, or blaming it on Apple and saying they weren't responsible -- and never mind that unlocked phones with SIM cards from other carriers worked fine, and that the iPhone support situation is unique in Brazil as Apple outsourced support to the carriers themselves. In the end, the customer support WTFs would be worth another post of its own, at least twice the size of this one.

But my faith in humanity is restored as someone, somewhere within the carrier, actually listened to these detailed explanations of the problem and how to fix it, and actually acted on it. I honestly thought it would take a class action lawsuit to fix it.

Re:iPhone 3G/3GS GPS bug (3, Insightful)

Anonymous Coward | more than 4 years ago | (#30148552)

GPS works by trilaturation [wikipedia.org] , not triangulation... just sayin'

Kudos to Google for being so open about the bug (4, Insightful)

cryfreedomlove (929828) | more than 4 years ago | (#30148430)

It is gratifying for Google to be so open about the fact that it is a bug, the details of the bug, and a promise to fix it. Most consumer electronics companies are much more cagey about this sort of thing. I suspect Google will win some important trust because they are treating their customers like adults.

So...only 24 days of testing? (1)

the_Librarian (17089) | more than 4 years ago | (#30148448)

Given that this bug made it out into the wild, does this mean that the Android team only did 24 days of beta testing of the product? Or that they thought they would release a patch within 24 days?

Not particularly smart or impressive, either way.

So they tested it for less than 24.5 hours ... (0)

VitaminB52 (550802) | more than 4 years ago | (#30148492)

... because if they had tested it for more than 24.5 hours then they would have found the bug immediately.

Re:So they tested it for less than 24.5 hours ... (1)

VitaminB52 (550802) | more than 4 years ago | (#30148526)

oops - days, not hours. My bad :-(

Re:So they tested it for less than 24.5 hours ... (2, Insightful)

osu-neko (2604) | more than 4 years ago | (#30148742)

No, they would have discovered their are focus problems. They would not necessarily know the cause. They may even implement a fix or two, and at some point, the problem went away, so they marked the bug "fixed". They could easily have been testing for 90 days or more without discovering the exact nature of the bug, with multiple false positives indicating that it had been fixed.

Bizarre Bug??... exploit it! (-1, Offtopic)

FunkyELF (609131) | more than 4 years ago | (#30148528)

.... and get r00t.
Then install Cyanogen to get wired tethering and give the middle finger to Verizon.

iDon't Focus properly (1)

93 Escort Wagon (326346) | more than 4 years ago | (#30148734)

... but the iPhone does.

I must have the same bug... (4, Funny)

Gavin Scott (15916) | more than 4 years ago | (#30148738)

After about 42 years my auto-focus suddenly stopped working as well.

You think if I live to 84 or so it will suddenly get better again?

I sure hope there's a patch...

G.

Re:I must have the same bug... (5, Funny)

bennomatic (691188) | more than 4 years ago | (#30148774)

Unfortunately, applying a patch causes the loss of depth perception.

Sounds like my wife. (0)

Anonymous Coward | more than 4 years ago | (#30148762)

Though she's on a 28 day cycle.

BUG! That was supposed to be 29.5 not 24.5 (1)

Tired and Emotional (750842) | more than 4 years ago | (#30148776)

Half the focus group users did not want in-focus photos taken of them for a few days each month. Some idiot male programmer clearly mistyped the constant.

Sounds to me... (1)

DarthVain (724186) | more than 4 years ago | (#30148794)

...like a bad motivator.

I was suspecting something like... (1)

Hymer (856453) | more than 4 years ago | (#30148816)

...camera will only focus on breast/nippels due to testing only done on this item.
...and it shows up as a simple rounding bug, how disapointing.

Bigger bugs afoot... (5, Interesting)

jddj (1085169) | more than 4 years ago | (#30148826)

Honestly, autofocus on the just-so-so camera is the last of my worries:

  • Can't sync with Outlook (the phone doesn't have on-device encryption that would satisfy Exchange policies). Only calendar works, not contacts or email.
  • Can't hands-free voice dial (have to touch the phone to unlock it, touch to turn on voice dial, speak your choice, touch the choice from the menu of likely suspected contacts).
  • Locked phone's touch-screen comes on in pocket when answering with a headset, causing much mute/disconnect/speakerphone hilarity.
  • Turn-by-turn navigation is way off, literally by miles. Wrong 4 of 4 tries so far (in metro Atlanta and DC).
  • Immature bluetooth won't support HCI (portable bluetooth keyboards).
  • Rotating the phone after checking email checkboxes unchecks everything
  • Can't order contact list by last name (fixed in first name order)
  • Can't charge it with ANYTHING but the included AC adaptor (over-draws USB power from my old USB car and wall chargers)

Really, fix the camera sometime down the line. But make the phone dial hands-free. Make email work. Make the navigation something other than worthless. Make "lock the screen" really lock the screen.

Someone at Google should use one of their own phones for a while and see how (s)he likes it.

It's a wonderfully powerful platform, but clearly not as well-thought-out or fluid to work as iPhone/iPod Touch

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?