Game Development Community

Proof of TGB clobbering memory.

by Jon Frisby · in Torque Game Builder · 05/15/2007 (5:24 pm) · 3 replies

I doubt this is platform-specific, but the following steps show proof of memory clobbering on MacOS X:

1) Compile TGB 1.5B3, with no modifications to the code/project except to remove the missing component/interface/* files from the project.

2) Launch Torque Game Builder Debug.app under MallocDebug.

3) Crash.

...
PID:    2798
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x2fdb1f98

Thread 0 Crashed:
0   ...ragegames.torqueGameBuilder 	0x001d45e0 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 256 (t2dImageMapDatablock.cc:1944)
1   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
2   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
3   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
4   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
5   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
6   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
7   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
8   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
9   ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
10  ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
<repeat 20 times>
31  ...ragegames.torqueGameBuilder 	0x001d47c6 t2dImageMapDatablock::cFramePartition::insertPartition(unsigned const&, unsigned const&) + 742 (t2dImageMapDatablock.cc:1983)
32  ...ragegames.torqueGameBuilder 	0x001d485d t2dImageMapDatablock::cFramePartition::insertRootPartition(unsigned, unsigned) + 125 (t2dImageMapDatablock.cc:2044)
33  ...ragegames.torqueGameBuilder 	0x001d49a2 t2dImageMapDatablock::calculatePackFrameWaste(Vector<t2dImageMapDatablock::cFrameIn> const&, unsigned, unsigned, unsigned&, unsigned&) + 322 (t2dImageMapDatablock.cc:1793)
34  ...ragegames.torqueGameBuilder 	0x001d4f4e t2dImageMapDatablock::fitFrames(Vector<t2dImageMapDatablock::cFrameIn>&, Vector<t2dImageMapDatablock::cFrameOut>&, t2dImageMapDatablock::cTexturePage&, unsigned&) + 478 (t2dImageMapDatablock.cc:1638)
35  ...ragegames.torqueGameBuilder 	0x001d517a t2dImageMapDatablock::calculateDstFrames() + 90 (t2dImageMapDatablock.cc:1387)
36  ...ragegames.torqueGameBuilder 	0x001d5aeb t2dImageMapDatablock::calculateFrames() + 539 (t2dImageMapDatablock.cc:554)
37  ...ragegames.torqueGameBuilder 	0x001d5ffb t2dImageMapDatablock::compileImageMap() + 139 (t2dImageMapDatablock.cc:406)
38  ...ragegames.torqueGameBuilder 	0x001d63f2 t2dImageMapDatablock::onAdd() + 82 (t2dImageMapDatablock.cc:321)
...

#1
05/15/2007 (6:30 pm)
@Jon:

This has been solved for the next release ;p
#2
05/16/2007 (4:33 pm)
Neo: That's good to know!

Care to provide some insight into when the next release will be ready? Are there major blockers to be resolved yet, or is it mostly just a matter of finishing up detail-work? Or is there some external factor that's causing TGB to be a lower priority at the moment?

-JF
#3
05/16/2007 (4:54 pm)
@Jon:

I wouldn't know I'm afraid, I just report bugs as I find them, you would have to ask someone from GG ;p