program works in debug but not in release mode

hi

i'm writing a program to read cpu details etc.
but the program will cause 100% cpu usage and not respond under release mode but in debug it works fine
you can find both version at
http://members.optusnet.com.au/madonion87/Debug.zip
http://members.optusnet.com.au/madonion87/Release.zip

someone already suggested that it might be the compiler optimization problem, i tried turning off optimization in MS VS.net 2003 but it doesnt help

any ideas would be very appreciated
madonion87Asked:
Who is Participating?
 
waysideCommented:
Check out http://www.codeguru.com/forum/showthread.php?s=&threadid=269905

or

http://www.codeproject.com/debug/survivereleasever.asp

for some good discussion on why things work in debug and not in release, and what to do to fix it.
0
 
madonion87Author Commented:
this might help

"in the release build, after GetMessage is called, it goes on comparing whether the call has failed, and if not calls TranslateMessage and so on but the loop is very tight. whats more odd is the program never seems to pass control to windows, and forever looping and handling messages.

whereas in the debug build, after all messages are handled, program passes control to windows after a GetMessage call."

another guy i know in ocau forum said it, i'm not very sure what he means though
0
 
AlexFMCommented:
You need to post source code (some code fragments may be posted here, or make the whole project available for download). exe file doesn't help us to solve your problem.
Except of this, I don't beleive there is an expert who downloads unknown exe file from WEB and runs it on his own computer :-)
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
madonion87Author Commented:
lol sorry

you can find the source code at http://members.optusnet.com.au/madonion87/muon.cpp

tell me if you need the header files
0
 
jkrCommented:
>>you can find the source code at ...
>>tell me if you need the header files

Everything that you do not post here is pointless, as it renders the Q worthless for others. Sorry.
0
 
jkrCommented:
0
 
madonion87Author Commented:
i've already looked at that site, tried turning off optimization as well, didnt help
thats why i want to see if anyone have also experienced the same problem, or know what might have caused it
0
 
jkrCommented:
So, have you also tried to _DEBUG_ your release build then?
0
 
waysideCommented:
When all else fails...

add print statements.
0
 
madonion87Author Commented:
turning off aliasing fixed the problem
i think i will split the points into those who contributed, thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.