Chess.com Has Stopped Working On 32bit iPads After the Site Hit 2^31 Game Sessions (chess.com)
Apple's decision to go all in on 64bit-capable devices, OS and apps has caused some trouble for Chess.com, a popular online website where people go to play chess. Users with a 32bit iPad are unable to play games on the website, according to numerous complaints posted over the weekend and on Monday. Erik, the CEO of Chess.com said in a statement, "Thanks for noticing. Obviously this is embarrassing and I'm sorry about it. As a non-developer I can't really explain how or why this happened, but I can say that we do our best and are sorry when that falls short." Hours later, he had an explanation: The reason that some iOS devices are unable to connect to live chess games is because of a limit in 32bit devices which cannot handle gameIDs above 2,147,483,647. So, literally, once we hit more than 2 billion games, older iOS devices fail to interpret that number! This was obviously an unforeseen bug that was nearly impossible to anticipate and we apologize for the frustration. We are currently working on a fix and should have it resolved within 48 hours.
This was obviously an unforeseen bug that was nearly impossible to anticipate
Only if you're an idiot.
Watch this Heartland Institute video
The problem could waited twice longer — giving the 32bit iPads time to break down and die of old age on their own — but somebody wasted an entire bit for the possibility to return -1 somewhere...
Any time you pick ssize_t over size_t, for example, you are making the same decision...
In Soviet Washington the swamp drains you.
so 32bit device cant handle 64bit int?? i'm a little confused
I'm not Apple apologist, but come on why point the finger at Apple? This would have happened on any 32-bit architecture. Blame the devs of the game for not knowing how this works, not Apple.
Everyone please stop using int and long intrinsic types. uint64_t is your friend when you expect so many games. 2^31 tells me it wasn't even unsigned. How could there be a negative number of games played?
I'll never play chess there again! EVER!!
Yeesh.
Mission: To provide products that consume time and energy as entertainingly as permitted by the laws of thermodynamics.
How do you know it isn't the Russians?
I am not sure how Apple going 64bit is the one causing the problems? This particular problem (and most others caused by the discrepancy) would still be a problem if Apple devices were all still 32bit... It would only have been a much bigger problem than it is now.
Just don't use numeric values for your primary key if you plan on growing.
That's like saying 8-bit processors can't handle (signed) numbers above 128. The processors handle them fine. The programmers on the other hand...
If you visit my website with IE6 good luck - ancient device not so good experience. If you own iDevice you are supposed to replace it every other year - that is in the contract:)
Wait.... what? First of all.... you can get TWICE that by using an "unsigned" 32-bit.... since there should never be a negative game ID.
And also what 32-bit machine doesn't have register-combining for 64-bit variables? Just because it isn't representable in a signed 32-bit integer does NOT mean it's 32-bit incompatible...
This explanation makes absolutely no sense to me.
Sorry for the lack of oblig link to story. If someone can find it, reply.
Slashdot crashed a few years ago for a day because it hit some 2,147,483,647 indexes in part of the data.
Simple Lesson today, don't think 2,147,483,647 is be enough and will not be hit.
Someone used an int type somewhere in the code whose size is architecture specific. There's no reason a 32-bit iPad couldn't support 64-bit numbers.
I typed "2,147,483,647 + 1" into my old iPad calculator app and it said 2,147,483,648!
I'm not a programmer, but maybe the answer is to just rewrite your website to use the iPad calculator?!
I hear Apple have sold like, 1 billion of them or something, so you'll be able to use it a billion times two billion at least!
I am currently working on a web site backed by a MySQL data base. The main table has a must-be-unique ID field which is typed as a Java Long object. So my data base is going to break when it hits 2^63 records. Should I be worried?
You with your reasoned discussion. Knock that off!
Apple's decision to go all in on 64bit-capable devices, OS and apps has caused some trouble for Chess.com, a popular online website where people go to play chess.
Apple's "64-bit only" decision has nothing to do with this.
systemd is Roko's Basilisk.
Don't use 32 bit id's. Cuz 32 bit id's are bad, m'kay. And using them is bad. So don't be bad, by using 32 bit id's. m'kay.
So according to this article, Apple going to 64 bit is making this site fail. What a ridiculous nonsense.
1. Apple hasn't changed everything to 64 bit yet. iOS 11 will only run on 64 bit systems and won't run on any device that is 32 bit only, but this hasn't happened yet.
2. 64 bit applications work just fine. Apparently the application uses 32 bit in the 32 bit version and 64 bit in the 64 bit version, the 32 bit version overflows and the 64 bit version doesn't. So if Apple had killed off all 32 bit versions, which they didn't, everything would have actually been fine.
3. The problem is not 32 bit vs 64 bit application, it is using a 32 bit counter for a quantity that exceeds 32 bits. But 32 bit applications can easily use 64 bit counters. They are just a tiny tiny bit slower, but work just fine.
So the problem has nothing to do with Apple, it is using a 32 bit variable for a 64 bit quantity, in other words, an elementary programming error by the application developer.
If only there were some way of coping with numbers greater than 32 bits long on a 32 bit engine.
This website started in 2005, so unless they saw Nokia brick phones as the way of the future, I really doubt they thought they'd get anywhere close to that many games. Matter of fact, you can blame all (32 and 64) smart phones for this because no one ever seems to close out of their apps. The popular consensus is that most of chess playing traffic comes from old-school Linux users anyway. They could just have games close and delete automatically after a period of time. And, two billion people are never going to be on Chess.com at the same time. But let's say they are, then just use multiple servers. Don't blame the bits for this because the main audience is upgrading anytime soon.
There's almost no reason to use "long". The only non-bogus things I can think of from the top of my head are memcpy implementation, bitwise operations and similar things on a block of memory when you want to handle a word at a time -- where doing it byte-by-byte would work just as well, merely slower.
Either your program needs to handle values >= 2^31/2^32, or it doesn't. In the first case, you use [u]int64_t, in the latter it should be int. Anything else introduces a pointless portability problem: int works as fast if not faster on 64-bit than long, too (at the very least by taking fewer cache lines when stored in memory).
As for values that deal with structure sizes, there's [s]size_t/[u]intptr_t.
The only nasty thing is printf() -- when using arch-independent types, you need that ugly %" PRId64 " stuff. It even breaks in C++ where some bright person had the idea to break compat and require a space after the " -- and your C code may be included into C++ when you don't expect.
The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
If they had just used Uint, they could've "not forseen" this eventuality twice as long...
Everyone complained at Microsoft because their x64 compiler has 32-bit longs.
This is what happens when a bunch of smart chess players pretend to be mathematicians and programmers
Sent from my TARDIS
A succint summary of issue and resolution. I'd hire you.
He not only lacks technical skills he clearly not even competent as a CEO because he missed the golden opportunity to highlight the success of chess.com: "We did not anticipate the huge popularity of chess.com which caused us to exceed two billion chess games which were more games than some of the code could handle. We apologise for the oversight and will be issuing a patch which will let us grow to 2^63, or over 9 quintillion games.".
Failing because you did not anticipate being a huge success makes you look a lot better than just failing because you think it is impossible to foresee overflowing an integer variable.
How, exactly, is this Apple's fault? This is a developer programming error based on a lack of understanding how to represent large numbers on systems with limited WORD sizes. Even on the ancient 6502 or Z80 (8 bit processors), we knew how to write code that could handle numbers that far exceed 2^31. And, before they start talking about performance, I need to ask, how many frames per second do you need to render a chess game?
The developers need to place the blame with themselves where it belongs.
I guarantee the developers at chess.com have been warning management of this could happen for awhile and have been told "but does it work today?, if so we don't need to fix it"
If ONLY there were some way to handle numbers larger than 32 bits on a 32 bit cpu. If only.
The world started in the late 70's. The 60's were just a figment of my imagination. If you enjoyed them, "you're welcome".
We were just pessimistic and figured that a handful of people would play the game...boy were we wrong, and then wrong again.
Set the db ibdex to -(2^31+1).
I've been there...done that...several times actually.
N.B. I'm assuming devs are lazy here and type int as opposed to uint on the app side of things too. Probably a safe enough bet.
Split the games into years or chapters so no one chapter comes close to even a 28 bit limit.
I don't see anything how the change to go all out for 64 bit arc by apple impacted this in any way.Clearly the devs are at fault here
The article mentions that on older 32bit iOS devices, games don't run because they can't count that high. Understandable. One would presume that this is also the case on *any* 32bit system, not just iOS.
And what's with the lede?
What?!? Moving to 64bit means newer devices *won't* have that problem on chess.com or any other site or app that uses very large integers, so I fail to see how this is Apple's doing, or is even related to Apple at all (aside from the problem first being discovered on an old iPad). Just another way to get Apple into the headlines?