How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
91–100 of 315 posts
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#92Earlier quoted context omitted.
The comment reappeared, and while you're right about using proper libraries to handle data, it doesn't excuse the "undefined behavior (uninitialized local variables)" that I still see all the time despite all the warning and error flags that can be fed to the compiler. Most of the time, the programmers who do this do not follow the simple rule that Stroustrup said which is to define or initialize a variable where you…
And it did not matter at all. The game shipped and was a success.
I worked in gamedev around the time this game was made and this would have been very much an ordinary, everyday kind of bug. The only really exceptional thing about it is that it was discovered after such a long time.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#93[flagged]
To u/db48x whose post got flagged and doesn't reappear despite me vouching for it as I think they have a point (at least for modern games): GTA San Andreas was released in 2004. Back then, YAML was in its infancy (2001) and JSON was only standardized informally in 2006, and XML wasn't something widely used outside of the Java world. On top of that, the hardware requirements (256MB of system RAM, and the PlayStation 2…
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#94My takeaway, speaking as someone who leans towards functional programming and immutability, is "this is yet another example of a mutability problem that could never happen in a functional context" (so, for example, this bug would have never been created by Rust unless it was deeply misused)
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#95I wonder if they fixed the vehicle definition file as well, or just the parser. The latter would be an incomplete fix.
Given that those parameters are for wheels on a plane that doesn’t have wheels, I would say fixing the parser is the better fix
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#96My takeaway, speaking as someone who leans towards functional programming and immutability, is "this is yet another example of a mutability problem that could never happen in a functional context" (so, for example, this bug would have never been created by Rust unless it was deeply misused)
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#97Earlier quoted context omitted.
The flaw isn't the language. The issue is a 0.5x programmer not knowing to avoid sscanf() and failing to default and validate the results. This could be handled competently with strtok() parsing the lines without needing a more complicated file format.
I’ll be the first to defend the greybeards I’ve befriended and learned from in AAA, but having seen codebases of that age and earlier, the “meta” around game development was different back then. I think the internet really changed things for the better. Your average hire for the time might have been self-taught with the occasional C89 tutorial book and two years of Digipen. Today’s graduates going into games have fal…
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#98Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#99https://static.wikia.nocookie.net/gta-myths/images/f/f1/Egg_...
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#100> all these findings prove that the bug is NOT an issue with Windows 11 24H2, as things like the way the stack is used by internal WinAPI functions are not contractual and they may change at any time, with no prior notice. The real issue here is the game relying on undefined behavior (uninitialized local variables), and to be honest, I’m shocked that the game didn’t hit this bug on so many OS versions, although as I…