The picture below is from my DemoView mod and was shown yesterday in another thread (on the Raven forums). Shortly after posting the picture I experienced that replay of a particular demo froze every single time when the demo reached a certain point and the game crashed shortly after.
After experimenting I found that it did not freeze if I turned off my display before reaching that point. The code that prints the display is 100% bug-free (as you will see). But I commented out a little part of the code and the problem was gone. Strange....
The code for printing the Display is this:
void CG_INFREQ_DrawDemoHUD( void )
if ( cg_DrawDemoHUD.integer == 0 ) return;
All those functions simply print some text based on some cvar values.
The strange part is that the error dissapeared when I out-commented the last function-call. Ok, the problem lies in CG_INFREQ_DrawMediaControls() ! I then looked closer at that simple function and saw nothing wrong.
void CG_INFREQ_DrawMediaControls( void )
s = "MEDIA CONTROLS:";
CG_DrawText (10, HUD_Y_CONTROLS4, cgs.media.hudFont, 0.24f, colorWhite, s, 0, DT_OUTLINE);
s = "PAGEUP = Save screenshot (jpg)";
CG_DrawText (15, HUD_Y_CONTROLS4+1*HUD_ITEMSPACE_SMALL, cgs.media.hudFont, 0.24f, colorWhite, s, 0, DT_OUTLINE);
s = "PAGEDOWN = Save screenshot (tga)";
CG_DrawText (15, HUD_Y_CONTROLS4+2*HUD_ITEMSPACE_SMALL, cgs.media.hudFont, 0.24f, colorWhite, s, 0, DT_OUTLINE);
There is nothing wrong with the constants HUD_Y_CONTROLS4 and HUD_ITEMSPACE_SMALL ! As you can see on the picture the text is well within the screen-area.
What is wrong then ? I had an idea that I hoped was wrong. I out-commented the 3 s="... lines an inserted a s=" ". IT WORKED !! :(
My only explanation is that I've hit some limit in the VM by having all those s="... although they are in different functions and do not even share stack-space.
What the h*ll do I do ? Any ideas ?
Anyone know of such Q3 engine limitations ?