Release vs Debug
-
The debug version of my program works like a charm. The release build gives an access violation as soon as I double click on the exe. So....since I really can't "debug" the release version, I could use a lil help. Any ideas?
-
The debug version of my program works like a charm. The release build gives an access violation as soon as I double click on the exe. So....since I really can't "debug" the release version, I could use a lil help. Any ideas?
You probably have an uninitialized variable. Try using AfxMessageBox() to trace through your program. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com
-
The debug version of my program works like a charm. The release build gives an access violation as soon as I double click on the exe. So....since I really can't "debug" the release version, I could use a lil help. Any ideas?
I just found out you CAN debug your release build. Under MSDN help, under index, look up "release build" and under that is "fixing problemss" (yes 2 s's). Click on "Turn on Generation of Debug Information for the Release Build" to find out how. So, I did that, and I am now debugging the release build, and I find out that my "Access violation" error comes before the first line of InitInstance. What on gods planet would cause this? The call stack just shows "0064ed69()".
-
I just found out you CAN debug your release build. Under MSDN help, under index, look up "release build" and under that is "fixing problemss" (yes 2 s's). Click on "Turn on Generation of Debug Information for the Release Build" to find out how. So, I did that, and I am now debugging the release build, and I find out that my "Access violation" error comes before the first line of InitInstance. What on gods planet would cause this? The call stack just shows "0064ed69()".
Sounds like you have a member variable that is blowing up as it's being created.
-
The debug version of my program works like a charm. The release build gives an access violation as soon as I double click on the exe. So....since I really can't "debug" the release version, I could use a lil help. Any ideas?
For strange it seems, you can debug a release version of a program in VC; read the article on http://www.pgh.net/~newcomer/debug\_release.htm; very good!
-
Sounds like you have a member variable that is blowing up as it's being created.
Well, I don't hear any explosions ;D. On a serious note, could you elaborate on this variable "blowing up"?
-
Well, I don't hear any explosions ;D. On a serious note, could you elaborate on this variable "blowing up"?
I hope this equation works here ;) Quick Answer + time + thought = better answer Try setting a breakpoint in the constructor of any class member classes. For example, you have a class CDoSomething which is declared as a member variable of CMyGreatClass. Notice I said class not pointer to a class. As a part of the construction of CMyGreatClass, it has to create CDoSomething. If there is a problem creating CDoSomething, CMyGreatClass will not even get created before an error occurs. Good Luck Brad
-
I hope this equation works here ;) Quick Answer + time + thought = better answer Try setting a breakpoint in the constructor of any class member classes. For example, you have a class CDoSomething which is declared as a member variable of CMyGreatClass. Notice I said class not pointer to a class. As a part of the construction of CMyGreatClass, it has to create CDoSomething. If there is a problem creating CDoSomething, CMyGreatClass will not even get created before an error occurs. Good Luck Brad
I thought that the very very very first thing that gets called is CMyApp::InitInstance(). I attempt to "run to cursor" to that function with my release build, and it doesn't make it. Do the constructors of the other classes get called before reaching the InitInstance function....? ( I also tried your suggestion, without success.
-
I thought that the very very very first thing that gets called is CMyApp::InitInstance(). I attempt to "run to cursor" to that function with my release build, and it doesn't make it. Do the constructors of the other classes get called before reaching the InitInstance function....? ( I also tried your suggestion, without success.
The constructor gets called first! Try setting a breakpoint there. Brad