Добавить новость
Январь 2010 Февраль 2010 Март 2010 Апрель 2010 Май 2010
Июнь 2010
Июль 2010 Август 2010
Сентябрь 2010
Октябрь 2010
Ноябрь 2010
Декабрь 2010
Январь 2011
Февраль 2011 Март 2011 Апрель 2011 Май 2011 Июнь 2011 Июль 2011 Август 2011
Сентябрь 2011
Октябрь 2011 Ноябрь 2011 Декабрь 2011 Январь 2012 Февраль 2012 Март 2012 Апрель 2012 Май 2012 Июнь 2012 Июль 2012 Август 2012 Сентябрь 2012 Октябрь 2012 Ноябрь 2012 Декабрь 2012 Январь 2013 Февраль 2013 Март 2013 Апрель 2013 Май 2013 Июнь 2013 Июль 2013 Август 2013 Сентябрь 2013 Октябрь 2013 Ноябрь 2013 Декабрь 2013 Январь 2014 Февраль 2014
Март 2014
Апрель 2014 Май 2014 Июнь 2014 Июль 2014 Август 2014 Сентябрь 2014 Октябрь 2014 Ноябрь 2014 Декабрь 2014 Январь 2015 Февраль 2015 Март 2015 Апрель 2015 Май 2015 Июнь 2015 Июль 2015 Август 2015 Сентябрь 2015 Октябрь 2015 Ноябрь 2015 Декабрь 2015 Январь 2016 Февраль 2016 Март 2016 Апрель 2016 Май 2016 Июнь 2016 Июль 2016 Август 2016 Сентябрь 2016 Октябрь 2016 Ноябрь 2016 Декабрь 2016 Январь 2017 Февраль 2017 Март 2017 Апрель 2017 Май 2017
Июнь 2017
Июль 2017
Август 2017 Сентябрь 2017 Октябрь 2017 Ноябрь 2017 Декабрь 2017 Январь 2018 Февраль 2018 Март 2018 Апрель 2018 Май 2018 Июнь 2018 Июль 2018 Август 2018 Сентябрь 2018 Октябрь 2018 Ноябрь 2018 Декабрь 2018 Январь 2019
Февраль 2019
Март 2019 Апрель 2019 Май 2019 Июнь 2019 Июль 2019 Август 2019 Сентябрь 2019 Октябрь 2019 Ноябрь 2019 Декабрь 2019 Январь 2020
Февраль 2020
Март 2020 Апрель 2020 Май 2020 Июнь 2020 Июль 2020 Август 2020 Сентябрь 2020 Октябрь 2020 Ноябрь 2020 Декабрь 2020 Январь 2021 Февраль 2021 Март 2021 Апрель 2021 Май 2021 Июнь 2021 Июль 2021 Август 2021 Сентябрь 2021 Октябрь 2021 Ноябрь 2021 Декабрь 2021 Январь 2022 Февраль 2022 Март 2022 Апрель 2022 Май 2022 Июнь 2022 Июль 2022 Август 2022 Сентябрь 2022 Октябрь 2022 Ноябрь 2022 Декабрь 2022 Январь 2023 Февраль 2023 Март 2023 Апрель 2023 Май 2023 Июнь 2023 Июль 2023 Август 2023 Сентябрь 2023 Октябрь 2023 Ноябрь 2023 Декабрь 2023 Январь 2024 Февраль 2024 Март 2024 Апрель 2024 Май 2024 Июнь 2024 Июль 2024 Август 2024 Сентябрь 2024 Октябрь 2024 Ноябрь 2024 Декабрь 2024 Январь 2025 Февраль 2025 Март 2025 Апрель 2025 Май 2025 Июнь 2025 Июль 2025 Август 2025 Сентябрь 2025 Октябрь 2025 Ноябрь 2025 Декабрь 2025
1 2 3 4 5 6 7 8 9 10 11 12 13 14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Game News |

A Windows 11 update revealed a 2-decade old bug in GTA: San Andreas that yeets CJ at '1.087 quadrillion light years' into the stratosphere

Game developer and modder Silent, perhaps best-known for the SilentPatches he's released for various games including Grand Theft Auto: San Andreas, has stumbled across (and fixed) a bug that's been lying dormant for two decades. And while this manifestation was, apparently, triggered by a new build of Windows 11, it's been there the whole time.

Silent received a "rather specific bug report" relating to SilentPatch, in which a user noted that after updating their Windows 11 to version 24H2, the Skimmer plane disappears completely from the game. It can't be spawned using the trainer tool, nor does it appear on its usual spawn points.

Our programming hero notes this wasn't an isolated complaint, and he's been receiving comments about the missing Skimmer since November last year. One user set up a virtual machine (VM) running Windows 11 23H2, confirmed that the plane spawned OK, then updated the VM to Windows 11 24H2 and the plane disappeared. As this user put it, why "a small feature update in 2024 breaks a random plane in a 2005 game is anyone’s guess."

Silent asked a few people on 24H2 to test and, yep, they all hit this bug. At this point he rolled up his sleeves, set up his own VM running 24H2, and confirmed it. Here's where it gets good:

"I then used the script to spawn a Skimmer and put CJ inside it," writes Silent, "just to be launched 1.0287648030984853e+0031 = 10.3 nonillion meters, or 10.3 octillion kilometers, or 1.087 quadrillion light-years up in the sky."

I'll ha' that

(Image credit: Silent / Rockstar Games)

