This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am using AltovaXML2007 API to process and query XML files in my program. The problem is that at run time sometimes the program fails and sometimes it does not. It is really random like out of 5 times running the promram 2 times the program will fail giving NullPointerException.
While debugging I found that the program is failing when I am trying to instantiate the AltovaXMLFactory:
// Get application instance IAltovaXMLFactory objXmlApp = AltovaXMLFactory.getInstance();
objXmlApp is initialized to NULL in the instances where the program is failing to run giving NullPointerException.
Do you know what might cause the program to randomly crash?