I am developing an application in Visual C# using winforms.
The application is basically a screen with three tabs. It shows values from processes running on the system per second (using System.Diagnostics.Process[] ).
It generates and updates lot of numbers and calculations (around 4000/second). But after 10000 iterations or ~45 minutes of work, it just crashes and the amazing part is It always crashes around the same time.
The RAM involved here is just 70mb and CPU load never goes above 35% for the app under windows xp and windows 7. The aim of the app is to allow users to view processes running on the system with the cpuload and memory load. we cannot suggest taskmanager due to security reasons.
The error is not trapped by C# by any of the try - catch methods
Following screens are a sample that follow after the crash

The main application screen looks like this

Has anybody faced such a situation where the app crashes after a fixed run length.
Please suggest a diagnostic tool or a method to trap such errors.
Thanks for the replies
Try adding this into your service in the main void
and
and if you want to debug your service in visual studio then just add -d by start up option in the Command line arguments