Sometimes I amuse myself with this little game: figure out why an actor decided to sign on to a particular film.

It's often dismayingly easy, whether the actor is bad (Chris Tucker = the money), brilliant (Philip Seymour Hoffman = the money), halfway decent (Christopher Lee = the money, the money, personal affection for J.R.R. Tolkien. And the money), or Marlon Brando (funding his abortive dial-a-fart phoneline).* But there are a few actors whose taste is usually so impeccably idiosyncratic that it's actually a lot of fun; Johnny Depp is a good example, or Willem Dafoe.

Perhaps my favorite, though, is Ryan Gosling, the notoriously choosy 26-year-old whose every film up until this spring's Fracture had an obvious appeal based somewhere in his desire to grow and stretch and generally make a name for himself as a very good and perhaps too pretentious indie demigod. And so I come in my roundabout way to Lars and the Real Girl, which represents a much-needed return to not-trashy-procedural form for the actor, and the first time in his career where he gets to do something in the way of comedy, although it is very tentative and wry and kind of unfunny indie comedy. You know how it is.

Gosling plays Lars Lindstrom (the surname given only in the credits), a young man of tragically delicate sensibility in the far northern reaches of Wisconsin, living in the garage of his old family home now occupied by his brother Gus (Paul Schneider) and sister-in-law Karin (Emily Mortimer), and doing all he possibly can to avoid any human contact. It comes to pass that Lars orders a fully-functional sex doll from a website recommended to him by his utterly sleazy cubicle-mate Kurt (Maxwell McCabe-Lokos), which he names "Bianca" and proceeds to treat in every way like an actual human, explaining her immobility as paraplegia and her muteness as lack of facility with English, and throwing his family into a state of panic, tempered when the local GP/psychologist Dr. Dagmar Berman (Patricia Clarkson) advises Gus and Karin, as well as the rest of the close-knit Lutheran community, to play along until Lars can work out whatever issues are driving his delusion.

It is my belief that the hook that drew Gosling to the project is that Lars is basically unplayable, insofar as he is basically not a human. Mind you, the generally fuzzy humanism that courses through the community in a sort of "Waking Ned Devine by way of Frank Capra" mashup, is not the stuff of documentarylike realism, but the townspeople populating the edges of the film aren't the central interest, and their behavior is entirely predicated on Lars; if we can believe his persona and his relationship to Bianca, then the story has at least a chance to succeed, and if we do not, it has no hope whatsoever.

Bless him, Gosling makes it work, by recognising that a) this isn't realism, nor even poetic realism, but a fable (the film's resolute sexlessness insists on that point); b) the key to the humor is keeping the character tiny, and not like a sketch-comedy figure; and c) the doll is not a prop, but an actor, and a fairly central one, and should be played against like an actor. What emerges is the finest man/inanimate object relationship in a movie since Tom Hanks made us weep for a volleyball in Cast Away.

I don't suppose there was ever any hope of Lars turning into a realistic human being, but Gosling's performance doesn't really require that. What he does instead is take a bundle of highly erratic quirks and synthesise them into a man in full, who is instantly recognisable even though we've never met anyone like him. Sometimes his physical gestures come across just a tiny bit too much like an acting exercise, as does his newly-acquired pudginess and mustache, but considering how elliptically the script draws the character, the actor's work is beyond admirable.

With that in the center, the performances around him are all of the highest-caliber; Emily Mortimer stands out not just for being one of the most famous faces in the film but also for giving what is by my reckoning her career-best performance as a neurotic, mothering presence in Lars's life. She's frankly the only role whose behavior seems entirely natural, and that helps, but the bulk of the character is due entirely to the actress's face, and the wonderful mixture of fear and neediness and optimism she wears throughout. And then there are all of the tiny roles, which would be endlessly tedious to list, so let us suffice it to say that there isn't a false note in the film, although the typically magisterial Patricia Clarkson is coasting a little bit.

All of those wonderful performances are the crux of the movie, and its primary success; for there are significant problems with the story as a story, and not just because it is too charming for its own good. I am genuinely unsure who gets more blame for this, Six Feet Under veteran Nancy Oliver in her feature writing debut or director Craig Gillespie in his own feature debut (he made Mr. Woodcock after this was complete, for what that's worth), but something about the story just doesn't quite hang together. It's a film full of individual tiny moments that all work taken as modules - some better than others, no doubt - but when they're all assembled it doesn't quite feel like a project made from whole cloth. A big part of this is the curious insistence on fading to black out of nearly every scene (those fades, they are tempting, but they are so powerfully dangerous!), which serves to pluck each scene out of the context of the rest. Another part is that the vignettes, for I can think of nothing else to call them, are mostly arbitrarily laid together, particularly in the overly-long middle sequence where the town absorbs Bianca into their daily routines at church, shopping, ladies' night, et cetera. There's nothing leading from moment to moment, no sense that the film is proceeding as it must, but simply as it is. That sort of leisurely storytelling is not typically something I complain about, but it is also not a common feature of scripts with such an outlandish high-concept hook as Lars and the Real Girl.

The other stumbling block is the humor: this is an awfully precious film. Sometimes it's very subtly done, but sometimes it hammers you over the head, mostly in the scenes involving Lars's co-worker with an incredibly cute schoolgirl-esque crush, Margo (Kelli Garner). Gillespie and Gosling suck a lot of the treacle out by separating the most obvious gags with moments of silence, and very successfully, too: there's a lot of silence in the film, and that's probably when it's at its best. But the cutesiest moments are cloying, and the sugar content is made significantly worse by how unnaturally sweet every character in the film is to Lars. There's nice that shades into sickening, and that is bad for comedy unless you are a tween girl who dots her i's with hearts. Still, the actors take some of the edge off - or rather, they put some edge back on - and while it's not the best way for a film to triumph, only a crank would complain about an actors' showcase when it turns out this well.