Legacy VC 6.0 Works Differently in Debug Mode
-
OK, I have never seen this before --- maybe some of you folks have. I have a legacy VC++ 6.0 program that communicates with a host computer. This program is all dialog-based and sends requests to the host through pressing buttons on the dialogs. Now if I step through a certain section of code that I'm trying to implement, it reacts differently during the Debug that it does during normal operation. It appears that one of the messages I am sending to the host either gets "lost" somewhere during normal ops, but gets handled when stepping through the code. Does anyone have any idea what could possibly be going on here? Thanks for any and all input. This one has me almost to the point of pulling out my hair by the roots.
John P.
-
OK, I have never seen this before --- maybe some of you folks have. I have a legacy VC++ 6.0 program that communicates with a host computer. This program is all dialog-based and sends requests to the host through pressing buttons on the dialogs. Now if I step through a certain section of code that I'm trying to implement, it reacts differently during the Debug that it does during normal operation. It appears that one of the messages I am sending to the host either gets "lost" somewhere during normal ops, but gets handled when stepping through the code. Does anyone have any idea what could possibly be going on here? Thanks for any and all input. This one has me almost to the point of pulling out my hair by the roots.
John P.
This may be completely unrelated, but if you are using TCP/IP and sockets, are you checking your recv() calls to make sure you are getting all the bytes you are requesting? recv() only guarantees 1 byte received on any successful call (although almost always you get more) and this is a common mistake. It happens with named pipes as well (that WTF cost me many hours once :laugh:) Also, remember that threads behave differently single stepping so you may be exposing a synchronization problem that will bite you later on. My 2 cents. Mark
-
OK, I have never seen this before --- maybe some of you folks have. I have a legacy VC++ 6.0 program that communicates with a host computer. This program is all dialog-based and sends requests to the host through pressing buttons on the dialogs. Now if I step through a certain section of code that I'm trying to implement, it reacts differently during the Debug that it does during normal operation. It appears that one of the messages I am sending to the host either gets "lost" somewhere during normal ops, but gets handled when stepping through the code. Does anyone have any idea what could possibly be going on here? Thanks for any and all input. This one has me almost to the point of pulling out my hair by the roots.
John P.
Something like this happened to me once. Turned out there was a memory leak that must have wondered into the buffered space in debug mode and not hurt anything but in release mode it caused a crash. We used Bounds Checker to track the memory leak.
-
OK, I have never seen this before --- maybe some of you folks have. I have a legacy VC++ 6.0 program that communicates with a host computer. This program is all dialog-based and sends requests to the host through pressing buttons on the dialogs. Now if I step through a certain section of code that I'm trying to implement, it reacts differently during the Debug that it does during normal operation. It appears that one of the messages I am sending to the host either gets "lost" somewhere during normal ops, but gets handled when stepping through the code. Does anyone have any idea what could possibly be going on here? Thanks for any and all input. This one has me almost to the point of pulling out my hair by the roots.
John P.
I've also seen problems like this when you have multiple threads on the client or server and don't put appropriate synchonization in place, eg mutex. Single-stepping in the debugger gives the app time to breathe between calls so the conflicts don't occur. It could also be something to do with not blocking correctly on the tcp socket Don
-
OK, I have never seen this before --- maybe some of you folks have. I have a legacy VC++ 6.0 program that communicates with a host computer. This program is all dialog-based and sends requests to the host through pressing buttons on the dialogs. Now if I step through a certain section of code that I'm trying to implement, it reacts differently during the Debug that it does during normal operation. It appears that one of the messages I am sending to the host either gets "lost" somewhere during normal ops, but gets handled when stepping through the code. Does anyone have any idea what could possibly be going on here? Thanks for any and all input. This one has me almost to the point of pulling out my hair by the roots.
John P.
Thank you all for you responses.
John P.