John Cazale was dying of Stage IV lung cancer during filming of The Deer Hunter in late 1977, and in fact was so sick that all of his scenes were filmed first, in case he didn’t survive all the way through production.
Cazale did in fact die before the film’s release, on March 13, 1978, age 42; his fiancee Meryl Streep was by his side. Streep, who played the role of Linda in the film, took the part specifically to be close to Cazale in his last days. The film opened in theaters in December 1978.
Streep and Cazale in The Deer Hunter: