[SOLVED] BUG ALL ITGB VERSIONS - Serious Memory leaks on objects collisions system
by Edoardo · in iTorque 2D · 06/28/2010 (3:07 am) · 60 replies
Build: All iTGB versions
Platform: OS X 10.6.4, Simulator iPhone
Target: On Device and on Simulator
Issues: Serious Memory leaks on objects collisions system possible cause Dictionary.cc
Steps to Repeat:
1. Run "iphoneTest" project on simulator or on device
2. remove PUAP_SCRIPT_CHANGE definition.
3. run the game with leaks instruments
4. Click "bounce" on the game screen
Suggested Fix: The problem the dealloc of mHashTable into Dictionary.cc
------------------------------------------------------------------------------------------------------------------------------
Hi all,
I've discovered serious memory leaks on collition systems when i remove from definitions PUAP_SCRIPT_CHANGE... .I did the tests from version 1.1 to version 1.4 of iTgb (and all have the same problem)
In my game I've memory leaks of approximately 1 MB per minute... :-(
If anyone can solve it.... to recreate the problem simply install the "iPhoneTest", with leaks Instruments and use the bounce mode.
After a few minutes you will notice a significant loss of memory.
In a game like mine where there are many collisions per second causes a crash after a few minutes.
I can't use PUAP_SCRIPT_CHANGE because my game is based on PSK: www.torquepowered.com/community/forums/viewthread/112599/1#comment-733991
I USE IN TEST THIS DEFINITIONS:
__IPHONE__
TORQUE_PLAYER
TORQUE_RELEASE
TORQUE_DISABLE_MEMORY_MANAGER
PUAP_OPTIMIZE
USE_COMPONENTS
This is a screenshoot of my instruments :

Platform: OS X 10.6.4, Simulator iPhone
Target: On Device and on Simulator
Issues: Serious Memory leaks on objects collisions system possible cause Dictionary.cc
Steps to Repeat:
1. Run "iphoneTest" project on simulator or on device
2. remove PUAP_SCRIPT_CHANGE definition.
3. run the game with leaks instruments
4. Click "bounce" on the game screen
Suggested Fix: The problem the dealloc of mHashTable into Dictionary.cc
------------------------------------------------------------------------------------------------------------------------------
Hi all,
I've discovered serious memory leaks on collition systems when i remove from definitions PUAP_SCRIPT_CHANGE... .I did the tests from version 1.1 to version 1.4 of iTgb (and all have the same problem)
In my game I've memory leaks of approximately 1 MB per minute... :-(
If anyone can solve it.... to recreate the problem simply install the "iPhoneTest", with leaks Instruments and use the bounce mode.
After a few minutes you will notice a significant loss of memory.
In a game like mine where there are many collisions per second causes a crash after a few minutes.
I can't use PUAP_SCRIPT_CHANGE because my game is based on PSK: www.torquepowered.com/community/forums/viewthread/112599/1#comment-733991
I USE IN TEST THIS DEFINITIONS:
__IPHONE__
TORQUE_PLAYER
TORQUE_RELEASE
TORQUE_DISABLE_MEMORY_MANAGER
PUAP_OPTIMIZE
USE_COMPONENTS
This is a screenshoot of my instruments :

About the author
The creator of HOOGA (available on Apple Store)
#42
07/01/2010 (9:30 am)
@Edoardo - I'll investigate the issue to see what can be reproduced on our side. Again, right now I'll only be able to test against the base engine until I have more time to give this a run with the PSK integration. Whatever findings we come up with I'll post here.
#43
To resolve the issue you can use iphoneTest only.
07/01/2010 (10:48 am)
@Michael, If you resolve the engine collisions bug (without the use of PUAP_SCRIPT_CHANGE) I'm sure that PSK work fine!To resolve the issue you can use iphoneTest only.
#45
07/08/2010 (3:28 pm)
I haven't had much time to really dig into this myself, but I know Luma has looked into it. The entire team is slammed right now, but we see your e-mails.
#46
07/08/2010 (3:44 pm)
@Michael you have a mail...
#47
Phillip has solved the problem...
Now I have not memory leaks.
Thanks to All.
07/12/2010 (3:10 am)
Hey Guys Phillip has solved the problem...
Now I have not memory leaks.
Thanks to All.
#49
We too have disabled PUAP_SCRIPT_CHANGE and are seeing significant memory leaks.
09/08/2010 (5:29 pm)
+1 for the resolution.We too have disabled PUAP_SCRIPT_CHANGE and are seeing significant memory leaks.
#51
I've been using iTorque 1.3.1 but downloading & looking at the code [for 1.4] the problem still appears to be present.
If any Torque developer is reading where can I send the modified Dictionary.h and Dictionary.cc?
EDIT: note the version I checked--1.4
10/13/2010 (6:44 pm)
I've got a fix for this problem (disabling PUAP_SCRIPT_CHANGED causes the scripting engine to leak memory).I've been using iTorque 1.3.1 but downloading & looking at the code [for 1.4] the problem still appears to be present.
If any Torque developer is reading where can I send the modified Dictionary.h and Dictionary.cc?
EDIT: note the version I checked--1.4
#52
11/22/2010 (9:24 pm)
What is the fix to this issue? I didn't see an official solution other than Phillip fixed it.
#53
11/22/2010 (9:26 pm)
Hey Darren, I didn't fix it. I modified the PSK so that users weren't required to disable PUAP_SCRIPT_CHANGED. I'm not sure if there is a fix available or now.
#54
11/22/2010 (9:28 pm)
Thank you Phillip.
#55
11/22/2010 (9:46 pm)
Jeff Vavasour, can you post your fix?
#56
11/22/2010 (10:32 pm)
The changes aren't very localised within the affected files. Is there somewhere I could email it?
#57
FYI, addressing these leaks is my final step before releasing my game. Will post within the next week or so when it's in the store.
11/22/2010 (11:14 pm)
Jeff, I greatly appreciate this. You can e-mail it to deckerd@guruassist.com. Huge Thanks!FYI, addressing these leaks is my final step before releasing my game. Will post within the next week or so when it's in the store.
#58
12/09/2010 (9:09 pm)
Could you please send me the fix as well? Juason1 @gmail.com. Thanks!
Torque Owner Edoardo
Default Studio Name