Advertisement Jump to content
Sign in to follow this  

2 windows message errors

This topic is 4960 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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, 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.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!