WEBVTT
Kind: captions
Language: en-GB

1
00:00:00.160 --> 00:00:04.680
I've had a lot of requests to talk about the
Effective Power bug on iPhones - the one that

2
00:00:04.680 --> 00:00:09.599
means that if you send this string via iMessage,
it crashes the recipient's phone.

3
00:00:09.599 --> 00:00:14.929
Now there are all sorts of theories out there;
Apple hasn't confirmed any of them, and I

4
00:00:14.929 --> 00:00:19.010
haven't seen any in-depth analysis of this:
so this is a combination of the most plausible

5
00:00:19.010 --> 00:00:24.640
explanations I can find -- Snopes, of course,
has a pretty good rundown of the history -- and

6
00:00:24.640 --> 00:00:27.920
my own testing on this one phone.

7
00:00:27.920 --> 00:00:33.250
Clue number 1: It doesn't always work. This
isn't like the old iPhone bug that'd fail

8
00:00:33.250 --> 00:00:38.020
if it tried to render one particular bit of
text anywhere in the operating system. This

9
00:00:38.020 --> 00:00:42.710
is specific -- it has to appear in a banner
notification that drops down, and it only

10
00:00:42.710 --> 00:00:47.620
works sometimes. So that's a clue right there.
What happens to text in banner notifications

11
00:00:47.620 --> 00:00:52.750
that doesn't happen elsewhere in the messaging
app? It's shortened. You see the first few

12
00:00:52.750 --> 00:00:56.030
characters, the first few words, and then
there's an ellipsis, a dot-dot-dot at the

13
00:00:56.030 --> 00:00:57.030
end.

14
00:00:57.030 --> 00:01:02.309
Immediately, that sets off some warning signs.
'Cos shortening text isn't quite as easy as

15
00:01:02.309 --> 00:01:03.590
you might think.

16
00:01:03.590 --> 00:01:07.680
Now Apple are smart. They're not cutting based
on the number of bytes, the naive way of doing

17
00:01:07.680 --> 00:01:12.320
it. If they did that, phones would be crashing
regularly for anyone who used emoji. And they're

18
00:01:12.320 --> 00:01:15.940
not cutting just on a fixed number of characters,
either.

19
00:01:15.940 --> 00:01:20.400
The iPhone works out how much text it can
display, given the size of your screen, the

20
00:01:20.400 --> 00:01:25.200
font size your notifications are displayed
in, and the content of the message itself.

21
00:01:25.200 --> 00:01:30.370
It cuts always on a character, not a bytes.
Can it fit the full message in? Great, show

22
00:01:30.370 --> 00:01:34.760
it all. Is it too big? Then how many letters
can we fit?

23
00:01:34.760 --> 00:01:38.600
So what else is strange about the message?
Well, for folks in England, the US, and most

24
00:01:38.600 --> 00:01:43.030
of the rest of the world, it includes Arabic
text. And not just that: weird Arabic text

25
00:01:43.030 --> 00:01:48.200
mixed with Devangari diacritics, those little
marks that go above and below characters.

26
00:01:48.200 --> 00:01:52.180
That's where the bug is. The words "effective
power" and that letter on the end isn't special,

27
00:01:52.180 --> 00:01:57.560
you can put any text there, as long as it
pads out the message enough so that dot-dot-dot

28
00:01:57.560 --> 00:02:00.520
lands somewhere in the middle of that jumble
of Arabic characters.

29
00:02:00.520 --> 00:02:06.760
So we can be fairly sure that the bug is in
Arabic text handling. That is almost definite.

30
00:02:06.760 --> 00:02:12.190
The iPhone tries to cut the weird Arabic word
in half, fails for some reason, and somewhere

31
00:02:12.190 --> 00:02:14.390
in there is a bug that causes it to crash.

32
00:02:14.390 --> 00:02:20.170
This part we're fairly certain about. Here's
my speculation: it seems logical that when

33
00:02:20.170 --> 00:02:24.950
you remove a character by pressing backspace,
the string of text will become shorter. But

34
00:02:24.950 --> 00:02:27.950
in Arabic, that isn't always the case.

35
00:02:27.950 --> 00:02:33.440
Arabic is a really interesting script: letters
have multiple forms, and the one you use changes

36
00:02:33.440 --> 00:02:38.500
depending on whether it's at the start, middle,
or end of a word I've found some sequences

37
00:02:38.500 --> 00:02:43.000
-- I don't know if they come up in everyday
Arabic -- where adding a letter can turn one

38
00:02:43.000 --> 00:02:48.640
wide character into two narrow ones that are
shorter together. So if you cut half way through

39
00:02:48.640 --> 00:02:53.990
that sequence, the resulting text would be
wider than the one you started with.

40
00:02:53.990 --> 00:02:58.230
So I reckon, that as the phone tries to work
out how many letters it can fit on screen,

41
00:02:58.230 --> 00:03:03.990
it finds itself with a combination of weird
text, strange characters, and text that somehow

42
00:03:03.990 --> 00:03:09.990
gets bigger when it removes some of it. That
sounds to me like the kind of unexpected weirdness

43
00:03:09.990 --> 00:03:15.290
that would cause a crash bug in code that
is written mostly by people who write in English.

44
00:03:15.290 --> 00:03:18.740
But what I do know? We'll have to wait and
see if Apple actually release some sort of

45
00:03:18.740 --> 00:03:22.599
post-mortem, or if they just say that it's
fixed, as if by magic, in the next release.

46
00:03:23.680 --> 00:03:25.680
[Translating these subtitles? Add your name here!]