Needless to say GTA: San Andreas has no means of actually showing this extraordinary event, instead showing "a famous 'burn-in effect' known to occur when the camera gets launched into infinity or close to it. Funny enough, you can still kind of make out the shape of the plane even though the animations give up completely to the inaccuracies of the floating point values."

Silent began investigating the issue and hit upon an "obviously enormous" numerical value for the plane's rotor blade speed, but what caused the plane to shoot up such an unimaginable distance? "There are two possibilities," explains Silent:

  • The plane spawns high up in the sky already.
  • The plane spawns at ground level and then shoots up in the next frame.

At this point Silent starts going into the details of functions, Z coordinates, bounding boxes, and a dozen other pieces of terminology. If I tried to stitch together an explanation, I'd probably get bits of it wrong and it would look like gibberish anyway. For the more code-inclined, you can feast on Silent's workings in his excellent full writeup.

The long-and-short is that Silent identifies a corrupted Z value (spawn coordinates), and guesses that this is resulting in either the collision file being read incorrectly ("highly unlikely, but not impossible given that this issue could potentially have been an OS bug") or "the bounding box is read correctly, but then it’s updated with an outrageously incorrect value."

This leads Silent to further analysis of the bounding box and Z coordinate, and the realisation that when a specific vehicle is spawned for the first time, the game updates the Z coordinate to reflect the car's natural suspension height. Yes, we are still talking about a plane.

"This is where things went wrong first," writes Silent, before launching into a detailed analysis of how the suspension lines are computed, and where he finally identified the problem: In vehicles.ide, the Skimmer has fewer parameters than other planes, making it resemble the entries for boats instead. It's the only plane missing parameters for its front and rear wheels."Does re-adding those parameters fix the seaplane? Unsurprisingly, it does!" he writes.

Having identified the problem, which somehow involves the game thinking the plane is a boat, our man then goes full Sherlock to identify why Rockstar's coders missed it.

"I have a likely explanation for why Rockstar made this specific mistake in the data to begin with—in Vice City, Skimmer was defined as a boat, and therefore did not have those values defined by design! When in San Andreas they changed Skimmer’s vehicle type to a plane, someone forgot to add those now-required extra parameters. Since this game seldom verifies the completeness of its data, this mistake simply slipped under the radar.

"In the case of this rabbit hole, the discovery of this fix only raised more questions—why did this break only now? What made the game work fine despite this issue for over twenty years, before a new update to Windows 11 suddenly challenged the status quo?"

"This was the most interesting bug I’ve encountered for a while."

Silent

Surprisingly enough, this particular version of Windows 11 is actually not responsible. He identifies the ultimate problem as being an "actual floating point value that was sitting on the stack in exactly the right spot.

"I then inspected vehicles.ide for TopFun—the vehicle defined directly before Skimmer. Sure enough, its wheel scale is 0.7!" he wrote. "This is the exact proof I needed—notice that in the Windows 10 run, some of the local variables are even still visible to the human eye (like the normal vehicle class), while in Windows 11, they are completely gone. It’s also worth pointing out that even in Windows 10, the very next local variable after the wheel scales has been overwritten by LeaveCriticalSection, which means the game was 4 bytes away from hitting this exact bug years earlier! The luck at display here is insane."

So even though Windows 11 24H2 brought this bug to light, "the real issue here is the game relying on undefined behavior (uninitialized local variables)." The bug could've popped up on Windows 10, or 7, or XP, or even Windows 98—the math just didn't end up that way."

Ever the completionist, Silent goes on to look through the code on other San Andreas releases, and finds that the original Xbox version of the game included a fix not dissimilar to his own. This fix was included in other San Andreas releases, including GTA: The Definitive Edition.

"This was the most interesting bug I’ve encountered for a while," writes Silent. "I initially had a hard time believing that a bug like this would directly tie to a specific OS release, but I was proven completely wrong. At the end of the day, it was a simple bug in San Andreas and this function should have never worked right, and yet, at least on PC it hid itself for two decades."

(Image credit: Rockstar Games)

In a flourish I can only admire, Silent ends by explaining why his fix is slightly more accurate than Rockstar's equivalent, and uses the discovery to reinforce some good coding principles like validating your input data: "San Andreas was notoriously bad at this." Meow!

In Tom Wolfe's book The Right Stuff, which focuses on the remarkable test pilots who worked on the early stages of the space program, he poses a question: "What is it, I wondered, that makes a man willing to sit up on top of an enormous roman candle, such as a Redstone, Atlas, Titan or Saturn rocket, and wait for someone to light the fuse?"

In the microcosm of San Andreas, a man called Silent wondered what made CJ enter a plane and then instantaneously launch "1.087 quadrillion light-years up in the sky." The real answers are all above, and in his full writeup. But the other answer is in the absurdity of these things working at all, the countless co-dependent calculations and things that can go wrong in something so seemingly simple as making a vehicle appear in the world. Now you see it: Now you're in another galaxy.



Читайте также

Get up to 90% off historical murder in the Assassin's Creed franchise sale

Портативную консоль-трансформер ONEXSUGAR Sugar 1 можно купить в России

This roguelite claims to have the dubious honor of being 'the world's first fully playable game created 100% through AI' in a milestone for slop everywhere




Game24.pro — паблик игровых новостей в календарном формате на основе технологичной новостной информационно-поисковой системы с элементами искусственного интеллекта, гео-отбора и возможностью мгновенной публикации авторского контента в режиме Free Public. Game24.pro — ваши Game News сегодня и сейчас в Вашем городе.

Опубликовать свою новость, реплику, комментарий, анонс и т.д. можно мгновенно — здесь.