I need to tell you up front that “Envy” is not funny, which is generally a major liability for a comedy. But I found it strangely watchable. It didn’t annoy me or bore me the way most unfunny comedies do. Instead, I felt compelled to see it through: So much of what was taking place onscreen was so odd and so completely NOT funny that it became, in a way, interesting.

It also has Christopher Walken being Christopher Walken — i.e., bizarre, non-sequitur-ish and entertaining — and I find that hard to resist. In fact, Walken, as a long-haired bum who befriends Ben Stiller’s character, is the film’s only legitimate bright spot.

Stiller plays Tim Dingman, uptight denizen of a dingy L.A. suburb whose best friend, co-worker and across-the-street neighbor Nick Vanderpark (Jack Black) invents a spray that makes dog droppings disappear on contact. Nick, a scatterbrained slacker, becomes unfathomably wealthy, and Tim is nearly incapacitated with jealousy (and regret, since Nick offered him a partnership early on, when the idea was still just an insane pipe dream).

It is J-Man (Walken), whom Tim meets in a bar, who advises him to act on his jealousy, to “stir things up,” as he puts it. Rather accidentally, Tim kills Nick’s horse, making this the second film this year (after “Starsky & Hutch”) to feature Ben Stiller murdering a horse; PETA might want to keep an eye on him. The coverup of the horse tragedy, and the inherent difficulty in hiding an equine corpse, leads to many hijinks and shenanigans, all while Nick remains oblivious to Tim’s slow-boiling rage and envy.

This is all well and good as the premise for a black comedy, but as written by first-timer Steve Adams and directed by Barry “he ought to know better” Levinson, it reeks of desperation. But rather than becoming frantic in their attempts to mine laughs from the hollow screenplay, the cast remains steadfastly reined-in, proceeding diligently through all the steps, all the forced wackiness, all the imbecility, like troupers — like people who are good enough at what they do to know that there’s no WAY this crap is going to be funny, so there’s no sense in overacting. Such restraint is admirable, and goes a long way toward making the film tolerable, if not exactly good. Which is to say, I can’t really recommend it, but I didn’t loathe the time I spent watching it, either.

C- (1 hr., 39 min.; PG-13, one F-word and a lot of S-words.)