Bitrender crash
by Gary Preston · in Torque Game Engine · 04/28/2006 (7:37 am) · 0 replies
Today I started having crashes after a few seconds of been in the game, the crash was coming from within bitrender.cc (BitRender::render_tris) with the error been
I've never seen this error before, why its suddenly started catching this I'm not sure, maybe it has something to do with moving over to the newer openal?
Anyhow, lookng through the render_tris code there appears to be a few code paths that can result in xLeftErrInc, xLeftInc, xLeftDir, xRightErrInc, xRightInc, xRightDir been used without been initialised.
I've modified the declarations to initialise the vars. I'm not 100% certain these defaults are safe, if anyone can spare some time to check over this I'd appreciate it.
Why I suddenly started to get run-time errors in bitrender I've no idea. As far as I'm aware no changes have been made to enable extra run time checking. Either way, it seems like a bug to use a var that isn't set.
Quote:
Run-Time Check Failure #3 - The variable 'xLeftDir' is being used without being defined
I've never seen this error before, why its suddenly started catching this I'm not sure, maybe it has something to do with moving over to the newer openal?
Anyhow, lookng through the render_tris code there appears to be a few code paths that can result in xLeftErrInc, xLeftInc, xLeftDir, xRightErrInc, xRightInc, xRightDir been used without been initialised.
I've modified the declarations to initialise the vars. I'm not 100% certain these defaults are safe, if anyone can spare some time to check over this I'd appreciate it.
S32 leftDeltaY, xLeftInc=0, xLeftErrInc=0, xLeftDir=1, xLeft, xLeftErr = 0; S32 rightDeltaY, xRightInc=0, xRightErrInc=0, xRightDir=1, xRight, xRightErr = 0;
Why I suddenly started to get run-time errors in bitrender I've no idea. As far as I'm aware no changes have been made to enable extra run time checking. Either way, it seems like a bug to use a var that isn't set.