GTA V $ 2,147,483,647 Glitch Could Wipe Your Cash Away

NLS

Norwegian Llama Stylist
Jan 7, 2010
1,594
0
0
arc1991 said:
NLS said:
Why are people surprised? 2,147,483,647 is the highest you can go with a signed integer.
Hell they could almost try to make that a selling point for the next-gen version of GTAV "Now with support for a maximum amount of 9,223,372,036,854,775,807 $" since that's how high you can go with 64bit.

People will always say "oh why didn't they think of that", but did you know that a lot of computer clocks and systems will have major problems when time hits 19 January 2038 because of the exact same problem?
I'm no expert in binary department...but why will computer clocks and systems have major problems o_O it's just a number, 19/01/2038...

Brain. Hurts.
Long story short: "Modern" computer systems have time defined as x numbers passed since january 1st 1970 (ever seen that date appear by some error? yup that's why).
Many years later, and those number of seconds have turned into an impressive number, just like the number of dollars in GTA. Someone has done the maths, and the day we'll have our own "GTA" glitch is in 2038. Simply put, the amount of seconds passed since 1970 will be greater than a number that can be stored(with 32bit), and it will reset.

Hopefully by then, most systems will have moved onto using 64bit integers. Don't worry your head with this though, since we're 25 years away from it anyways. If you want more brain-hurt read here: http://en.wikipedia.org/wiki/Year_2038_problem
 

Negatempest

New member
May 10, 2008
1,004
0
0
And my insane theory that 3rd party developers hardly ever QA their **** anymore just looks more like a fact these days.

My next question, why the heck are they even highly respected these days?
 

Milanezi

New member
Mar 2, 2009
619
0
0
Floppertje said:
you'd almost think it's some kind of social commentary about not doing weird stuff with the stock market.
That would be an elegant way to get out of this mess "well, ladies and gents, this is not a bug, this was done on purpose, it's a social reflex on the impact of capitalism in our lives..." lol
 

Imperioratorex Caprae

Henchgoat Emperor
May 15, 2010
5,499
0
0
NLS said:
Why are people surprised? 2,147,483,647 is the highest you can go with a signed integer.
Hell they could almost try to make that a selling point for the next-gen version of GTAV "Now with support for a maximum amount of 9,223,372,036,854,775,807 $" since that's how high you can go with 64bit.

People will always say "oh why didn't they think of that", but did you know that a lot of computer clocks and systems will have major problems when time hits 19 January 2038 because of the exact same problem?
Hah, I've been telling people to fear Y2k38 since Y2k and only got strange looks... Lazy programmers/hardware makers.
 

castlewise

Lord Fancypants
Jul 18, 2010
620
0
0
Twenty Ninjas said:
Hahahaha someone used long int for the variable that represents money.

Newbie developer mistake, Rockstar.
I'm not sure. If its possible to go into debt in the game (I haven't played it) then using a signed int seems like a reasonable choice. Of course, its a good idea to catch overflow problems before they happen, but its a commmon enough mistake, even at well established studios like Blizzard.
 
Jun 16, 2010
1,153
0
0
Floppertje said:
you'd almost think it's some kind of social commentary about not doing weird stuff with the stock market.
Milanezi said:
That would be an elegant way to get out of this mess "well, ladies and gents, this is not a bug, this was done on purpose, it's a social reflex on the impact of capitalism in our lives..." lol
Wait, doesn't this also mean if you somehow go over 2.2 billion dollars into debt, then it will roll over and you'll become a multi-billionaire?
I wonder what that says about society.
 

DiamanteGeeza

New member
Jun 25, 2010
240
0
0
DataSnake said:
And they didn't use use an unsigned value for money because...?
I haven't played it yet, but is there the possibility that you can legitimately get into debt in the game? If so, that's why it's signed.
 

DiamanteGeeza

New member
Jun 25, 2010
240
0
0
amaranth_dru said:
NLS said:
Why are people surprised? 2,147,483,647 is the highest you can go with a signed integer.
Hell they could almost try to make that a selling point for the next-gen version of GTAV "Now with support for a maximum amount of 9,223,372,036,854,775,807 $" since that's how high you can go with 64bit.

People will always say "oh why didn't they think of that", but did you know that a lot of computer clocks and systems will have major problems when time hits 19 January 2038 because of the exact same problem?
Hah, I've been telling people to fear Y2k38 since Y2k and only got strange looks... Lazy programmers/hardware makers.
It definitely isn't anything to do with being lazy in this instance. Remember, this is an evolution of an engine which, evidently, has always had a signed int to store the money, but previous games didn't provide the capability to earn crazy amounts of cash. I imagine that it simply didn't occur to anybody that this was possible, or to check what variable type the money was stored in.

A simple oversight that can have massive consequences - everybody (including you) has done this, because we're human.
 

Kinitawowi

New member
Nov 21, 2012
575
0
0
Negatempest said:
And my insane theory that 3rd party developers hardly ever QA their **** anymore just looks more like a fact these days.

