Game Development Community

[BUG: T3D 1.1 Beta 1] Crash on Exit - TextureObject Usage Report - LOGGED

by Matt Huston · in Torque 3D Professional · 04/29/2010 (6:46 pm) · 14 replies

This usually happens when I press the top-right Windows close (X) button while still in Mission though it happens after returning to the Main Menu too though it seems to be a bit inconsistent in that case.

Seems to be a matter of mBackBufferCopyTex not being removed as a texture object.

Console
GFXTextureObject Usage Report - 1 active TOs
---------------------------------------------------------------
 Addr   Dim. GFXTextureProfile  ProfilerPath DebugDescription
 9d448e0  (1024,  768)  PostFxTargetProfile    MainLoop -> CanvasRenderControls -> GameRenderWorld -> SceneGraphRender -> TraverseScene -> RenderCurrentImages -> RenderPassManager_Render    mBackBufferCopyTex
----- dump complete ---

Callstack:
>	T3D_DEBUG.dll!Platform::debugBreak()  Line 18	C++
 	T3D_DEBUG.dll!GFXDevice::~GFXDevice()  Line 207	C++
 	T3D_DEBUG.dll!GFXD3D9Device::~GFXD3D9Device()  Line 122 + 0x72 bytes	C++
 	T3D_DEBUG.dll!GFXPCD3D9Device::~GFXPCD3D9Device()  + 0x14 bytes	C++
 	T3D_DEBUG.dll!GFXPCD3D9Device::`scalar deleting destructor'()  + 0x14 bytes	C++
 	T3D_DEBUG.dll!GFXDevice::destroy()  Line 176 + 0x23 bytes	C++
 	T3D_DEBUG.dll!`anonymous namespace'::_GFX::_ModuleInst::shutdown()  Line 30	C++
 	T3D_DEBUG.dll!ModuleManager::shutdownSystem()  Line 354	C++
 	T3D_DEBUG.dll!StandardMainLoop::shutdown()  Line 262	C++
 	T3D_DEBUG.dll!torque_engineshutdown()  Line 136	C++
 	T3D_DEBUG.dll!TorqueMain(int argc=1, const char * * argv=0x01fec500)  Line 376	C++
 	T3D_DEBUG.dll!torque_winmain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * __formal=0x00000000, char * lpszCmdLine=0x00605742, HINSTANCE__ * __formal=0x00000000)  Line 423 + 0x17 bytes	C++
 	T3D_DEBUG.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpszCmdLine=0x00605742, int nCommandShow=1)  Line 47 + 0x16 bytes	C++
 	T3D_DEBUG.exe!__tmainCRTStartup()  Line 324 + 0x35 bytes	C
 	T3D_DEBUG.exe!WinMainCRTStartup()  Line 196	C

My Specs:
Windows 7 x64 Home Premium
AMD 965be CPU
ATI 4870x2
4GB DDR3 RAM

#1
08/22/2010 (4:57 am)
Logged as TQA-903 for QA to verify
#2
09/03/2010 (3:45 pm)
@Matt
Does this still occur for you in 1.1 Beta 2?
#3
09/04/2010 (3:33 pm)
@Scott

Yes it did - it has something to do with this resource actually. I thought it was related to a specific model but ended up not being. - http://www.torquepowered.com/community/resources/view/17821
#4
07/26/2011 (4:12 pm)
Did this ever get resolved? I have this problem on 1.1 release.
#5
07/26/2011 (5:04 pm)
@John

Hasn't been happening for me so I think this specific issue has been fixed
#6
07/27/2011 (9:19 am)
Does anyone know what was done to fix it?
#7
07/27/2011 (9:45 am)
@John Carroll: Are you using 1.1 Final?
#9
07/27/2011 (11:28 pm)
I have this problem using 1.0 without code changes.
The texture object for the back buffer is not being removed,it results badly in a memory leak.
If I disable postfx on exit it stops crashing,I am using this as a workaround for now.
I am also interested what was the fix for 1.1 final.
Thanks.
#10
07/28/2011 (9:40 am)
Any word from GG on this issue? Maybe I should start a new thread to get some attention?
#11
07/28/2011 (9:41 am)
@John, I think you need to describe more specifically the issue you are having and specifics for repeating it. The issue I originally posted about was related to having PostFX turned on and closing Torque.
#12
07/28/2011 (12:33 pm)
Ok, here's the debug output:

*** ENDING MISSION
CDROP: 4232 
Exporting server prefs...
Exporting client prefs
Exporting server prefs
The thread 'OpenAL Update Thread' (0x1fa0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2504) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1e38) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1cf4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xc48) has exited with code 0 (0x0).
'MongooseIG.exe': Unloaded 'C:WindowsSysWOW64adi_oal.dll'
The thread 'ThreadPool(SFX) WorkerThread 0' (0x2584) has exited with code 0 (0x0).
The thread 'ThreadPool(SFX) WorkerThread 1' (0x1c88) has exited with code 0 (0x0).
'MongooseIG.exe': Unloaded 'C:WindowsSysWOW64OpenAL32.dll'
Cur. D3DDevice ref count=1
The thread 'Win32 Thread' (0x1d0c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x26fc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1bb0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2068) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2454) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x10a8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1ed0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2314) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2564) has exited with code 0 (0x0).
'MongooseIG.exe': Unloaded 'C:WindowsSysWOW64atiumdva.dll'
'MongooseIG.exe': Unloaded 'C:WindowsSysWOW64atiumdag.dll'
'MongooseIG.exe': Unloaded 'C:WindowsSysWOW64aticfx32.dll'
GFXTextureObject Usage Report - 1 active TOs
---------------------------------------------------------------
 Addr   Dim. GFXTextureProfile  ProfilerPath DebugDescription
 128d5ff0  (1280,  720)  PostFxTargetProfile    MainLoop -> CanvasRenderControls -> GameRenderWorld -> SceneGraph_renderScene -> SceneGraph_batchRenderImages -> Scene_renderObjects -> RenderPassManager_RenderPass -> RenderPassManager_Render    mBackBufferCopyTex
----- dump complete -------------------------------------------
l:mongoose.06.10.2011.branchsrcthirdpartyt3denginesourcegfxgfxdevice.cpp(254) : Fatal - There is a texture object leak, check the log for more details.
MongooseIG.exe has triggered a breakpoint

We are doing nothing with PostFxTargetProfile. We are not using PostFx at this time (but it maybe turned on, I will investigate). The scene is nothing special, other than there is no sun or terrain, only an interior and various static objects. There is one object of our own design (we have ported it from a previous version where it worked fine), which is basically a tsStaticObject which has been modified to suit our needs. When running with torsion this does not fail.

Thanks for any advice...

On edit: I have disabled PostFX and the problem goes away. We are not using PostFX intentionally at this time, but in the very near future we will need the DOF post effect.
#13
08/07/2011 (4:24 am)
This thread is marked as resolved,but the memory leak still presents in 1.0 and 1.1 final when postFX is extensively used.
#14
08/14/2011 (11:01 pm)
This turned out to be not a bug.
If I call quit() inside GuiControl::OnRender() T3D will crash.
The solution is to not call quit() there.
Another solution is to set the pref for PostFX to 'false' and then call quit().
The rendering in PostFx manager will stop ,the texture object would not allocate memory and T3D will quit as usual with no crash.