“Tammy,” Melissa McCarthy’s first starring vehicle, is a shambling road trip that travels from broad slapstick to goopy sentimentality. It’s more a pile of incidents than a story. Without a guiding focus, McCarthy’s boisterous comic energy runs amok. The result barely holds together as a movie.

Directed by her husband, Ben Falcone, and co-written by the couple, “Tammy” follows the misadventures of a Midwestern fast-food worker whom we meet on a really bad day. In the course of an hour she wrecks her car, gets fired from her burger-joint job and discovers her husband is having an affair with a neighbor.

A run of bad luck typically will put us on the side of the underdog, but here we’re not given a defined character to identify with. Tammy has traits — she’s blustering, vulgar and essentially good-hearted, the female Chris Farley — but the script gives us no sense of her history.

When she discovers her husband’s affair, we’re primed for a confrontation, or shamefaced apologies, something of interest. After all, he’s played by Nat Faxon and the other woman is Toni Collette. Frustratingly, the script gives us no clue about what made him and Tammy a couple or pushed them apart. It’s just another random bummer. Tammy’s collision with a deer had more emotional weight.

Running away from her troubles, Tammy and her hard-drinking grandma Pearl (Susan Sarandon) take to the highway. Pearl was a wild thing in her day, a ’70s rock ’n’ roll groupie whose personality may have influenced Tammy’s supersized appetites and undisciplined attitude. That’s pure conjecture; the screenplay never grapples with the idea in any meaningful way.

Together the pair visit country bars, campgrounds, jail and long-lost relatives. Everywhere along the way they meet fine performers in throwaway cameos. There’s Dan Aykroyd and Allison Janney as Tammy’s gruff parents; Gary Cole and Mark Duplass as a father-son duo who might be right for Pearl and Tammy; Kathy Bates and Sandra Oh as a wealthy lesbian relation and her partner.

Bates alone gets a worthwhile scene to play, a “get hold of yourself, girl” lecture to Tammy, and she knocks it out of the park. But the overall design of her character makes no sense. She’s a pillar of the community one moment and a CSI-level expert on evading police and destroying evidence the next.

The film has been sold as if it’s a zany crime comedy focusing on a stickup artist. The sequence where Tammy knocks over a fast-food franchise is just another aside in the lumpy narrative. The story doesn’t use the incident to make a point. It’s just another thing that happens in a story that stumbles along until it stops, on the theory that every list of things has to end somewhere.

There’s a lot of food-related humor in the film. In those terms, “Tammy” is toxically stale, like one of those decaying foodstuffs you dread finding in the back of your refrigerator. When forced to deal with it, you take salad tongs in hand, hold it at arm’s length, and drop it in the trash. We all love Melissa McCarthy. But we mustn’t enable her.