Jump to content
  • Advertisement
Sign in to follow this  
Doggan

Enginuity/GPGems Profiler Problem

This topic is 5037 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

I am having a problem with the Profiler code presented in the Enginuity series (which was taken from Game Programming Gems I). A few days ago, I got the first volume of GP Gems. I was playing around with the Profiler on the CD. They provide an executable. (aka, i didn't change any code, so there "shouldn't be" any coding issues). I get weird output, though: See the dollar signs? I come back from vacation today, and decide to figure out what the problem is. I run the SAME executable, and I get the CORRECT output. I opened/closed the executable numerous times, so it wasn't a one time thing. Here is a screenshot of how it's supposed to look: I decide to take a break and I load up Doom 3. I play this for 30 minutes. After that, I go back to the profiler. I run the SAME executable again, and I get the original output (as seen in the 1st screenshot). I am totally perplexed at this moment... and am hoping someone can shed some light. I am sometimes getting the correct output, and sometimes the incorrect output, without changing any code... My only thought is that there is some sort of buffer overflow or something... But looking over the code, I don't think that is it. Also, if it were a coding error, A). GP Gems would've posted the error on their website, or B). Someone, somewhere, would've posted the error about GP Gems, or Enginuity. I haven't found either of those. Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
If you're using a laptop and the profile functions use QueryPerformanceCounter or something rdtsc-based that could be the problem - Many laptop processors can change their clock speed while executing, and the Query..Frequency(or manual calibration w/ rdtsc) function might return the fast clock used for doom3 and then before profiling is done the laptop downclocks itself since it doesn't need that much power anymore and suddenly the frequency it expects the clock to be and the actual frequency don't match up. That could cause all kinds of math problems which could result in the $ (depending on the number->string function's handling of 'special' floating point values like NAN and INF)

Share this post


Link to post
Share on other sites
I think I had the same problem as well.
Try assigning values (0.0) to the member variables in the constructor.
( I think of CProfileSample() )
As far as I remember that helped in my case.

It might be a scope problem too. But I guess it would happen all the time then.
See this thread

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!