Yes, and it is a bugger to track down. There is no one specific thing. It generally comes down to trial and error.

The thing is that I wouldn't be looking at the application itself. If there were something wrong with the code it would happen ALL the time.