Warner Bros. has high hopes for “The Flash.”

The upcoming comic book adventure, which completed production in 2021 and is scheduled to debut in theaters in 2023, has been extraordinarily well received in early test screenings, according to sources close to the movie. Given DC Films’ inconsistent track record in fielding commercial hits, initial reception that “The Flash” could be a crowd-pleasing blockbuster is not only a relief, but a necessity to succeed at the box office.

And at a time when superhero adaptations are largely populated by straight actors, Ezra Miller, who stars in “The Flash” and is nonbinary and queer, feels like a refreshingly progressive choice to headline a big all-audience summer movie.

There’s only one glaring issue: Miller can’t seem to stay out of trouble. In recent months, the actor has been arrested or taken into custody several times for harassment, disorderly conduct and a traffic violation. Around the same time, two Hawaii residents filed a temporary restraining order against Miller after the actor allegedly broke into the couple’s bedroom and tried to steal their passports and wallets. Though the restraining order was later dropped, their continued behavior has prompted serious unease about the people they have endangered, as well as Miller’s own health and well-being. Those incidents took place nearly two years after footage surfaced of Miller appearing to choke a woman outside a bar in Iceland. It’s hardly the kind of attention that a studio wants for the star of a $200 million-budgeted tentpole.

Those eyebrow-raising events have led to speculation about Warner Bros.’ plans for the blockbuster-hopeful, which serves as the first solo film for Barry Allen, a.k.a. the Scarlet Speedster, a.k.a. the Flash. Would the studio actually replace Miller with another actor? Will it jettison the film to HBO Max in an attempt to limit potentially negative fanfare that could accompany a theatrical release? Or will Warner Bros. keep the movie in theaters on June 23, 2023 as planned?

Barring unforeseen developments, sources say, Warners is barreling ahead with intention to give the superhero film the full blockbuster treatment. “The Flash” simply cost too much money to scrap the project entirely and it likely will not generate the revenues needed to turn a profit without playing in theaters. For option three to happen without triggering a major backlash, Miller would need to be on their best behavior. And that’s a big question, because so far Miller has been dogged by one controversy after another, leaving collaborators concerned about the actor’s welfare.

Compounding matters, news broke on Wednesday that veteran film executives Michael De Luca and Pamela Abdy are replacing Toby Emmerich as chairs of Warner Bros. Motion Picture Group. Though the quality of the comic book film franchise has improved under DC chief Walter Hamada’s tenure, any leadership changes at a studio puts the previous regime’s movie slate in limbo. And with Warner Bros. Discovery CEO David Zaslov keeping a tight grip on cost controls at the company, the marketing spend for a title as big as “The Flash” remains a question.

“There are a myriad of directions that Warner Bros. could go,” says Jeff Bock, a box office analyst with Exhibitor Relations. “Choosing the right one is paramount for the future of DC.”

Since the controversy surrounds Miller and not the movie itself, some DC fans wondered if Grant Gustin, who plays the title character in the ongoing and unrelated CW series “The Flash,” would be recast in the big-screen version. It’s a rare practice, one that has been used sparingly in the past with Christopher Plummer (replacing Kevin Spacey) in 2017’s “All the Money in the World” and Mads Mikkelsen (taking over for Johnny Depp as the dark wizard Gellert Grindelwald in 2022’s “Fantastic Beasts: The Secrets of Dumbledore”). However, in the case of “All the Money in the World,” Spacey only had a supporting part, and in “Fantastic Beasts 3,” Depp had only shot one sequence so Mikkelsen did not need to replicate much footage.

With “The Flash,” insiders say it would not be possible to replace Miller without reshooting the entire movie. They are in just about every scene, and there is not enough digital technology in existence to configure that magic without going back to square one. And redoing the entire film is not a realistic proposition for any movie — much less one that wrapped production months ago and already cost hundreds of millions.

