On Saturday night, someone played the 2,147,483,647th game on the Chess.com iOS app—and the app stopped working for people with 32-bit Apple devices, also known as those made prior to mid-2013. This sudden stoppage occurred because the 32-bit devices essentially weren’t able to process that high of a number. Who knew so many people played chess online?
The CEO of Chess.com, Erik Allebest, addressed the issue in a lighthearted post Tuesday.
He wrote that his team resolved the issue on Monday and realized that the problem had to do with overflow because it couldn’t handle all the games being played. They sent in a request to update the app and said revision is now available on iTunes. “Thanks for your patience—and for doing your part to push us over two billion games,” he wrote. “Wait, that means it’s YOUR fault really, right?” Slate’s Chase Felker, a software engineer, explains what happened here:
A 32-bit integer stores 32 digits, each of which can hold a value of either zero or one, so a 32-bit integer represents 2^32 numbers. Typically programs want to represent negative numbers, so one bit is reserved for the sign of the number. This means the maximum value for a typical 32-bit integer is 2^31 - 1. In human-friendly base-10 that’s 2,147,483,647. In computer-friendly base-2 i”s 1111111111111111111111111111111. If you add one to that number, there’s no space to store the carried one, so the integer overflows.
YouTube ran into this issue in 2014 when the ubiquitous “Gangnam Style” reached more than 2.14 billion plays. The case was resolved when YouTube adjusted its programming to 64-bit integers, so the video can be viewed up to 9,223,372,036,854,775,808 times—but please don’t let that happen, world.
It was probably a good idea for YouTube to update its system because six other videos have passed the 2.14 billion mark since that incident. They are the music videos for “See You Again,” “Sorry,” “Uptown Funk,” “Shake It Off,” and “Bailando,” and Masha and the Bear: Recipe for Disaster, an animated Russian television series.
As for Apple, this isn’t the first time that its devices have had problems keeping up with the times. In September 2016, users complained that the then–newly released iOS10 rendered some versions of Apple devices temporarily useless, either telling people to plug their device in, asking them to restore their operating system (which could cause them to lose data), or rendering it a “brick,” as some users call a lifeless iPhone.
Allebest drew attention to the “Gangnam Style” incident in his post, perhaps not wanting to be considered the only one who had this happen to him, and also noted Pac-Man’s infamous Map 256 glitch. The Ms. Pac-Man game was on an 8-bit integer, for which the highest value is 255. Thus, every time someone tries to access level 256, the integer overflow causes half of the screen to lose control.