0

I've created a program (vs2010,c++,win7), it's a multithreaded and has modules. The program that communicates with some hardware. I run this program in a clean computer that has only win7 and the drivers of the hardware. After using my program for a while, one of the modules crashes. I tried to debug the program in the development computer and the call stack show me only calls to "ntdll.dll", i also tried to create a dump file from the program in the testing computer and I've got the same results. Usually the module crash when there is a lot of load on all the modules. I've no idea from where to start to debug this program, so I'm open to ideas.

EDIT: also i got the exception "0xc0000374 a heap has been been corrupted"

tnx.

David
  • 287
  • 2
  • 3
  • 13
  • other than offering general advice like "use a debugger, step through your program, etc", we may need to see some code to better help. – SnakeDoc Jan 24 '14 at 08:14
  • 3
    Almost certainly, all your code is "waiting" for something, and something you have passed in to the OS is "bad" in a way that the OS couldn't immediately determine - typically this involves a pointer that is either incorrect in the first place (but not NULL), or for example gets freed before it's used. These problems are never EASY to debug. First step is to determine why it actually crashed - what was the OS trying to do, and what address did it try to access if it's a "memory access problem" - then try to find where that came from... Never easy, but can be done. – Mats Petersson Jan 24 '14 at 08:18
  • Also, adding a lot of "trace" to your code can help, so at least you know what the code is doing when it crashes. – Mats Petersson Jan 24 '14 at 08:19
  • i forgot to mention that when i tried to run the program from the vs the program didn't crash – David Jan 24 '14 at 08:19
  • is there any tool to narrow down the search? – David Jan 24 '14 at 08:44
  • 1
    If it doesn't crash in a debug build, look for uninitialised variables and buffer overruns. – Roger Rowland Jan 24 '14 at 08:57

0 Answers0