There's a scene early in "The Heat," where it's possible to glimpse where things could have gone horribly wrong.
For what seems like an eternity, star Melissa McCarthy wriggles her way out of a parked car through the window, spewing profanity all the way.
It's a cheap laugh - as if the filmmakers are sitting next to you, grinding their elbows into your side: "Get it?! She's overweight and can't fit easily through the window!" - and one that demeans the actor almost as much as the audience.
Thankfully, that sort of lowest-common-denominator humor is kept to a minimum throughout "The Heat," which instead relies on the tart chemistry between McCarthy and Sandra Bullock.
Directed by Paul Feig (reuniting with McCarthy after the blockbuster "Bridesmaids"), "The Heat" is a familiar riff on the buddy-cop formula and is a much stronger showcase for emerging superstar McCarthy's talents than the abysmal "Identity Thief," released earlier this year.
Bullock stars as no-nonsense FBI special agent Sarah Ashburn (the polar opposite of her klutzy "Miss Congeniality" character), who is dispatched to Boston to track down and capture a brutal drug lord, whose product is spreading through the city like a virus.
It's not long before Sarah crosses paths with rough-and-tumble Boston cop Shannon Mullins (McCarthy), and the inevitable personality clash ensues.
Along the way, Sarah and Shannon tangle with hard-headed DEA agents (Dan Bakkedahl and Taran Killam), exasperated bosses (Demian Bichir and Thomas F. Wilson), smarmy villains (Michael McDonald) and personality quirks that often threaten to derail the investigation entirely.
Written by Katie Dippold (making her feature debut after stints on TV's "Parks and Recreation" and "Mad TV"), the narrative doesn't break any new ground - if you've seen any classic buddy-cop comedy-drama in the last 30 years, it's not too difficult to figure out how things will end up. Yet, among some subtle observations about gender inequality, the film makes sure to leave plenty of breathing room for McCarthy, Bullock and the largely game cast of supporting players to riff on all sorts of ridiculousness.
Indeed, an entire movie could be made about the characters populating the Mullins family (one of whom is played by New Kids on the Block's Joey McIntyre), whose appearance routinely guarantees roars of laughter throughout the film.
The centerpiece of "The Heat," however, is a long, seemingly totally improvised evening that Sarah and Shannon spend in a seedy Boston bar, drinking themselves silly and indulging in karaoke, among other ill-advised pursuits.
It's a gem of messy, go-for-broke comedy, full of laugh-out-loud moments, and it underscores how McCarthy, in particular, can leave you gasping for air with the right material.
Bullock likewise shines, reminding viewers of her natural knack for comedy, even if this particular brand is a bit rougher and raunchier than her usual fare.