The death of Glee star Cory Monteith has shocked and devastated fans of the hit show. Beyond the heartache however, the passing of the 31-year-old, who had a history of drug use, has left producers of the song and dance smash in the mother of all binds.
With cameras set to roll on season five, and the opening two episodes already penned, how does Glee soldier on? Is it possible to negotiate the tragic demise of one of your most high-profile actors without seeming stony hearted and obsessed with the bottom line?
As of now, bosses at Fox television are staying silent. As is Glee creator Ryan Murphy, who cast Monteith as likeable jock Finn Hudson.
There has been speculation that Fox will opt to re-cast the character – but would 'Gleeks', as the series diehard devotees describe themselves, really accept an interloper in Monteith's shoes? Amid already declining ratings, that sort of brazen parlour trick would surely spell final curtains for the Glee, a feel-good affair set in a high-school musical-drama club.
Accounting for the out-of-the-blue exit of a beloved character is a headache television faces with surprisingly frequency. Just this year, the scriptwriters at Coronation Street were required to hurriedly cover over the absence of resident bit o' rough Kevin Webster and in-house fuddy-duddy Ken Barlowafter actor Michael Le Vell was charged with child sexual offences and actor Bill Roache was charged with raping a schoolgirl more than 45 years ago.
In particular, the abrupt departure of 81-year-old Roache, suspended, like Le Vell, until further notice, is believed to have put huge pressure on the Corrie script department. He was already lined up for a high-profile storyline centred around his relationship with daughter Tracy and granddaughter Amy.
Of course, replacing Ken Barlow arguably pales compared to the challenge of finding someone to fill the boots of one-man controversy generator Charlie Sheen, who talked himself out of the highest paying gig on television by sparking a feud with the creators of Two And A Half Men.
In 2011, Sheen's increasingly erratic behaviour caused a rift with Two and a Half Men instigator Chuck Lorre. In a rambling, quasi-incoherent radio interview the $14m-a-year actor dismissed Lorre as a 'stupid little man', prompting the CBS network to cut all ties.
This presented the huge conundrum of attempting to explain the actor's absence.
So, at the start of season nine, Sheen's character Charlie Harper is dispatched off-screen in Paris, a death outlined in fairly lurid detail (after he is struck by a subway train, his body is described as popping like a 'balloon full of meat').
Sometimes screen-writers see an actor's death not as a challenge but an opportunity. After Larry Hagman passed away in November 2012, having just begun reprising the iconic character of JR Ewing in a reboot of Dallas, the show runners spotted an opening.
Hagman died as a result of complications from leukemia. On TV, however, he is shot twice, prompting a 'Who Killed JR' plot-line and a ratings-winning funeral scene in which past cast members such as Patrick Duffy and Linda Gray turned up to pay final respects.
Then there are the on-screen deaths that pale compared to reality.
Though not well known here, there was shock in America when in 1998 actor Phil Hartman was shot by his wife, who proceeded to turn the gun on herself. Hartman was a star of the high-rating drama Newsradio, and passed away as season five was due to start shooting. In comparison to his violent real-life end, the producers gave his character a comparatively peaceful farewell, with his sudden absence blamed on a heart attack.
The death of movie actors presents different challenges. Film tends to be more high profile than TV, so you can't blithely write someone out of the action and hope nobody notices. Often the answer tends to be stitched together with the cinematic equivalent of scotch tape and blu-tac.
Oliver Reed's demise from a heart attack in the middle of Gladiator was clumsily covered up by a lookalike shot unconvincingly from behind with Reed's feature superimposed via $3.2m worth of computer effects.
An actor's death can have deeper complications too. As well as starring in Terry Gilliam's fantasy movie The Imaginarium of Doctor Parnassus, Heath Ledger has been a major cheerleader for the project. It was his involvement that had helped Gilliam secure financing. Receiving word that Ledger had died in January 2008, he proclaimed "the film's over, it's as simple as that".
The ultimate solution was suitably fantastical. Johnny Depp, Colin Farrell and Jude Law, waiving their usual multi-million dollar fees, agreed to step in and play different 'aspects' of Ledger's character.
It was perhaps the smartest possible recourse. The whole world knew Ledger was dead – why pretend otherwise?
It is a lesson the producers of Glee will doubtless be reflecting on as they wrestle with how to deal with Monteith's tragic passing – even as they abide by that timeless entertainment industry maxim that the show must go on.