Ben Stiller doesn't so much act as react. And he does it very well. He is very dependent on the comedy going on around him. In There's Something About Mary, the stand-up hair scene only works because of Stiller trying to keep a straight face. When he confronts Mary's other two suitors, he is the unfunniest guy in the room but the scene is hilarious.
In Along Came Polly, the formula breaks down for reasons that are difficult to fathom. Stiller is surrounded by an array of comic talent. Hank Azaria and Philip Seymour Hoffman get the best lines, of which there are too few. Having said that, Hoffman relies a little too much on bodily humour - you know we are in trouble when they go to the fart jokes to raise a laugh. A basketball scene where Hoffman hams it up is completely overplayed (though it throws up one predicament in the form of a shirtless opponent that does raise a smile - noticeably through Stiller's reaction). However, everyone seems to be acting in a bubble, there is very little reaction. Hoffman and Stiller's characters could have played off each other much, much more. Aniston again reprises her Rachael role, but Stiller is no Ross. It is more of a "Joey with a crush on Rachael" scenario.
Polly is a by-the-numbers rom-com and that is its failing - it lacks heart. You don't root for the characters. With a little bit more work we could have had a deeper story, but in the end the film's failure comes down to poor writing. Worth watching if it pops up on TV on a slow night, but you'll regret forking out cash to see it.