Jackie Burke, an aging stand-up comic played by Robert De Niro in “The Comedian,” may be in his 60s, but he hasn’t lost his gift for insults. Standing next to a waiter carrying a tray of covered food, Burke decides to guess the dish. “Egg foo young?” he says. The waiter, you see, is Asian.

That lead balloon of a joke sums up the problems with “The Comedian.” Its protagonist tries to walk the line between offending sensibilities and defusing tensions, but that’s a balancing act very few standups — Lenny Bruce and Chris Rock come to mind — can pull off. As Jackie, De Niro has fine timing and confident delivery (he had practice in 1983’s “King of Comedy”), but he lacks material. He’s also stuck in a meandering, semi-romantic storyline that never pays off.

advertisement | advertise on newsday

That’s too bad, because “The Comedian” starts on a high note. Jackie, the former star of the vintage TV show “Eddie’s Home” — clearly modeled on “The Honeymooners,” starring Jackie Gleason — has fallen so far that he’s working a low-paying gig at Governor’s Comedy Cabaret (here set in Hicksville; the real club, where the scene was filmed, is in Levittown). An altercation with a heckler earns Jackie a community-service stint at a homeless shelter, which is where he meets Harmony, a co-worker. Played by Leslie Mann in her usual mode — endearing and sexy but slightly helpless — Harmony could use a few laughs now that her marriage has ended.

Directed by Taylor Hackford (“Ray”), “The Comedian” hums along nicely for a stretch as Jackie whisks Harmony through the New York City comedy scene. Jackie’s battle of wits with stand-up Jessica Kirson (a West Hempstead comic who consulted on the film) is a nice moment, and there are appealing turns from Edie Falco as Jackie’s manager and Danny DeVito as his brother. Among the many comedy-world cameos are Richard Belzer and Billy Crystal. The jazzy score by Terence Blanchard adds a sophisticated touch.

In the problem column, however, Jackie’s politically incorrect jokes rarely stick their landings, his relationship with Harmony zigzags confusingly and his antagonistic relationship with her wealthy father (Harvey Keitel) feels like padding on a very thin story. “The Comedian” has its moments of wit and charm, but more often falls flat.