These are usually caused by components which deal with pointers and memory handling, like drivers. The error dialog should have a button or a link with details of the module which caused the error, which sometimes gives you a clue (e.g. if the module is a VISA DLL, then the problem is most likely with the VISA driver). Finding the exact cause is not easy, because sometimes the crash can occur much later than the actual error.
If you have any drivers and components which do memory handling, you should make sure you use updated versions. If the crash is relatively common, you can try adding code which will allow you to disable parts of the program and see if that helps. If it does, the problem is most likely with the part you disabled.
___________________
Try to take over the world!