I need some help with debugging problems. Specifically, when I compile a release version of my code, I am getting an access violation exception (instruction references memory that cannot be read). However, when I compile the code with the default debug options, everything runs fine. How is one expected to debug a program if they cannot reproduce the problem when debugging? Has anyone else run into this problem, and, if so, what was their work around?
I have run into a similar problem with CVF before in that there is no option to initialize variables to zero. Because of this, I obtained very different results from my program depending upon whether I compiled it with debug or release options. I finally tracked down the problem to the fact that there is no option to zero out all uninitialized variables. I realize that this practice is frowned upon by the computer science elite, but without the ability to set default initialization values for variables, then a debugger is essentially useless if it gives different results depending upon how the program is compiled. I understand the reasoning behind not allowing a compiler to initialize variables - this forces the programmer to do it. But forcing a programmer to initialize all variables does not ensure that the programmer will initialize them correctly. Apparently, it just makes debugging a whole lot more difficult. Anyway, any suggestions for solving my debugging problem?