Game Development Community

TGEA 1.8.x BUG - Null Stateblock Assert in tsShapeInstance

by Andy Rollins · in Torque Game Engine Advanced · 02/16/2009 (4:06 pm) · 2 replies

Found a bug in TGEA with the DTS billboarding, if you try and use that functionality then when TSLastDetail object is created it tries to take a few snapshots of the object.

The assert is thrown from line 871 in tsShapeInstance.cpp

GFX->setStateBlock(mSnapshotSB);

mSnapshotSB isn't initialized, the function TSShapeInstance::setupStateBlocks() does create the stateblock but that function isn't called anywhere in the engine.

FIX: Simplest would seem to be to add a call to setupStateBlocks() to the end of the TSShapeInstance Constructor.

Any idea if that's the correct approach?

#1
02/16/2009 (9:02 pm)
I opted to call setupStateBlocks in snapshot_softblend, and made a couple of minor tweaks to setupStateBlocks(). Noted in the known issues list
#2
02/16/2009 (11:22 pm)
Thanks Alex :) great to see some of these bugs getting stomped