My next question, why the heck are they even highly respected these days?
Variations of this bug have existed for decades (Nethack's score has the same problem).

This isn't about lazy developers not bothering to QA their data, it's about them not accounting for deranged levels of overplay. Does the average person get anywhere near that figure? Of course not. If it was set at a 16-bit integer (cap of 32767), that might be a bit dumb because presumably people are going to hit that. There's only so many corner cases you can account for.
 

Glaice

New member
Mar 18, 2013
577
0
0
They couldn't have used 64 bit integers to avoid this? I mean come on it's 2013, not 1999.
 

Negatempest

New member
May 10, 2008
1,004
0
0
Kinitawowi said:
Negatempest said:
And my insane theory that 3rd party developers hardly ever QA their **** anymore just looks more like a fact these days.

My next question, why the heck are they even highly respected these days?
Variations of this bug have existed for decades (Nethack's score has the same problem).

This isn't about lazy developers not bothering to QA their data, it's about them not accounting for deranged levels of overplay. Does the average person get anywhere near that figure? Of course not. If it was set at a 16-bit integer (cap of 32767), that might be a bit dumb because presumably people are going to hit that. There's only so many corner cases you can account for.
Variations have existed for this bug have existed, mostly in PC. Understandable considering PCs have a variety of builds and you cant get them all. This was very much a game specific bug. And I add this bug with the garage bug, which should of also been caught with goid QA. Let us not forget that players will always get a stupid high cash amount. It is the reason there are hard caps in money, even MMOs have hard caps.
 

Negatempest

New member
May 10, 2008
1,004
0
0
DiamanteGeeza said:
amaranth_dru said:
NLS said:
Why are people surprised? 2,147,483,647 is the highest you can go with a signed integer.
Hell they could almost try to make that a selling point for the next-gen version of GTAV "Now with support for a maximum amount of 9,223,372,036,854,775,807 $" since that's how high you can go with 64bit.

People will always say "oh why didn't they think of that", but did you know that a lot of computer clocks and systems will have major problems when time hits 19 January 2038 because of the exact same problem?
Hah, I've been telling people to fear Y2k38 since Y2k and only got strange looks... Lazy programmers/hardware makers.
It definitely isn't anything to do with being lazy in this instance. Remember, this is an evolution of an engine which, evidently, has always had a signed int to store the money, but previous games didn't provide the capability to earn crazy amounts of cash. I imagine that it simply didn't occur to anybody that this was possible, or to check what variable type the money was stored in.

A simple oversight that can have massive consequences - everybody (including you) has done this, because we're human.
Oh, no. This was neglegence for sure. The facts are that this money glitch, the garage glitch and now im hearing game save corruptions from the online game. This is all pointing to 3rd party giving a rats bottom to QA anything as often as they did in the past. And for some reason custumers are letting this slide. 3rd party no longer deserve that kind of respect.
 

man-man

Senior Member
Jan 21, 2008
163
0
21
shameduser said:
I was thinking about how you would get around this and maybe have a second variable that holds all money over the limit but then displaying the amount wouldn't be easy sense you can't just add the two together and display that. I'm not super familiar with programing so it could be really easy.
Depends on what language you're programming in, but most will have some sort of library for "BigInt" numbers, i.e. integers using more bits than the 'standard' 32 or 64. Very likely including support for arbitrarily large ints, which extend to as big a number as you need, but of course has to use more storage space to do it.
 

BoredRolePlayer

New member
Nov 9, 2010
727
0
0
..This isn't a glitch in the traditional sense, this is programmer oversight. If they had done a simple if block to check to make say if your money is X and the limit is Y and if X+newly gained money > Y then subtrack enough money to equal Y (Or set X to equal Y which would have been a predefined variable for ease of change, but for this case I don't think will change). That why any newly gained money will always be over way and will set it to that limit
 

Olas

Hello!
Dec 24, 2011
3,226
0
0
So does this mean if I go far enough into debt I can become rich?
 

-Dragmire-

King over my mind
Mar 29, 2011
2,821
0
0
Ha! 32bit int for currency!? Come on, they'd have to suspect people would go over that limit. The systems might not understand a 64bit int but there's got to be a way around that even if it means holding overflow in a new int variable.

Glaice said:
They couldn't have used 64 bit integers to avoid this? I mean come on it's 2013, not 1999.
I don't think the consoles can understand 64bit ints.
 

-Dragmire-

King over my mind
Mar 29, 2011
2,821
0
0
NLS said:
arc1991 said:
NLS said:
Why are people surprised? 2,147,483,647 is the highest you can go with a signed integer.
Hell they could almost try to make that a selling point for the next-gen version of GTAV "Now with support for a maximum amount of 9,223,372,036,854,775,807 $" since that's how high you can go with 64bit.

People will always say "oh why didn't they think of that", but did you know that a lot of computer clocks and systems will have major problems when time hits 19 January 2038 because of the exact same problem?
I'm no expert in binary department...but why will computer clocks and systems have major problems o_O it's just a number, 19/01/2038...

Brain. Hurts.
Long story short: "Modern" computer systems have time defined as x numbers passed since january 1st 1970 (ever seen that date appear by some error? yup that's why).
Many years later, and those number of seconds have turned into an impressive number, just like the number of dollars in GTA. Someone has done the maths, and the day we'll have our own "GTA" glitch is in 2038. Simply put, the amount of seconds passed since 1970 will be greater than a number that can be stored(with 32bit), and it will reset.

Hopefully by then, most systems will have moved onto using 64bit integers. Don't worry your head with this though, since we're 25 years away from it anyways. If you want more brain-hurt read here: http://en.wikipedia.org/wiki/Year_2038_problem
Never really understood why system time was represented as a signed int. Is there ever a time where a system counting the passing of seconds needs to account for negative numbers?

EDIT:

Ah, stored time(in seconds?) before 1970 wouldn't work...
 

EightGaugeHippo

New member
Apr 6, 2010
2,076
0
0
I am confused, at the end of the game I had $20 Million for each character.
The only way to make money is robbing things and cash from business.
By robbing people, shops and armoured cars I can make between $10 and $6000.
My businesses role in around $10,000 every in game week.
Minus $5,000 everytime I get killed after a rampage or accident.
I've never maid more than $500 off the stock market.

Can someone please explain how I can make enough money to break the game without cheating?