Here's the crazy thing about Charlie Wilson's War: I liked it, in fact I liked it quite a lot, and all I can think to talk about is its flaws.

The chief among those flaws is probably that it's a film about the history of the United States' intervention in Afghanistan in the 1980s and how badly we mangled the post-war maintenance of that country that is a) defanged of any real political content; b) 97 minutes long; c) funny.

"Gosh darn it, this movie is too funny!" is assuredly not a criticism that you come across all that very often, but it is much the case that Charlie Wilson's War could do a bit better shifting between its funny scenes (which are awfully funny indeed, sometimes) and its profound and sobering scenes (which are too long and trite). I'm in no mood to start tossing blame around, but I think the problem is a mismatch between the two very distinct filmmakers at the core of the film: director Mike Nichols and screenwriter Aaron Sorkin, who have both done some very fine things in their careers, some not-as-fine things, and neither of whom seems like a natural fit for the other - although Rob Reiner turned out to fit Sorkin's writing like a glove, so who am I to judge?

The film retells the true story of Congressman Charlie Wilson (Tom Hanks), a Texas Democrat whose genial amorality made him a perfect moderate choice for all sorts of deal-brokering and committee chairs, and thus it was that he found himself on the Defense Appropriations subcommittee, where he had the perfect opportunity to fund a covert CIA operation to move arms from Israel through Pakistan into Afghanistan, to support the mujahadeen against the invading Soviet army.

First: the script. Now, I adore Aaron Sorkin, but he's running up against something here that he's never had to deal with before: honest to God reality. His previous work has all been kind of magically realistic: a fairy-tale sports network in Sports Night, a fairy-tale White House in The American President and The West Wing, and most recently a fairy-tale sketch comedy where the wicked queen and the beautiful princess were the very same born-again Christian stereotype. I love him - even the much-maligned Studio 60 on the Sunset Strip, excepting the aforementioned stereotype - but I love about him how much his work is idealised men and women muddling through life with witty dialogue, not real-life people handling real-life crises, and he can't always get his head around it, I think. To be sure, the script simply reeks of studio interference to tone down the hyper-liberal politics, but there are a lot of scenes that play out just to give us information, not to bask in human speechifying. The best parts of the movie are the ones that "do a Sorkin" - people walking down halls as they deliver sentences with 18 clauses - and there just aren't enough of those. Still, it's easy to see what attracted him to the story: Charlie Wilson is a great Sorkin character, a man who is unambiguously corrupt but also has a keen sense of right and wrong and does what's right when he can. That part, at least, works like a charm.

One of the great risks with a Sorkin script, as Studio 60 made clear, is nabbing actors who aren't quite on the right wavelength. Hanks ought to be a great Wilson - they even look similar, filtered through the Hollywood glamor lens - but he's not secure enough in his accent, and he doesn't quite have a handle on Sorkinese patter. The recently-ubiquitous Philip Seymour Hoffman handles himself a great deal better as Gust Avrakotos, the CIA agent who helps Wilson formulate the strategy to funnel arms. His introductory scene is absolutely the best part of the film, firey dialogue delivered at a million miles a second, and simply hilarious. But he too can't always find the right tone, defaulting to his standard wiseass routine a bit more than fits the character. As for Julia Roberts, she is saddled with one of the worst women Sorkin has ever written, the born-again (I sense a pattern) millionairess Joanne Herring, whose religious hatred of the Soviets leads her to push Wilson towards what she believes to be his destiny. The actress tries, but there's nothing to the role, and it's hard to tell even something as simple as whether or not she's supposed to come across as admirable or unhinged.

Then, there's Mike Nichols, who also isn't on the same wavelength as the script, although he does enough things very well that I'm more than a little inclined to cut him a break. If there's a problem with his direction, it's that he frequently musses up the comedy, but he makes up for it at least a little bit by moving the story along at a bright clip. There's a lot of very fluid camera work in this film, not quite as hectic as Thomas Schlamme's work with the writer, but different rather than worse: you might say the camera is inquisitive, if you like (as I do) anthropomorphising film cameras. The shots are always moving closer, moving around, trying to get a better look, pulling us in. It's some of the most interesting visual work Nichols has done in a long time, and it's nice and brisk. The dramatic moments undo him rather completely, but they are few in number.

See, that's the thing: for all my complaints, this is an awfully fun movie, but it's fun in a passive way; it happens and it's cute as hell and it's over. And I remain a bit skeptical that a film about our first Afghan adventure ought to be fun at all. But it's too easy a movie not to like it, as a diversion rather than a serious work of art, perhaps. Diversions, especially well-crafted diversions - and this is well-crafted, whatever else - have their place. It's a shame that "not Oscar-worthy" has come to mean "shitty" in this film's case, but a lack of depth doesn't mean the film is stupid. It's a sweet movie with a bittersweet finish, and to fault that is sheer crankiness.