The Winchester Mansion in San Jose, built by the widow of the famous firearms manufacturer and long reputed to be haunted, provides the locus of this horror film in which Helen Mirren engages in artistic slumming, presumably in expectation of a substantial paycheck. As far as horror movies go nowadays, it’s relatively restrained and stylish, but also pretty silly.

The visual moodiness is explained by the fact that some exteriors were actually shot at the so-called “mystery mansion,” which was built over some four decades—a massive structure with a labyrinthine interior where rooms are situated willy-nilly and stairways lead nowhere, and the interiors, thanks to production designer Matthew Putland and cinematographer Ben Nott, have a lush but creepy look.

But once past the slick surface, the movie proves a thoroughly ramshackle affair. The script, by co-directors Michael and Peter Spierig and Tom Vaughan, accepts one of the often-proffered explanations behind the house’s intricate configurations: widow Sarah Winchester (Mirren), who inherited the fortune her husband had made selling guns, intended it as a place that could contain the spirits of all those killed by Winchester products, helping some find closure but permanently imprisoning those intent on avenging their deaths.

In this take on that legend, in 1906—over two decades after she began work on the house—alienist Dr. Eric Price (Jason Clarke) is hired by the Winchester Rifle Company to examine Mrs. Winchester and determine whether she is mentally fit to continue managing the company. What the officers don’t know is that Price is hooked on Laudanum, an opium derivative he takes “medicinally” to help him deal with the profound grief he harbors over the death of his wife Ruby (Laura Brent), who—you guessed it—committed suicide with a gun.

Nonetheless Price shows up at the mansion a rationalistic skeptic, only to have his confidence shaken by glimpses of horrid creatures wandering about the place—there are loads of cheap jump scares, always accompanied by a blast of music and sound effects—and by the periodic possession of Sarah’s young grandnephew Henry (Finn Scicluna-O’Prey), who’s visiting with his prissy mother (Sarah Snook), by some demonic force that prods him alternately to kill either himself or Sarah.

(Spoiler Alert! Do not read this paragraph if you want to avoid some important plot points.) Gradually Price comes to believe that Sarah, who has opened up to him, is right, and that Henry must be protected. Events soon make clear that the malignant entity causing the problems is a fellow who, distraught over the death of his brothers in the Civil War, had shot up the Winchester offices before being killed himself, and is apparently still out for blood. But just as that is revealed, the great San Francisco earthquake hits, rocking the house and releasing all the discontented souls Sarah had incarcerated in those weird rooms.

All ends chaotically as, in the catastrophe caused by the 1906 earthquake, Sarah and Price must overcome their personal demons to deal with the immediate spectral threat. For the moment the danger is suppressed, and Sarah, cleared of suspicion of mental disorder, vows to rebuild and continue her fight against the family curse.

There’s the germ of an interesting idea in “Winchester”—that manufacturers of guns should be justifiably concerned that they might pay a price for the carnage their product causes—but it’s treated with such ineptitude that it makes little impression. The Spierigs’ work, both as writers and directors, lacks any sense of urgency, and their division of the narrative—into a long introduction filled with stilted drawing-room conversation, followed by a frantic and cluttered conclusion—merges tedium and absurdity in approximately equal measure. Clarke is pretty much a cipher as the guy who’s meant to be the audience surrogate, but Mirren is always worth watching, even when, as here, the material doesn’t justify her effort to bring some dignity to it.

The aerial shots of the Winchester house—even though there are entirely too many of them—suggest that it might be an interesting place to visit. (It’s open to the public.) Sadly, the rest of “Winchester” provides little incentive to go there.