Very strange program error.

Started by
2 comments, last by oler1s 15 years, 10 months ago
Hi again ! I got a little problem with my new project. My executable ( Win32 Console Mode, Visual C++ 2008 ) works flawlessly in both Debug and Release mode ( produces the correct output, shuts down cleanly, no memory/resource leaks ) However in debug mode, as soon as it gets to the end of the program ( after the regular program code has run its course, in the CRT shutdown sequence ) it beeps, meaning it produces a beep of the PC Speaker. I can't debug into this part of the code unfortunatly. This does not happen in release mode. I should stress that of course i have no call whatsoever in my code that deals with the PC Speaker or any sound output for that matter. I suspected either a last resort panic error signal from the CRT due to memory corruption or something, or me writing to some bad memory location which is mapped to PC Speaker control on Win32... However after a run throught with both BoundsChecker and Purify, there seems to be absolutly no memory coruption or "strange" writing take place. A search did not reveal any information on the circumstances when the CRT ( or any other part of the Visual C++ generated code ) "beeps".... Has anybody encountered this before ?
Advertisement
I haven't seen this particular behavior. If it's easy to reproduce, I would try to simplify the program as much as possible, to see what part is responsible for it. You can sometimes reduce a program to about 10 lines of code and still see an odd behavior like this. If you do that, you can post the code so other people can try to reproduce it. You may also convince yourself that you have found a compiler bug, and then you can send the short program to Microsoft with your bug report.

You're not outputting a \a to the console in debug mode are you?

[Edited by - godecho on June 18, 2008 10:19:23 AM]
Or maybe for the debug target, there is a sequence of characters like ??/a .

This topic is closed to new replies.

Advertisement