Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with beeps during execution (debug & release conflict)

Status
Not open for further replies.

Pointextder

Programmer
Feb 6, 2004
3
US
I'm getting a strange problem with my code. Basically I traced it down to one variable which is not used. I will get a warning from compiling the release exe about an unreferenced local variable, the debug exe ignores it (0 errors, 0 warnings). If I run the debug exe I get no beeps, if I run the release exe, I get beeps during execution. BTW no alarm or beep functions are included in my code.

Now, if I comment out that variable, both the debug and release exe's will compile fine with no errors or warnings reported. Running the release exe results in no beeps. HOWEVER, now when I run the debug exe it has a ton of beeps. I really can understand why one little unused variable is causing all this. Any ideas? Thanks.

 
It would seem to me that there are bugs elsewhere in your code, and this is just one point where the side effects of the problem come into sharp contrast.

My first idea would be to put a watch point on the unused variable, to see if anything touches it 'by mistake'. Anything which does would be a bug.

Failing that, perhaps a tool like boundschecker would be of some use
This just gives you some ideas of the kinds of things it can detect. There are quite a few such tools in a variety of price ranges.

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top