HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Memory Leaks

12-20-2007, 04:33 PM#1
Szythe
I have a lot of triggers and functions, and I've looked through all of them a few times but can't find any memory leaks. I know that I do have leaks though, due to the classic signs such as gradual lagging of the game, and a long pause when the game unloads after the score screen.
Is there any program that can automatically parse through my triggers to find leaks? Or perhaps a program that can detect leaks while the game is running. Any help would be appreciated.

offtopic: i haven't been on this site in a while, you added my smiley!
12-20-2007, 04:42 PM#2
Zandose
Post the map since you said you had a lot.
12-20-2007, 04:54 PM#3
Szythe
Nobody's going to have enough time to go through my entire map, trigger by trigger
12-20-2007, 07:47 PM#4
Zandose
Sorry I didn't read your first post fully. I don't know of any programs that do that. Although, I once saw a web page that checked for leaks, but it was for basic leaks (you probably did a better job yourself), and I don't have it anymore. How many triggers are a lot and did you make them in GUI, jass, or vjass? Post your map and I'll try looking at it. I may not be able to check it all but I can try.

Edit: Found something interesting while looking around for leak fixing. A program to help clean up GUI leaks.
Attached Files
File type: zipLeak Check v2.zip (264.7 KB)
12-20-2007, 10:32 PM#5
Ammorth
If you are using JassNewGen, open your map in world-editor, make sure grimoire is on and enable "war3err". This will now warn you about leaks, where they are originating and even thread crushes (divide by 0, infinite loops, op limits) when you test the map.
12-20-2007, 10:41 PM#6
Zandose
I didn't know grimoire did that. The only thing I've gotten are thread crashes.
12-22-2007, 05:23 AM#7
Szythe
The leak reporting for grimoire is kind of iffy in my experience. Even when i know something is leaking 10 times a second, it wont report it until there 1742 leaked locations or something. It doesn't report for minor leaking problems. I have grimoire running and it hasnt picked up any leaks.
I'll post the map in a bit.

Here it is. It has a lot of lazy and messy coding, its basically a conglomerate of every system Ive ever made for one of my maps, merged into one. Its mostly JASS, with some of the simpler stuff in GUI because I'm lazy. Its a mess to scan for leaks.
Attached Files
File type: w3xBug Wars v0.03.w3x (302.2 KB)
12-22-2007, 10:07 AM#8
Fireeye
I'll take a look in your map and post every leak i'll find.
12-22-2007, 11:15 AM#9
zen87
the best way to fix this thing is - remade the whole map

thats what i did for my map xD, from UAIV to UAV~
12-23-2007, 03:24 AM#10
PipeDream
If you think grimoire's leak tracing is iffy it means that 1. your map is bugged 2. you didn't read the manual 3. probably not using the latest when you observed that behavior

In the old version, reporting would be triggered by RemoveLocation(null) / DestroyGroup(null). In the new version, RemoveLocation(null)/DestroyGroup(null) will alert you that your map is bugged, while RemoveLocation(ItoL(-1))/DestroyGroup(ItoG(-1)) report.
12-23-2007, 07:22 PM#11
Szythe
I havn't updated grimoire since I got it, I'll do that now