How to debug an application which stops at a certain point without any specific error, and no infinite loop involved?