Here’s one of those movies that has some truly hilarious and daring elements, which are surrounded throughout by material that’s either unfunny or totally indefensible.

An unlikely labor of love from actor Dax Shepard- who wrote, co-directed and stars- is meant to combine romantic comedy with a crime plot that includes a half-dozen kick-ass car chases. The romance stuff works, as does the action, but the problem is that the elements don’t fit especially well together. When the comedy is on, it’s on, but some of the gags are just plain painful. And on top of that, the tone is just all over the place.

Shepard – like Ben Affleck in “The Town” before him- stars in a movie that he wrote and directed as a lifelong criminal who’s a really REALLY nice guy. Living in witness protection in a small California town with girlfriend Kristen Bell, Shepard is forced to return to Los Angeles, putting him on a collision course with the criminals- led by a laughably dreadlocked Bradley Cooper- against whom he testified.

There are quite a few elements that work quite well. The dialogue is often hilarious, and the chemistry between real-life couple Shepard and Bell is top-notch. There are also some very funny small performances, from Michael Rosenbaum as a stalking ex-boyfriend to a very game Kristin Chenowith as Bell’s boss to Beau Bridges as Shepard’s father. Tom Arnold shows up to give his once-a-decade good movie performance, as U.S. marshal who’s equally inept with both a gun and a car.

But when things go wrong they go VERY wrong. I’m thinking specifically of an absolutely odious scene in which Cooper attacks a large black man, drags him on the ground on a leash, makes him eat dog food and then steals his dog. I get that it’s supposed to establish Cooper’s villain character as violent and immoral, but come on- the lynching imagery is excessive, especially considering the scene has no payoff.

Then there’s the rape jokes. Sure, the filmmakers had no way of knowing that, right before the movie’s release, there’d be a huge, culture-wide debate about the propriety of jokes about rape.

But the movie is just full of them, including a sequence in which the movie stops dead in its tracks so Shepard and Cooper can talk for ten minutes about the latter’s jailhouse rape and what race his assailant was. I realize Shepard already starred in an entire movie- 2006’s “Let’s Go to Prison”- that was nothing but wall-to-wall prison rape jokes. But the repetition doesn’t make the joke any funnier.

There’s also a gag in which a car being driven by one gay character rear-ends the car of another. Whether or not you find that funny will say a lot about what you think of the movie overall.

The missed opportunities are plentiful as well. That Bell is a conflict resolution professor is a promising comedic element, one of many, that the movie never really does anything with. And the closing tag is both unfunny and totally nonsensical, the worst possible payoff to the movie that came before.

Shepard and filmmaking partner David Palmer actually co-directed another film two years ago called “Brother’s Justice,” described by Wikipedia as ” a satirical mockumentary about Dax Shepard’s transformation from comedian to a silver screen martial arts star [in which] Shepard exploits any and all Hollywood connections on his quest to become the next Chuck Norris.The film never got much of a release and I’d never ever heard of it until I looked up Shepard’s IMDB page while writing this review. But it sounds like a much funnier and more clever movie than “Hit & Run.”