On March 23, 2018, a glitch in Tesla's Autopilot technology contributed to the death of Walter Huang in Mountain View, California. As Huang's Model X approached a left exit on US Highway 101, the software apparently got the lane lines mixed up. The car steered to the left, putting itself in the space between the diverging lanes. Seconds later, it crashed into a concrete lane divider at 70 miles per hour. Huang was taken to the hospital but died soon afterward.

Last week, the National Transportation Safety Board released dozens of new documents that provide a detailed understanding of the circumstances of Huang's death. The documents confirm a claim by Walter Huang's family that he had experienced this particular glitch, in this particular spot, multiple times prior to his fatal crash. He complained to family and friends about the issue. However, the NTSB was not able to confirm another key claim: that Huang reported the issue to Tesla.

Forensic data also suggests one reason Huang might not have been paying attention to the road in the final seconds before his death: he was in the habit of playing a game called Three Kingdoms in his car while driving to work. Logs from his Apple-provided iPhone showed that he used the app during his morning commute every day the week of his fatal Friday crash. However, those logs don't provide enough information to say if he was interacting with the game in the final seconds before his death.

The documents also point to a third possible factor in Huang's death: the government officials who designed and maintained the 101 freeway. This exact turnoff had been the scene of multiple crashes in the years before Huang's death—including a fatal crash in 2015. One reason the 2015 crash had been fatal was that officials had been too slow to replace a crash attenuator—an accordion-like metal device designed to cushion a car's impact. Unfortunately, Huang's crash happened just two weeks after another crash in the same spot, and once again, the crash attenuator hadn't been replaced in time. This reduced Huang's chances of surviving the crash.

The NTSB board is scheduled to hold a hearing on the Huang crash next week. At that point, it's expected to formally determine the cause of the crash and make safety recommendations. Based on the documents released so far, it seems that both Tesla and California officials could get some of the blame.

Huang’s vehicle had the same glitch in the same spot before

Ever since Huang's death, his wife and brother have insisted that this wasn't the first time Huang's Model X had experienced this kind of problem. The new documents offer clear confirmation of this claim. On at least two prior occasions, Huang's Model X tried to steer into the concrete barrier at exactly the same spot along highway 101. Each time, Huang noticed the mistake and grabbed the wheel, steering it back into the correct lane.

The NTSB's primary evidence is log data that is stored to an SD Card inside every Model X. This data records second-by-second changes in the vehicle's steering-wheel position, velocity, and other variables. NTSB examined log data from a month of Huang's morning commutes and found two days—February 27 and March 19—when the vehicle drifted toward the lane divider that would kill him days later. In each case, logs show Huang applying torque to the steering wheel and guiding the vehicle back into its proper lane.

That's not all. A friend of Huang provided the NTSB a screenshot showing Huang complaining about the issue after the March 19 incident.

"Do you feel AP [Autopilot] is better?" Hans Ting asked Walter Huang in a message on March 19. "I feel it is better... Less jerky."

Huang responded in Chinese. "Nope, I feel almost the same," Huang wrote, according to the NTSB's translation. "Almost led me to hit the median again this morning."

He added, "Each time at the 85 separation it would drive me towards the middle of the two lines."

However, the NTSB was not able to confirm another claim by the family—one that could prove important in their lawsuit against the electric carmaker. Walter Huang's wife and brother say that he alerted a Tesla representative about Autopilot's steering problem during a visit to a Tesla service center weeks before his death. Records show that Huang did visit a Tesla service center to address a problem with the vehicle's falcon-wing doors. A defective sensor had caused one of the doors to bump into the garage above the vehicle, causing minor paint damage.

The family says Huang told Tesla about the problem with Autopilot during that same visit. But Tesla has no record of this. Tesla records do show Huang visiting a Tesla shop about the door issues. And Tesla's service logs show that Huang reported an "issue with GPS/Navigation causing cruise control to not function and alert 'maps not loaded' to appear."

What he's referring to is not clear exactly, but it seems like a different issue than Autopilot steering into a concrete barrier. An interview with the staffer who talked to Huang and made that note says he clearly remembers Huang complaining about the issue with the falcon-wing doors, but he doesn't remember anything about Autopilot steering problems.

Huang was playing a game on his phone minutes before the crash

Huang worked for Apple, and Apple issued Huang two smartphones. The phones were loaded with enhanced logging capabilities to assist in troubleshooting issues like memory leaks and excessive power use. Apple helped the NTSB recover these logs from one of his cell phones, which was heavily damaged in the crash. They provided sporadic but far from comprehensive information about what software was running on Huang's phone.

"Three logs recovered showed that a game application, Three Kingdoms mobile edition, was active during the driver's trip to work," the NTSB wrote in one of its reports. "The game is a world-building, strategy game with multi-player capability. When playing the game on a mobile device such as an iPhone 8 Plus, most players have both hands on the phone to support the device and manipulate game actions."

At 9:06am—21 minutes before Huang's deadly crash—a log entry showed that Three Kingdoms was exceeding its memory limit. The entry showed the app to be in the foreground and in active use. Then at 9:10am—17 minutes before the crash—"extremely active" use triggered a second log entry about high power usage.

The log data suggests that Huang was a regular player during his morning commute. Log entries for the game appeared during Huang's morning commute on each of the four days preceding his deadly Friday crash.

But there are no log entries in the last 17 minutes of Huang's final trip. NTSB stresses that "the log data does not provide enough information to ascertain whether the Tesla driver was holding the phone or how interactive he was with the game at the time of the crash." We know that Huang was distracted by the game earlier in that morning's commute—and on prior mornings. But we don't know if the game was the reason he didn't notice his car hurtling toward the concrete barrier in the final seconds of his life.

Poor road maintenance may have cost Huang his life

Deadly car crashes often have multiple causes, and that was certainly the case here. Deficiencies in Tesla's software surely contributed to Huang's death, as did Huang's failure to pay attention. But Huang might also still be alive today if California officials had been more proactive about road maintenance.

Walter Huang was far from the first person to crash in this particular spot. In fact, there had been six crashes there in the three years preceding Huang's death—and another one just two months later. Drivers walked away from five of the crashes, but one—a November 2015 crash involving a Lexus SUV—led to the death of its 67-year-old driver. That deadly 2015 crash and Huang's 2018 crash had something in common: they followed closely after another crash in the same spot.

California transportation officials had fitted the concrete barrier with a crash attenuator—the aforementioned accordion-like metal device that's designed to absorb the impact of the vehicle and allow it to come to a (relatively) gradual stop. Each time someone crashes into the barrier, maintenance workers remove the damaged device and install a new one. But the state doesn't get this work done instantly.

The November 2015 crash happened six weeks after a September 2015 crash in the same spot. Without the protection of the crash attenuator, the driver died. Huang's March 2018 crash happened just two weeks after another crash in the same spot. Again, without the protection of the crash attenuator, Huang died.

And there may have been more that transportation officials could have done to prevent crashes in this particular location. The lane lines ahead of the crash location were not well maintained. California officials could have put stripes across the "gore area" that leads up to the concrete lane divider. With better markings, Tesla's Autopilot software might not have gotten confused.