2 windows message errors

Started by
-1 comments, last by nihilisticod 18 years, 10 months ago
Early today, I encountered two nifty little problems. Problem 1. My program was running correctly, I changed a Windowing class from a Singleton to a class with Static methods. Now, when I run the program in debug mode using MSVS 2003.net, I encounter a runtime error that occurs as soon as the window frame is displayed. I break to debug and it seems the problem occured in crt0.c on a call to winmain. The Local variables state that lpszCommandLine and StartupInfo are both bad pointers. I have no idea how to fix this and wondered if anyone had any advice. The only differences between the compile setups is that debug mode is not optimized, and uses a multi-threaded debug runtime library while Release is optimized and uses the multi-threaded runtime lib. Problem 2. The same program right now, when it runs, seems to crash upon any windows event message. Everything loads and runs fine, but as soon as I move the mouse or press a key, it crashes. I cannot get detailed info about the crash since It won't run in debug mode. I used a logfile to try and pinpoint the error and it seems the crash happens before WndProc is called back. just in case, I removed all function calls from WndProc. But that didn't help. If I get the first problem fixed I'm sure I can debug the second one. I suspect they are related since programs usually don't crash without reason (no matter how much I'd like to believe that). I'm sure I'm missing plenty of key information in this post but any help would be greatly appreciated.

This topic is closed to new replies.

Advertisement