In the past, actors who found themselves in hot water but did not get scratched from the call sheet have effectively been hidden on press tours in the hopes that the general public won’t notice their absence. Recently, Ansel Elgort, who played Tony in Steven Spielberg’s “West Side Story” remake, took that route in the wake of a sexual assault allegation levied against the actor in 2020. Ditto Armie Hammer, who starred in Disney and 20th Century’s “Death on the Nile” and faced sexual abuse allegations after filming was wrapped. For “West Side Story,” Elgort’s co-stars Rachel Zegler, Ariana DeBose and Rita Moreno successfully steered the film’s press tour. With “Death on the Nile,” there was a sense Hammer (who did not do any press for the ensemble-heavy movie) wasn’t enough of a household name for people to know about the allegations.

Sources close to “The Flash” believe that Miller is similarly under-the-radar, despite credits like the film adaptation of “The Perks of Being a Wallflower, “Batman v Superman: Dawn of Justice” and “Justice League” and three “Fantastic Beasts” installments. Already, Miller’s streak of arrests had forced Warner Bros. to downplay the actor’s involvement in “Fantastic Beasts: The Secrets of Dumbledore,” which opened in theaters in April.

But akin to Hammer in “Death on the Nile,” Miller played one of several main characters in the “Harry Potter” spinoff, meaning promotional efforts did not land squarely on their shoulders. The same cannot be said about “The Flash.” Sure, the movie also features big names like Ben Affleck and Michael Keaton. But a studio cannot effectively promote a big-budget blockbuster without the film’s star.

However, analysts have pointed out that, with comic book heroes, the character itself is often a bigger star than the actor wearing the Lycra suit.

“The thing about superheroes is… it doesn’t really matter who is under the mask,” Bock says. “You can plug and play different actors in those roles.” Though Miller’s take on the character has appeared in several DC-mashups, like “Justice League,” Bock argues they’re not “the face of The Flash yet.” In other words, “Ezra is not Robert Downey Jr. as Iron Man.”

Even before Miller made headlines for the wrong reasons, “The Flash” has been plagued with a long gestation and several starts and stops. In the time since Miller was cast in 2014, several directors, including Seth Grahame-Smith, Rick Famuyiwa and the duo of John Francis Daley and Jonathan Goldstein were attached to and then departed the production over creative differences. “It” filmmaker Andy Muschietti came on board in 2019 and completed the job.

Those behind-the-scenes headaches, as well as the pandemic, resulted in several release date delays. But the studio cannot indefinitely postpone “The Flash.” The new calendar slot in mid-2023 should, in theory, give Warner Bros. enough time to determine the best course of action.

The way the studio sees it, “The Flash” is more than a standard superhero origin story. The movie, which begins as Barry Allen travels back in time to prevent his mother’s murder, cracks open the DC multiverse, paving way for Batmans from alternate realities (namely, Keaton and Affleck) to overlap with Miller’s Spandex-clad hero. Just think of the potential sequels, spinoffs and team-ups that could inspire.

“The Flash” also gives Warners another viable contender on its mission to keep up with Disney’s commercially unrivaled Marvel Cinematic Universe. DC has several properties on schedule in 2022 and beyond, including “Shazam: Fury of the Gods,” “Aquaman 2” and “DC League of Super-Pets.” But crossover events like “The Flash” have become especially exciting to fans, especially after 2018’s “Spider-Man: Into the Spider-Verse” successfully introduced to mainstream audiences the concept of the multiverse — and blockbuster ticket sales for 2021’s “Spider-Man: No Way Home” and 2022’s “Doctor Strange in the Multiverse of Madness” confirmed that moviegoers really, really like the concept.

There’s a timeline in which Miller does, in fact, get their act together and “The Flash” is able to seamlessly open while charming critics and fans alike. Though Miller’s behavior could certainly force Warners to make “The Flash” a one-and-done project, it’s not intended to be a one-off adventure. Despite it all, Warner Bros. remains enthusiastic about “The Flash,” believing the film to be one of DC’s strongest theatrical efforts.

In the meantime, the actor tasked with bringing the Flash to life on the big screen may be imperiling the future of the franchise and the studio’s willingness to be in the Ezra Miller business. But there’s reason to believe the Flash can keep running, even if Miller has to hang up their shoes.