Live data from Hacker News

How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

cookieplmonster.github.io

41–50 of 315 posts

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#41
post #19

Earlier quoted context omitted.

And it did not matter at all. The game shipped and was a success.

This is the thing that drives artists and craftsmen to despair and drink: That a flawed, buggy, poor quality work can be "successful" while something beautiful and technically perfect can fail.

San Andreas might be rough under the hood, but on the surface it was nothing short of a masterpiece of game design. The engine was so complex and the cities felt alive, and the game could handle a lot of general nonsense. Still one of my favorite go-to games.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#42
post #2

[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…

[deleted]

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#43
post #28

Earlier quoted context omitted.

Putting the (very valid) reasons for not having human-readable game saves aside, are you sure it's worse than using a 3rd party library that's built to accept semi-valid input values, possibly evaluates user input in some way and has difficult to debug bugs that occur only under certain inputs? I agree that writing a stable and safe parser for a binary data file isn't easy, but there's less things that can go wrong w…

> Putting the (very valid) reasons for not having human-readable game saves aside, I don't follow. What would the reasons be?

[deleted]

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#44

Earlier quoted context omitted.

While it doesn't excuse the bad habits, we do have to keep in mind C++98 (or whatever more ancient was used back then) didn't have the simple initializers we now take for granted. You couldn't just do 'Type myStruct = {};' to null-initialize it, you had to manually NULL all nested fields. God forbid you change the order of the variables in the struct if you're nesting them and forget to update it everywhere. It was j…

You could always `bzero` or `memset` the entire struct to 0.

But only if it contains strictly POD members, otherwise it's UB.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#45
post #28

Earlier quoted context omitted.

> Putting the (very valid) reasons for not having human-readable game saves aside, I don't follow. What would the reasons be?

Higher barrier to cheating.

It's a single player game. Cheat codes are built into it by design.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#46
post #37

Earlier 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.

Worked fine on the target machines and the "0.5x programmer" got to see their family for winter holiday. Or are you saying they should have defensively programmed around a bug manifesting 21 years later and skip seeing their family during crunch time? To be honest, I just don't like how you disparaged the programmer out-of-context. Talk is cheap.

Using a well–written third–party library would not increase the development time; it would in fact reduce it. No risk of missing Christmas there.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#47
post #35

Earlier quoted context omitted.

Putting the (very valid) reasons for not having human-readable game saves aside, are you sure it's worse than using a 3rd party library that's built to accept semi-valid input values, possibly evaluates user input in some way and has difficult to debug bugs that occur only under certain inputs? I agree that writing a stable and safe parser for a binary data file isn't easy, but there's less things that can go wrong w…

You misunderstood. Game developers should use a _good_ third–party library, not a _bad_ one. At a minimum they should be able to read the source code so that they know it is good. Thus open source libraries should be at the top of the list. If you don't know what “good” looks like, take a look at [Serde]( https://serde.rs/ ). It’s for Rust, but its features and overall design are something you should attempt to appro…

There are no good third party libraries

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#48
post #17
post #9

I always enjoy reading deeply technical writeups like these. I only wonder how much more rare they may or may not get in the AI era.

i think the shift will be from craftmens to trademens in regards to general software engineers, but these are type of writes up stem of a artisan style all to its own.

We have been seeing this shift for a while, where "software engineers" graduate from 3 month bootcamps. Except now most likely they will not be earning 500k making crud apps.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#49
post #19

Earlier quoted context omitted.

And it did not matter at all. The game shipped and was a success.

This is the thing that drives artists and craftsmen to despair and drink: That a flawed, buggy, poor quality work can be "successful" while something beautiful and technically perfect can fail.

One artist can take months painting a picture of a landscape where everything is perfect. And the next artist can throw 4 colors of paint at a wall. The fact that lots of people enjoy the work of the second artist doesn't invalidate the work of the first. The two artists are focusing on different things; and it's possible for both of them to be successful at reaching their goals.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#50
post #36

Earlier quoted context omitted.

This is the thing that drives artists and craftsmen to despair and drink: That a flawed, buggy, poor quality work can be "successful" while something beautiful and technically perfect can fail.

The job of the artist is to take the years of expertise and distill it down into something "enjoyable." The hardest mental hurdle to get over is that people just don't care about the technicals being perfect. Hell, the final product doesn't even need to be beautiful; it just needs to be arresting.

Heck, sometimes the thing that's most interesting about a work is people arguing over whether or not it's art.
Post reply on HN