Few releases this year are as critic-proof as this one; “Iron Man 3” will be a huge success no matter what anyone writes about it. But the unhappy fact is that compared to “Thor,” “Captain America” and “The Avengers” (just to mention the recent Marvel super-hero flicks), which were such good fun, this dark, gloomy, chaotic and basically misanthropic film is a real bummer—Iron Man in Dark Knight territory, and all the worse for it.

The script, by director Shane Black and Drew Pearce, is set shortly after the events of “The Avengers,” though there’s a brief prologue referencing a New Year’s party back in 1999. After saving the world, though seemingly his old, snarky Robert Downey, Jr., self, Tony Stark is actually in emotional turmoil, suffering from insomnia and panic attacks. That’s hardly improved when his firm’s security chief, Happy (Jon Favreau)—an intense doofus whom any other boss would surely fire—is seriously injured in an explosion at the Hollywood Chinese Theatre, where he’s tailed a suspicious-looking guy. The blast is apparently connected to a series of terrorist attacks masterminded by The Mandarin (Ben Kingsley), who periodically coopts the world’s broadcasting facilities to issue threats against the US President (William Sadler). Happy’s condition leads Stark to issue an invitation to The Mandarin to come after him, which leads to an assault on his mountaintop mansion and initiates his quest for revenge, despite reports of his own demise and the loss of all his technological goodies, including his Iron Man duds.

It wouldn’t be fair to reveal too much about what follows. Suffice it to say that the complications include an Iron Man clone in the service of the state and called Iron Patriot (Don Cheadle); Tony’s partner both in business and at home, the lovely Pepper (Gwyneth Paltrow); Maya (Rebecca Hall), Stark’s 1999 girlfriend who’s into advanced genetic research; and Aldrich Killian (Guy Pearce), an odd scientist whose pet project has to do with experiments intended to restore lost limbs and other appendages to the ill and injured.

But all these elements are mixed into a brew that’s, with few exceptions, almost unrelievedly grim and curiously unpleasant. The overall world-view is one of deep, pervasive corruption that extends to the highest levels, and apart from Stark’s immediate circle, there aren’t many characters one would find particularly admirable. Tony is out of suit for much of the running-time, and subjected to pummeling after pummeling so that Downey, despite all the quips, comes to seem like a human punching-bag when he’s not hung up on chains to endure the villain’s mockery. But even that’s a modest indignity compared to what happens to Paltrow. She’s captured and trussed up on a torture table while extravagantly suffering the application of the villain’s torments, turned into a wimpering damsel-in-distress role that’s really beneath the dignity of a fine actress.

And then there are the explosions and noise—a cascade of battles, gunfights, bombings and airborne assaults, culminating in a long dockside confrontation involving Downey, Cheadle, Paltrow, scads of Iron man suits and a small army of super-powered humans who can perk back to life after being terminated with extreme prejudice. Apart from the fact that few things in this sort of action movie are duller and less interesting than villains that can repeatedly regenerate (according to principles that the film never bothers to explain adequately, since sometimes they just don’t), the avalanche of effects-heavy sequences quickly grows tiresome, especially since they’re not choreographed or edited with any special panache and are accompanied by Brian Tyler’s ear-splitting score.

Nonetheless there are oases of pleasure in the desert. The scenes with Kingsley, played at full throttle, are quite amusing, especially since they also provide one of the script’s best twists. And a Tennessee-set sequence in which Stark is compelled to join up with a smart-aleck kid (engaging Ty Simpkins, an adept scene-stealer) is satisfying, not least because it avoids succumbing to the sentimentality the encounter invites (though the part of the coda referring back to it comes off as rather lame).

Technically “Iron Man 3” is accomplished, even if it doesn’t really break any new ground. (A sequence in which Iron Man saves a baker’s dozen of passengers falling from an injured plane isn’t much beyond the sort of stuff that’s been done more excitingly in James Bond movies.) But cinematographer John Toll, production designer Bill Brzeski and art director Brian Stultz have clearly done yeoman work, though the dankness of atmosphere after the first reel or so mutes the impact of their effort.

There’s no doubt that this will be an early-summer blockbuster and rake in many hundreds of million of dollars. But in due course it’s likely to fall into the pattern of pictures like “Return of the Jedi” and “Spiderman 3”—third installments of franchises that were originally welcomed enthusiastically but, as time passed, came to be viewed even by fans as disappointments.