I've had a lot of requests to talk about the Effective Power bug on iPhones - the one that
means that if you send this string via iMessage, it crashes the recipient's phone.
Now there are all sorts of theories out there; Apple hasn't confirmed any of them, and I
haven't seen any in-depth analysis of this: so this is a combination of the most plausible
explanations I can find -- Snopes, of course, has a pretty good rundown of the history -- and
my own testing on this one phone.
Clue number 1: It doesn't always work. This isn't like the old iPhone bug that'd fail
if it tried to render one particular bit of text anywhere in the operating system. This
is specific -- it has to appear in a banner notification that drops down, and it only
works sometimes. So that's a clue right there. What happens to text in banner notifications
that doesn't happen elsewhere in the messaging app? It's shortened. You see the first few
characters, the first few words, and then there's an ellipsis, a dot-dot-dot at the
end.
Immediately, that sets off some warning signs. 'Cos shortening text isn't quite as easy as
you might think.
Now Apple are smart. They're not cutting based on the number of bytes, the naive way of doing
it. If they did that, phones would be crashing regularly for anyone who used emoji. And they're
not cutting just on a fixed number of characters, either.
The iPhone works out how much text it can display, given the size of your screen, the
font size your notifications are displayed in, and the content of the message itself.
It cuts always on a character, not a bytes. Can it fit the full message in? Great, show
it all. Is it too big? Then how many letters can we fit?
So what else is strange about the message? Well, for folks in England, the US, and most
of the rest of the world, it includes Arabic text. And not just that: weird Arabic text
mixed with Devangari diacritics, those little marks that go above and below characters.
That's where the bug is. The words "effective power" and that letter on the end isn't special,
you can put any text there, as long as it pads out the message enough so that dot-dot-dot
lands somewhere in the middle of that jumble of Arabic characters.
So we can be fairly sure that the bug is in Arabic text handling. That is almost definite.
The iPhone tries to cut the weird Arabic word in half, fails for some reason, and somewhere
in there is a bug that causes it to crash.
This part we're fairly certain about. Here's my speculation: it seems logical that when
you remove a character by pressing backspace, the string of text will become shorter. But
in Arabic, that isn't always the case.
Arabic is a really interesting script: letters have multiple forms, and the one you use changes
depending on whether it's at the start, middle, or end of a word I've found some sequences
-- I don't know if they come up in everyday Arabic -- where adding a letter can turn one
wide character into two narrow ones that are shorter together. So if you cut half way through
that sequence, the resulting text would be wider than the one you started with.
So I reckon, that as the phone tries to work out how many letters it can fit on screen,
it finds itself with a combination of weird text, strange characters, and text that somehow
gets bigger when it removes some of it. That sounds to me like the kind of unexpected weirdness
that would cause a crash bug in code that is written mostly by people who write in English.
But what I do know? We'll have to wait and see if Apple actually release some sort of
post-mortem, or if they just say that it's fixed, as if by magic, in the next release.
[Translating these subtitles? Add your name here!]