Wednesday, December 10, 2008

Weird bug alert!

I have this weird bug where the engine just seems to get progressively slower. It starts to feel noticeable after a half minute or so, then will really kick in after another half minute or so. So far I've established that:

  • It's not input lag, everything moves slow.
  • It's not memory consumption or similar.
  • It's not hardware, drivers or DirectX; same symptoms on different machines.
  • It's definitely isolated within Quake; other Direct3D apps run fine.
  • It's not the renderer, even in slowmo mode a timedemo still runs at normal speed.
  • This led me to a possibility of host_framerate creep, but it's not that either.
  • Putting cl.time out to the console reveals that it's definitely affecting cl.time. The initial kick-in seems to be about 25 seconds.
  • Checking the deltas for all of Quake's timers reveals that they don't creep, yet cl.time is getting progressively slower.
Currently working on isolating it; I've narrowed it down to something in the rendering code (by replacing everything else with stock Q1 source); yet it doesn't affect timedemos as I said above, so I know that the renderer is fundamentally sound. I fear that it's either a pointer being stomped or = instead of ==. Ugh.

0 comments: