Game Development Community

weird memory leak report

by Poh Keng Jin · in Torque Game Builder · 06/15/2012 (2:48 am) · 1 replies

I am checking memory leak for our game using VLD (visual leak detector) and it reports the following leak.
I am using torque2d pro 1.7.5.


---------- Block 31 at 0x0B980020: 8388640 bytes ----------
Leak Hash: 0xD7FF6117 Count: 1
Call Stack:
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platformwin32\winmemory.cc (67): TGBGame_DEBUG.exe!dRealMalloc + 0xC bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (199): TGBGame_DEBUG.exe!Memory::allocPage + 0x9 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (984): TGBGame_DEBUG.exe!Memory::allocMemPage + 0x9 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (1090): TGBGame_DEBUG.exe!Memory::alloc + 0x9 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (1458): TGBGame_DEBUG.exe!operator new[] + 0x13 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\dgl\gbitmap.cc (190): TGBGame_DEBUG.exe!GBitmap::allocateBitmap + 0x2B bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\dgl\gbitmap.cc (75): TGBGame_DEBUG.exe!GBitmap::GBitmap
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\t2d\t2dimagemapdatablock.cc (1524): TGBGame_DEBUG.exe!t2dImageMapDatablock::loadTextures + 0x5D bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\t2d\t2dimagemapdatablock.cc (646): TGBGame_DEBUG.exe!t2dImageMapDatablock::calculateFrames + 0xA bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\t2d\t2dimagemapdatablock.cc (481): TGBGame_DEBUG.exe!t2dImageMapDatablock::compileImageMap
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\t2d\t2dimagemapdatablock.cc (375): TGBGame_DEBUG.exe!t2dImageMapDatablock::onAdd
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\console\simmanager.cc (434): TGBGame_DEBUG.exe!SimObject::registerObject + 0xF bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\console\compiledeval.cc (713): TGBGame_DEBUG.exe!CodeBlock::exec + 0x8 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\console\consolefunctions.cc (1308): TGBGame_DEBUG.exe!cexec
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\console\compiledeval.cc (1533): TGBGame_DEBUG.exe!CodeBlock::exec + 0x1F bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\console\compiledeval.cc (1442): TGBGame_DEBUG.exe!CodeBlock::exec + 0x35 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\console\codeblock.cc (616): TGBGame_DEBUG.exe!CodeBlock::compileExec
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\console\console.cc (828): TGBGame_DEBUG.exe!Con::evaluate
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\game\main.cc (410): TGBGame_DEBUG.exe!runEntryScript + 0x3A bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\game\main.cc (447): TGBGame_DEBUG.exe!initGame + 0xD bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\game\main.cc (496): TGBGame_DEBUG.exe!DemoGame::mainInit + 0xD bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\gameinterface.cc (95): TGBGame_DEBUG.exe!GameInterface::main + 0x17 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platformwin32\winwindow.cc (1801): TGBGame_DEBUG.exe!run + 0x1D bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platformwin32\winwindow.cc (1960): TGBGame_DEBUG.exe!WinMain + 0x17 bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (547): TGBGame_DEBUG.exe!__tmainCRTStartup + 0x1C bytes
0x74F0339A (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
0x77629EF2 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes
0x77629EC5 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes


#1
06/18/2012 (12:30 am)
after removing all the bitmaps, i am still able to get the following leaks.
Does anyone have any clue or has encountered such leak?

---------- Block 4 at 0x03440020: 8388640 bytes ----------
Leak Hash: 0xCE5C89F6 Count: 1
Call Stack:
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platformwin32\winmemory.cc (67): TGBGame_DEBUG.exe!dRealMalloc + 0xC bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (199): TGBGame_DEBUG.exe!Memory::allocPage + 0x9 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (984): TGBGame_DEBUG.exe!Memory::allocMemPage + 0x9 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (1090): TGBGame_DEBUG.exe!Memory::alloc + 0x9 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (1450): TGBGame_DEBUG.exe!operator new + 0x13 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\threads\mutex.h (30): TGBGame_DEBUG.exe!Mutex::createMutex + 0x23 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (1052): TGBGame_DEBUG.exe!Memory::alloc + 0x5 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\platformmemory.cc (1450): TGBGame_DEBUG.exe!operator new + 0x13 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\platform\threads\mutex.h (30): TGBGame_DEBUG.exe!Mutex::createMutex + 0x23 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\console\simset.h (80): TGBGame_DEBUG.exe!SimSet::SimSet + 0x5 bytes
c:\program files (x86)\torque\torque game builder 1.7.5 pro\engine\source\t2d\t2dbasedatablock.cc (20): TGBGame_DEBUG.exe!`dynamic initializer for 'datablockSet2D'' + 0xD bytes
0x6993263D (File and line number not available): MSVCR100.dll!initterm + 0x16 bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (473): TGBGame_DEBUG.exe!__tmainCRTStartup + 0xF bytes