Game Development Community

COLLADA Progress Window Bug [with fix]

by Gary Hoffmann · in Torque 3D Professional · 08/11/2009 (8:55 pm) · 3 replies

I'm using a collada object as my player (specifically a vehicle). If I update the collada dae while torque is *not* running and then I attempt to start Torque 3D with the "-level" command line paramter, the following error is thrown:

GFXDevice::beginScene() - The scene has already begun!

I assume this is happening because the progress bar window for dae objects is attempting to do something before it is allowed to. If I start T3D without the level parameter and then open the mission, the progress window is displayed (and the dts is updated) and then I can launch T3D again using the -level parameter.

Stack Trace:

TestApp_DEBUG.dll!Platform::debugBreak() Line 18 C++
> TestApp_DEBUG.dll!GFXDevice::beginScene() Line 910 C++
TestApp_DEBUG.dll!GuiCanvas::renderFrame(bool preRenderOnly=false, bool bufferSwap=true) Line 1478 C++
TestApp_DEBUG.dll!cGuiCanvasrepaint(GuiCanvas * object=0x03eded38, int argc=2, const char * * argv=0x11348e60) Line 1812 C++
TestApp_DEBUG.dll!cGuiCanvasrepaintcaster(SimObject * object=0x03eded38, int argc=2, const char * * argv=0x11348e60) Line 1808 + 0x65 bytes C++
TestApp_DEBUG.dll!CodeBlock::exec(unsigned int ip=963, const char * functionName=0x1111eea0, Namespace * thisNamespace=0x02295618, unsigned int argc=2, const char * * argv=0x0016e0e0, bool noCalls=false, const char * packageName=0x00000000, int setFrame=-1) Line 1612 + 0x20 bytes C++
TestApp_DEBUG.dll!Namespace::Entry::execute(int argc=3, const char * * argv=0x0016e0e0, ExprEvalState * state=0x1134f6b8) Line 1030 + 0x31 bytes C++
TestApp_DEBUG.dll!Con::execute(int argc=3, const char * * argv=0x0016e0e0) Line 956 + 0x15 bytes C++
TestApp_DEBUG.dll!Con::_executef(int checkArgc=3, int argc=3, const char * a=0x1111eea0, const char * b=0x02230b0c, const char * c=0x086d8e1c, const char * d=0x00000000, const char * e=0x00000000, const char * f=0x00000000, const char * g=0x00000000, const char * h=0x00000000, const char * i=0x00000000, const char * j=0x00000000) Line 1085 + 0xd bytes C++
TestApp_DEBUG.dll!Con::executef(const char * a=0x1111eea0, const char * b=0x02230b0c, const char * c=0x086d8e1c) Line 1091 + 0x2c bytes C++
TestApp_DEBUG.dll!TSShapeLoader::updateProgress(int major=0, const char * msg=0x086d8e1c, int numMinor=0, int minor=0) Line 145 + 0x20 bytes C++
TestApp_DEBUG.dll!loadColladaShape(const Torque::Path & path={...}) Line 436 + 0x1b bytes C++
TestApp_DEBUG.dll!Resource<TSShape>::create(const Torque::Path & path={...}) Line 2011 + 0x9 bytes C++
TestApp_DEBUG.dll!ResourceBase::assignResource(void * resource=0x00000000) Line 84 + 0x11 bytes C++
TestApp_DEBUG.dll!ResourceBase::assign(const ResourceBase & inResource={...}) Line 64 C++
TestApp_DEBUG.dll!Resource<TSShape>::operator=(const ResourceBase & base={...}) Line 196 + 0x18 bytes C++
TestApp_DEBUG.dll!ShapeBaseData::preload(bool server=true, String & errorStr={...}) Line 219 + 0x61 bytes C++
TestApp_DEBUG.dll!VehicleData::preload(bool server=true, String & errorStr={...}) Line 125 + 0x11 bytes C++
TestApp_DEBUG.dll!ShipBaseData::preload(bool server=true, String & errorStr={...}) Line 66 + 0x11 bytes C++
TestApp_DEBUG.dll!CodeBlock::exec(unsigned int ip=672, const char * functionName=0x088f493c, Namespace * thisNamespace=0x00000000, unsigned int argc=0, const char * * argv=0x00000000, bool noCalls=false, const char * packageName=0x00000000, int setFrame=0) Line 803 + 0x26 bytes C++
TestApp_DEBUG.dll!CodeBlock::compileExec(const char * fileName=0x088f493c, const char * inString=0x08b63170, bool noCalls=false, int setFrame=0) Line 646 C++
TestApp_DEBUG.dll!cexec(SimObject * __formal=0x07df58a0, int argc=2, const char * * argv=0x11348e60) Line 1175 C++
TestApp_DEBUG.dll!CodeBlock::exec(unsigned int ip=161, const char * functionName=0x0873274c, Namespace * thisNamespace=0x00000000, unsigned int argc=0, const char * * argv=0x00000000, bool noCalls=false, const char * packageName=0x00000000, int setFrame=0) Line 1621 + 0x20 bytes C++
TestApp_DEBUG.dll!CodeBlock::compileExec(const char * fileName=0x0873274c, const char * inString=0x087bb980, bool noCalls=false, int setFrame=0) Line 646 C++
TestApp_DEBUG.dll!cexec(SimObject * __formal=0x07df58a0, int argc=2, const char * * argv=0x11348e60) Line 1175 C++
TestApp_DEBUG.dll!CodeBlock::exec(unsigned int ip=713, const char * functionName=0x04056a68, Namespace * thisNamespace=0x02295618, unsigned int argc=0, const char * * argv=0x11348e60, bool noCalls=false, const char * packageName=0x00000000, int setFrame=-1) Line 1621 + 0x20 bytes C++
TestApp_DEBUG.dll!CodeBlock::exec(unsigned int ip=353, const char * functionName=0x0405696c, Namespace * thisNamespace=0x02295618, unsigned int argc=2, const char * * argv=0x11348e60, bool noCalls=false, const char * packageName=0x00000000, int setFrame=-1) Line 1530 + 0x41 bytes C++
TestApp_DEBUG.dll!CodeBlock::exec(unsigned int ip=962, const char * functionName=0x07c8f824, Namespace * thisNamespace=0x02295618, unsigned int argc=0, const char * * argv=0x11348e60, bool noCalls=false, const char * packageName=0x00000000, int setFrame=-1) Line 1530 + 0x41 bytes C++
TestApp_DEBUG.dll!CodeBlock::exec(unsigned int ip=1563, const char * functionName=0x110d71d4, Namespace * thisNamespace=0x0407816c, unsigned int argc=1, const char * * argv=0x0017c400, bool noCalls=false, const char * packageName=0x00000000, int setFrame=-1) Line 1530 + 0x41 bytes C++
TestApp_DEBUG.dll!Namespace::Entry::execute(int argc=2, const char * * argv=0x0017c400, ExprEvalState * state=0x1134f6b8) Line 1030 + 0x31 bytes C++
TestApp_DEBUG.dll!Con::execute(SimObject * object=0x07df58a0, int argc=2, const char * * argv=0x0017c400, bool thisCallOnly=false) Line 1011 + 0x15 bytes C++
TestApp_DEBUG.dll!Con::_executef(SimObject * obj=0x07df58a0, int checkArgc=1, int argc=1, const char * a=0x110d71d4, const char * b=0x00000000, const char * c=0x00000000, const char * d=0x00000000, const char * e=0x00000000, const char * f=0x00000000, const char * g=0x00000000, const char * h=0x00000000, const char * i=0x00000000, const char * j=0x00000000, const char * k=0x00000000) Line 1046 + 0x16 bytes C++
TestApp_DEBUG.dll!Con::executef(SimObject * obj=0x07df58a0, const char * a=0x110d71d4) Line 1051 + 0x2e bytes C++
TestApp_DEBUG.dll!GuiFadeinBitmapCtrl::onRender(Point2I offset={...}, const RectI & updateRect={...}) Line 88 + 0xe bytes C++
TestApp_DEBUG.dll!GuiCanvas::renderFrame(bool preRenderOnly=false, bool bufferSwap=true) Line 1498 C++
TestApp_DEBUG.dll!GuiCanvas::handlePaintEvent(unsigned int did=0) Line 206 C++
TestApp_DEBUG.dll!fastdelegate::FastDelegate1<unsigned int,void>::operator()(unsigned int p1=0) Line 993 + 0x1a bytes C++
TestApp_DEBUG.dll!Signal<void __cdecl(unsigned int)>::trigger(unsigned int a=0) Line 323 + 0x17 bytes C++
TestApp_DEBUG.dll!Journal::Call<Signal<void __cdecl(unsigned int)>,unsigned int>(Signal<void __cdecl(unsigned int)> * obj=0x03fddb28, void (unsigned int)* method=0x10564eaa, unsigned int a=0) Line 541 + 0xa8 bytes C++
TestApp_DEBUG.dll!JournaledSignal<void __cdecl(unsigned int)>::trigger(unsigned int a=0) Line 52 + 0x12 bytes C++
TestApp_DEBUG.dll!GuiCanvas::paint() Line 1329 C++
TestApp_DEBUG.dll!fastdelegate::FastDelegate0<void>::operator()() Line 908 + 0x16 bytes C++
TestApp_DEBUG.dll!Signal<void __cdecl(void)>::trigger() Line 312 + 0x13 bytes C++
TestApp_DEBUG.dll!Process::processEvents() Line 62 C++
TestApp_DEBUG.dll!StandardMainLoop::doMainLoop() Line 517 + 0x5 bytes C++
TestApp_DEBUG.dll!torque_enginetick() Line 78 + 0x5 bytes C++
TestApp_DEBUG.dll!TorqueMain(int argc=3, const char * * argv=0x0226d790) Line 369 + 0x5 bytes C++
TestApp_DEBUG.dll!torque_winmain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * __formal=0x00000000, char * lpszCmdLine=0x00556666, HINSTANCE__ * __formal=0x00000000) Line 423 + 0x17 bytes C++
TestApp_DEBUG.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpszCmdLine=0x00556666, int nCommandShow=1) Line 47 + 0x16 bytes C++
TestApp_DEBUG.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C
TestApp_DEBUG.exe!WinMainCRTStartup() Line 182 C
kernel32.dll!7505eccb()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!7701d24d()
ntdll.dll!7701d45f()

#1
08/11/2009 (9:15 pm)
Hi Gary,

It looks like the progress window is forcing a repaint of the Canvas within a frame render. Could you try adding || GFX->canCurrentlyRender() as shown below to Canvas::renderFrame in guiCanvas.cpp and let me know if it solves the problem for you?

void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */)
{
   AssertISV(mPlatformWindow, "GuiCanvas::renderFrame - no window present!");
   if(!mPlatformWindow->isVisible() || !GFX->allowRender() || GFX->canCurrentlyRender())
      return;
#2
08/12/2009 (6:33 am)
Yep... That solved the problem.
#3
08/17/2009 (4:07 pm)
Logged as THREED-659