Game Development Community

Memory Leak

by Andy Hawkins · in Torsion · 02/04/2007 (5:12 am) · 14 replies

After a heavy coding session the icons at the top of Torsion start to disappear and context menus are munted. I will grab a screeny next time I see it, but could there be a memory leak?

I am mainly staying in TGB, making changes, dropping out the game back to the level editor in TGB, reloading scripts and running the level again. Maybe this is why it's leaking?

#1
02/04/2007 (10:37 am)
I've been pretty careful about detecting and avoiding memory leaks, but it's possible that i missed one.

Ok... let's make sure i understand what your doing. You launched the TGB level builder from the Torsion debugger, you ran a long debugging session going from level builder to playing your level to editing a script and back, after a while Torsion started to get graphical glitches in the toolbar and context menus?
#2
02/04/2007 (2:14 pm)
Yep that's right. I'll try again tonite to make sure that's the cause. I assume Torque handles cleanup of it's objects right? It's just that no other program running (Outlook etc) while I'm doing this shows glitches.
#3
02/04/2007 (2:37 pm)
No i decided that cleanup of objects is for suckas. :)

I'll look into it.
#4
02/05/2007 (6:53 am)
Here's some pics to show you what's going on. Doesn't seem to make any difference if I Reload Scripts while still in Editor or just rerun from Torsion. After about 3 runs it starts doing this. I run XP home, ATI 9600 64Meg, 1Gig RAM.

First screen is when I want to use context menu to copy. I select text then right click and get this weird menu. Right click again and I get the usual menu (ie copy, paste etc)

Second screen is the memory leaky thingo. If I wave the mouse over the icons they reappear most of the time.


www.drewfx.com/Torque/rightClickError1.jpg
www.drewfx.com/Torque/ToolbarError2.jpg
#5
02/05/2007 (7:07 am)
This is the same behavior I have noticed as well.
#6
02/06/2007 (8:19 pm)
Hey guys. I'm still working on this issue. I've investigated and i too am seeing that the more script windows we open the more GDI handles end up being used. With 20 or so files we can quicky get to over 2000 handles. This *seems* to be a wxWidgets issue, but i haven't verified this yet.

Still the new beta has some improvements which didn't seem to make a difference in my system, but that you guys should check out.

Also could you guys give me some info on your systems? I'm wondering if the excessive handle usage is mostly sensitive on Win9x systems, as i've not been able to fully recreate this behavior on my system.
#7
02/06/2007 (10:04 pm)
WinXP pro, Intel P660, ATI X850Pro, 1Gb RAM
Same issue (as I mention in another thread)
#8
02/11/2007 (1:15 am)
I had the issue, and I am now reasonably sure it is fixed in the beta. I'll no for dead certain by this time tomorrow.

Just bought Torsion tonight. It's a really first class piece of software. It's too cheap (he says now that he's paid his money).

But seriously, after an hour of using it, it was a bigtime no-brainer decision. You've already saved me a ton of time.
#9
02/11/2007 (9:53 pm)
Oops, spoke a little too soon. However, the most grievous effects seem to be gone. I was also having the editor go completely haywire.

Memory usage seems to be growing more slowly. Still having the button effects Mr. Hawkins described, but nothing painful.

I get a little weirdness when running my mission via Torsion occasionally, but I think it has to do with some timing loops I have and the background data transfer between the apps sucking a little cpu up.

I'm running XP pro, gig of ram, Nvida 9800XT, Intel core duo e6600.

Still loving Torsion, though!
#10
02/12/2007 (11:20 pm)
It seems like Torsion doesn't like it when I restart a mission from the Mission Editor, when that Mission Editor was spawned from Torsion. That seems to accelerate things.

It also seems like its the length of time the mission runs, rather than the number of runs. After a long session, one thing I'll see is that the console spew continues in Torsion for several seconds after the Torque window has been destroyed. That's how I know it's time to restart Torsion once again. If I don't there are different symptoms, from the icons disappearing, to the script not changing when I click on the tabs. Or I can no longer select text...it varies.

However, I just remembered there is one more thing I know for sure, which is that I started using Torsion, I've started getting zombie Torquedemo.exe processes lying around. I first noticed when I went to shut down my machine and the system had to kill like 5 of them. It could be something else, but it seems unlikely....

I'm running TGE 1.5 btw.

Hardly onerous...just passing it along...
#11
02/16/2007 (10:33 pm)
You know, I have to admit, I find myself bypassing Torsion quite a lot now to avoid the issues that crop up. Tom, if it's important to you I'd be happy to send you some test data (my game). Although, I'm a little embarassed to say you'd need to sign a simple NDA.
#12
03/01/2007 (11:27 am)
FYI. New build up!.

@Lee - We avoid signing NDAs whenever possible and i don't think i'll start signing them for product bug fixes. Try the new build and please report your issues to our bug tracker.
#13
03/01/2007 (1:11 pm)
I certainly understand, just throwing it out there. I'll try the new build!
#14
03/04/2007 (9:46 pm)
Yep! Been up three straight days without a hitch!

Glad it wasn't something specific to my data. I'll keep an eye on the bug tracker.

Thanks!