The day after Ben Affleck broke up, Jennifer Garner apologized to her director for her performance

Jennifer Garner apologized for her performance the day after she and ex-husband Ben Affleck agreed to divorce, according to his former director.

Hollywood filmmaker Barry Sonnenfeld, whose credits include Men in Black and The Addams Family, revealed how Garner was 'a bit off' on the last day of filming 2016 fantasy comedy Nine Lives.

In his new memoir, Best Possible Place, Worst Possibilities, Sonnenfeld describes how Garner often traveled to Los Angeles during filming to help the 'troubled' Affleck.

But he was still stunned by the revelation and recalled how he 'burst into tears' when the actress told him. She and Affleck are breaking up.

Despite her own emotional pain, Garner, 52, comforted Sonnenfeld, 71, saying, 'It's going to be okay. It's better'.

The day after Jennifer Garner arrived on the set of her movie Nine Lives, she and then-husband Ben Affleck apologized for being off their game, according to her director.

“I don't know who was confused,” Sonnenfeld writes. 300 extra people wondering what the nice Ms. Garner said to upset Mr. Barry so much, or Jennifer herself being relegated to the role of silent person, somehow, I became the injured party in this debate. .'

Sonnenfeld reveals in the book, a copy of which was obtained by DailyMail.com, that Garner's heartbreak occurred on the set of a film he co-starred in. Kevin Spacey and Christopher Walken.

'Jennifer Garner is a beautiful person inside and out,' she writes. 'Whenever she could, she would fly back to Los Angeles where she had problems with her husband Ben.

'On the last day of filming, Jennifer was a bit withdrawn. We were in a huge ballroom with hundreds of extras. I took her to the side of the room and asked her if everything was alright. Behind her, in the distance, were hundreds of extras.

'She apologized for not being the best. Ben and Jennifer decided to get a divorce the night before. I burst into tears. “It's okay, Barry. It will be alright”, Jennifer assured. “How would that be?” I cried.

“Shhh. It doesn't matter [Garner replied]. It's going to be okay. It's for good”, “I don't think so,” I screamed.

DailyMail.com reported in July that Garner had made a conscious decision to step back after the 'circus' surrounding Affleck's marriage to Jennifer Lopez had recently ended.

Garner and ex-husband Affleck, 51, were married for 10 years before divorcing in 2018. They are parents to Violet, 18, Finn, 15, and Samuel, 12.

Nine Lives, in which she played Nina Brand, a businessman's wife who traps her mind inside her daughter's cat, was released two years before their split was finalized.

Barry Sonnenfeld, who played Garner in Nine Lives, revealed that he apologized for not being up to par on the last day of filming due to his marriage breakup.

Barry Sonnenfeld, who played Garner in Nine Lives, has revealed how he apologized after his performance was not up to par on the last day of filming due to the breakdown of his marriage.

Garner has been married to Affleck for ten years and shares three children together

Garner has been married to Affleck for ten years and shares three children together

Sonnenfeld also reveals in the book that he had issues with Garner's now-disgraced co-star Spacey: 'Kevin was not fun to work with,' he writes. 'He was nasty, unhelpful, critical of the other actors and had a personality that I tried to avoid on set as much as possible.'

Sonnenfeld also revealed in the book that she bumped into comedian Tim Allen on the set of the 2002 comedy flop Big Trouble. 'Tim Settle is a handful,' writes Sonnenfeld. 'He was loud and his jokes were repetitive and sometimes mean.'

Sonnenfeld made the revelation in his new memoir, Best Possible Place, Worst Possible Time, which was obtained by DailyMail.com.

Sonnenfeld made the revelation in his new memoir, Best Possible Place, Worst Possible Time, which was obtained by DailyMail.com.

She recounted the time when Allen whimsically told Renee Russo – one of Hollywood's most successful leading ladies in the 1990s – 'I'm not attracted to her'.

'We were shooting the scene where Renee and Tim meet for the first time,' writes Sonnenfeld. 'It's important that we feel the immediate chemistry between the two.'

The director recalled saying to Alan, 'Hey Tim, you need to get with Rene right away.' 'Why should I be?' asked Tim. 'Well, she's cute, and in the previous scene where you first saw her, she was funny and witty…'

'I'm not attracted to her,' he said of one of the most beautiful women I've ever worked with before that beautiful woman.

'I'll play the charmer, Tim. I swear,' René whispered in a sultry Marilyn Monroe voice. [Allen replied]'It's hard to be attractive if someone isn't attractive.'

Sonnenfeld later recalled telling Allen, 'You're an actor, Tim. As if you were attracted to one of the most beautiful women in the world. OK?' 'I can try,' said Tim helpfully.

Garner, pictured on the red carpet for the film's premiere in 2016, consoled Sonnenfeld about the divorce despite her own heartbreak.

Garner, pictured on the red carpet for the film's premiere in 2016, consoled Sonnenfeld about the divorce despite her own heartbreak.

In the film, Garner plays Nina Brand, a businessman's wife whose mind is trapped inside her daughter's cat. The film premiered two years before Garner and Affleck divorced

In the film, Garner plays Nina Brand, a businessman's wife whose mind is trapped inside her daughter's cat. The film premiered two years before Garner and Affleck divorced

'I apologized to Rene, who was more amused than offended by this mean man, and we finished filming.'

It's not the first time Allen, star of The Santa Claus franchise and TV series Last Man Standing, has been critical in a memoir.

In her tell-all, Love, Pamela, Pamela Anderson said Tim Allen flashed her genitalia 30 years ago on the set of Home Improvement in 1991, when she was 23 and he was 37.

Allen denied the allegations, telling Variety that 'I would never do something like that,' and that the incident 'never happened.'

Sonnenfeld also recounts bumping into Donald Trump on the set of a Macy's Christmas commercial he directed in 2009, which starred Martha Stewart, Queen Latifah, Usher, Mariah Carey and Jessica Simpson.

Sonnenfeld revealed that Garner often returned to Los Angeles during filming because Affleck was having 'issues'.

Sonnenfeld revealed that Garner often returned to Los Angeles during filming because Affleck was having 'issues'.

Sonnenfeld called Tim Allen a 'petty man' for saying that Rene Russo was not attracted to him on the set of the 2002 film Big Trouble.

Sonnenfeld called Tim Allen a 'petty man' for saying that Rene Russo was not attracted to him on the set of the 2002 film Big Trouble.

According to Sonnenfeld, Trump took issue with how he was being filmed, demanding that he be filmed from his 'good side'.

Sonnenfeld recalled Trump saying, 'Find a camera angle that shows my good side, or we're done here, because trust me, you're not shooting me from my bad side, and if you can't do that, I'm leaving.'

After the director thanked him for his time, he described Trump as 'freshly leaving', coming back and saying, 'You can shoot a close-up of the bad side of me.' Sonnenfeld replied, 'No need, Donald. We've moved on. But thanks for coming.'

Best Possible Place, Worst Possible Time: True Stories of a Career in Hollywood Written by Barry Sonnenfeld and published by Hassett Books.