Posts Tagged

Bugs

The iPhone’s Hard Reset Bug

Elizabeth Uncategorized November 22, 2021

Apple

Apple’s proprietary software is notoriously difficult to make malware for. It’s not that it’s impossible (so don’t go cavorting around sketchy sites without antivirus just because you have an iMac) it’s just tougher than Windows, and because Windows is more common, Windows gets the bulk of the viruses.

However, glitches and bugs are a different story entirely! Bugs are plenty common under the hood of the iPhone – some user inconvenience was deliberately introduced into older phones, allegedly in an attempt to make users upgrade. Apple paid out a pretty penny in lawsuits for that one.

Even on new ones, dropping the phone could make it seize up. Leaving it on too long? Seize up. Apps could crash so hard that the only way to get the screen to respond to inputs again was with a hard reboot. The iPhone isn’t flawless or impossible to break, it’s just hardier on the virus front. With that caveat, sometimes glitches can be used like viruses to disrupt normal use of the phone. The text glitch that forced hard reboots of the phone is one example that Apple’s R&D department won’t soon forget.

But how did it happen?

Unicode

Unicode, which Apple switched to in iOS 5, or somewhere around the release of iPhones 3 and 4, is very widely used. Unicode is a character library meant to homogenize the text you see online. It’s not the only one, but it’s one of the biggest! Unicode assigns a unique numerical value to each character in its library (letters, numbers, punctuation signs, etc.). The device can then show you, the user, the character behind the numbers when it receives that data from the other side.

You’ll notice when Unicode is out of date. If you have an older phone, sometimes you’ll see blank boxes where there should be a character or emoji, but your device doesn’t ‘know’ what character is supposed to correspond to the value it’s being given, so it shows a blank box instead. Sometimes the OS can fudge it a little and substitute characters that aren’t necessarily part of the Unicode (see Apple’s devil emoji vs. Android’s in texts) but generally the OS has to be able to read the character to represent it.

That aside, when it comes to breadth, Unicode is pretty impressive: even if it doesn’t have hieroglyphs or every new emoji, Unicode supports an incredible array of languages by default. Russian characters, Greek characters, Arabic, Latin, Cherokee, Mongolian, Chinese, Japanese, etc. are all represented in the Unicode library.

The Text

When you think of it that way – when you picture how many thousands of different characters and combinations you can create with the entire Unicode library at your fingertips – it’s not so surprising that someone found something that caused problems. In 2015, a string of English and Arabic letters combined with a couple of symbols could brick up the Apple iPhone so badly that the user had to reboot. One version of this used the iMessage notification to do so, so the only way to prevent it was to disable the notification from previewing the text on-screen – unfortunately, it also meant that if the phone tried to show the message again after rebooting, it could get caught in a death loop and need a reset unless the other user sent another text to replace the freezy one in the message previews. Apple did not introduce an update to fix the issue for weeks. Whether that was because they couldn’t or because they couldn’t replicate the issue on their own devices (it didn’t happen to every iPhone) is hard to say, but the text continued to circulate and collapse the iMessage app with little consequence.

Others

Not every iPhone was affected by this particular text. iPhones with iOS 7 or above didn’t shut down upon receiving the text, and neither did 5 or below. Androids seemed to be completely unaffected, and of course turning off notifications prevented it from happening to devices in the danger zone. That was for the Arabic/English/symbol text discovered in 2015… and people soon discovered it was not the only text capable of tanking a phone.

Apple patched the discovered ones once they realized it was an OS issue (and a serious one) but that didn’t stop people from finding new ones to send to their friends, restarting the cycle of ‘Discovered -> It’s Not Serious -> Oh No It IS Serious -> Don’t Worry We Patched It’ from Apple every time, a cycle that sometimes took weeks or months. Again, Unicode is absolutely massive, so there was no way to test every combo of characters before launch. One bug used Sindhi characters, another used Telugu to crash devices. In all cases (or everything searchable) it wasn’t the messaging app itself, but the notification – something about having to show the characters in the little notification box is what caused the iOS to flip out, further complicating fixes. Users could disable the notifications, but that would make iPhones slightly less user-friendly than they were, and with Android devices creeping up on them, that was a bad look.

Even worse, The Verge reported in 2018 that some of these bugs could cause MacOS to flip out upon receipt, as well as more recently updated iOS devices. While the original one was dealt with in 2015, echoes of it continued to wreak havoc on targeted iPhone users for years to come. It seems as though the latest phones don’t struggle with Unicode… so hopefully, the issue won’t be making another appearance.

Sources:

https://www.inputmag.com/tech/if-you-receive-this-message-your-iphone-will-crash

https://unicode.org/faq/basic_q.html

https://www.npr.org/2020/11/18/936268845/apple-agrees-to-pay-113-million-to-settle-batterygate-case-over-iphone-slowdowns

https://www.theverge.com/2018/2/15/17015654/apple-iphone-crash-ios-11-bug-imessage

First Computer ‘Bug’

Behold, a common moth. It died stuck in the newest Harvard Mark II after being caught in a relay. But there’s some misconception over whether or not this is why errors are called ‘bugs’, and the rest of the story’s sometimes forgotten. Here’s a brief overview – there’s links at the end for more information on each section, if you’d like to know more!

 

Source of the Term

 

The terms ‘bug’ and ‘debugging’ were already in use in regards to computers and similar machines. This moth incident wasn’t the origin of the term, but it’s a funny side note that an actual, literal bug got into the machine. It would be like actually ‘dropping the ball’ during a game.

The term ‘bug’ has been in use for machines since Edison, comes from Welsh, and used to mean irritating or vexing things. Over time, machinery problems got pretty freaking annoying, and insects, spiders, and other ‘bug’ family members bit and stung people. As English formed, the word was incorporated into general use, until it eventually came to mean three things to English speakers: little crawly things, computer problems, and something being persistent and annoying.

Bugbears, someone bugging you, something being buggy, etc. all come from this!

 

Grace Hopper

 

Grace graduated from Yale with her doctorate in math between wars, and worked as a professor before taking a leave of absence to try and get sworn in (several times) for the Navy. She’d been slightly too old, and then she was too thin, and then she was too useful to let go to war – eventually, she got in via persistence, and the military was lucky to have her.

She’d go on to help create UNIVAC as well as the Harvard math machines. Mark I was used towards the atomic bomb. She’d also continue to write and research in peacetime – COBOL, a programming language still used today (albeit rarely) was her creation, making computer language easier to read and write. She’d write papers the entire time she worked under the Navy, constantly pushing forward and improving the tech she worked on.

She was retired out of the Navy at 60, and then called back – and then she retired again, and then she got called back – she never really “retired”, as even when she left the service she was scouted by the private sector. Most of her roles in this time were advisory, and she helped guide tech companies in the right direction.

 

Harvard Math Machine

 

Harvard’s computer department is where Grace did some of her most memorable work! She’d helped assemble, program, and test these absolute behemoth machines. Harvard MK II is where the bug came in, but given the nature of the system, it’s safe to say her contributions in programming made it into all four machines. They built off of each other, each machine containing the best parts of the ones before it.

Anyway, Grace was crucial to testing, re-testing, re-retesting… and making improvements! Under Grace and a man named Howard Aiken, the department built and programmed the Harvard Mark II, a beast of a machine weighing well over 20 tons, taught to think with relay switches, magnetic tapes, and vacuum tubes. Besides the obvious talent in math, she was a pretty decent speaker, too! The duty of explaining the system usually fell to her, and she’d have to do so in a way the upper management would understand.

This wasn’t the only Harvard machine, either. They got to Mark VI before another computer-tech leap was made that moved Harvard University beyond the gigantic fridge-walls they’d been using. In short: Grace and the rest of the Harvard team were at the very forefront of new tech at the time, and usually either on the cutting edge or barely behind it.

 

Bug Time

 

Relay technology was new, and everybody who could get their hands on it was eager to see just what it could do. The Harvard Mark II was very fast, thanks in part to the relays that replaced the mechanical counters used in the Mark I. The downside to those relays is that they require a space between the contact points to work. When the space was open, no signal was sent (there was an air gap between the two parts), and when the space was closed, the signal could make it across. Relays are very fast, much faster than the counters previously used, and are still used today in things like light switches and car signals.

The moth got into the gap, closed the bridge, and allowed signals to be sent continuously, which ruined the machine’s results. Luckily, the machine was advanced enough to put up an error message instead of just shutting down or giving an incorrect answer, which would have been significantly more difficult to track down.

It’s a funny coincidence. A moment in time, caught in the relay of the world’s fastest computer. What a way to go. Good for you, moth. Good for you.

 

Sources:

For more on the bug (with pictures):

https://www.nationalgeographic.org/thisday/sep9/worlds-first-computer-bug/

https://www.atlasobscura.com/places/grace-hoppers-bug

For more on the definition of bug:

https://www.computerworld.com/article/2515435/moth-in-the-machine–debugging-the-origins-of–bug-.html (Warning: this website would like you to sign up for their newsletter via pop-up)

https://www.etymonline.com/word/bug

For more on Rear Admiral Grace Hopper:

https://news.yale.edu/2017/02/10/grace-murray-hopper-1906-1992-legacy-innovation-and-service

For more on the Harvard MK II

https://www.semanticscholar.org/topic/Harvard-Mark-II/296718

https://en.wikipedia.org/wiki/Harvard_Mark_II

 

 

Updates? NOT Magic.

Elizabeth Ideas, Technology April 2, 2021

Update?

You’ve seen our articles on Apple Wave, and you might remember iPhone users being led to dunk their phone in water because of a software update. It’s unfortunate, but as electronics get more and more complex, the less users understand them. The goal of this article is to demystify updates a little.

Updates aren’t magic:

They don’t work perfectly 100% of the time.

But they’re also not magic! The software developers generally know what the issues are and fix them systematically. There’s no alchemy, and very little superstition involved. Everything is rooted in something in the code. The only problem is the location, the where, not the how or why. 

Software:

Software updates are simply updates to the coding or content of a program, and they can be for any reason. For example, if Microsoft decides to update their logo for Word, they’ll need to send the program on your computer the information to do that!

If Windows notices an inefficiency in some of their software that causes Excel to lag, they’ll push an update to fix it. If Apple wants to fix a common bug, they’ll push an update to fix that portion of the code, which should get rid of it. You might not even realize that your device has been updated, as small issues and efficiency issues tend to be done in the background (this is true for Android, at least). Bigger stuff, like full system updates, do a lot of rewriting all at once. This usually involves a restart, so any software developer who wants happy customers will warn them to save their work.

Bugs:

Please note, updates aren’t magic. It’s entirely possible for a bug to survive an update, or for a new one to pop up in its place post-update. In fact, it’s a common joke that bugs act like the Greek Hydra – cut one down and more spring up in its place. However, the only way to kill the beast is to keep going, and get the torch out. If you notice a bug after an update, and vow not to download any more updates, you won’t get the new bug resolved! Bugs usually take some time to completely iron out, especially for small apps and software developers with limited resources.

Regular updates keep security in check, too! If something in the code gets cracked, or becomes a vulnerability, the best way to fix that is an update. However, the same also works in reverse: if something new gets introduced, it’s possible it’s got holes in it that the developers only notice and fix after it’s reported. That’s not paranoia, either! There’s a class of cyberattack called a zero-day attack. These attacks go after vulnerabilities that updates leave, and they try to get in before the developers notice the hole and patch it.

If you’re very worried about what forums are saying about an update, give it some time. Windows will usually let you delay updates, so you can wait a little bit and see how other users are faring before diving in – the same should also be true of other software developers following the Microsoft principle.

Hardware:

You cannot download RAM. RAM is a hardware thing. If something promises to download RAM on your device for you, do not click it. Understanding the difference between hardware and software can be the difference between ending up with a virus or not. Updating hardware usually looks like buying something to attach to the computer – you can add RAM by physically buying RAM at Best Buy, for example. You can’t download a new keyboard, so don’t try to! Or, you can update what’s written on a CD-RM disc, but you can’t update it from standard to Blu-Ray with a regular computer. You can update a mouse driver, you can’t update the mouse itself to suddenly see ultraviolet with something you downloaded online.

In general, once something is a physical item, it is going take physical items to upgrade it. Can you make a mouse see ultraviolet? Sure, you can buy a sensor and attach it to the mouse. Can you do that with software only? No.

In the same way you can’t download a car, you can’t change physical aspects of something with software, either, with a few exceptions. You can open the disc tray, and you can activate the CPU fan manually, but if you don’t have a webcam or a microphone, you can’t just download one. If your motherboard is water-damaged, you can’t make it not damaged with software alone. Updates aren’t magic! You can’t produce physical changes to hardware out of thin air. That doesn’t mean you can’t break hardware with software: if you delete the software that tells the hard drive how to read, it will lose the ability to read. Which makes it nearly worthless. Just stay away from downloadable “hardware updates” and you’ll be fine.

Firmware:

Firmware’s stiff and generally not made to be tampered with. Firmware is what runs simple things like TV remotes and calculators, and it is generally used for low-level functions that don’t (or can’t) take up a lot of space. It’s very specialized as a result! Where a lot of computer software is one-size-fits-all, firmware is designed for the device it’s stored inside.

Consider a simple, computerized cash register, one that can connect to a network so it can access the store’s website as well. It’s not really meant to do much – so it’s easier to crash than a regular computer. It can be as simple as having too many tabs open and then flipping back to the register screen, or as complicated as stumbling upon a bug it doesn’t know how to compensate for, like the Y2K bug.

As we said in our other article, it’s much easier to just kick the can down the road when it comes to firmware issues. Firmware’s written very specifically, so completing an update the ‘right’ way might not be possible. Instead, adding stuff over the top of what’s already there could be the only way the developer gets the update out. Y2K, for a lot of firmware, just meant telling the device ‘the number can be 00, don’t panic’ instead of telling it ‘the year is now 2000’. Don’t fiddle with it yourself! If the developer can’t get the spaghetti code in line, the average programmer’s in for a journey, and not a pleasant one.

Sources:

https://techterms.com/definition/firmware