Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Kazan on July 28, 2004, 11:15:42 pm

Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kazan on July 28, 2004, 11:15:42 pm
http://www.deepbluebettas.com/fs2/28072004_fs2_open_r.zip

so taylor fixed the memory leak today as well.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: ChronoReverse on July 28, 2004, 11:29:41 pm
/me is a happy camper
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: redsniper on July 28, 2004, 11:45:12 pm
*dives out of the way as goo from the giant bug being squashed sprays everywhere*
:nervous:
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: JR2000Z on July 28, 2004, 11:51:25 pm
Taylor is on fire!!!!!
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kosh on July 29, 2004, 01:43:33 am
Thanks, Taylor, for making FSO playable again.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Nuke on July 29, 2004, 01:43:39 am
nice, been waiting awhile for a new build.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Gloriano on July 29, 2004, 02:48:05 am
Awesome I gonna test it
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Fury on July 29, 2004, 06:14:23 am
Is this a stable build? As in at least on-par with 3.6?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Fear on July 29, 2004, 06:32:20 am
Tested it and the memory leak is even huger. from 650mb ram in use in bobboau build. in this build i get 890mb ram of use.

besides loading is still huge and basiclly its fixed nothing for me only made is worse :( FSO still unplayable
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Flipside on July 29, 2004, 07:53:15 am
Have you tried it without the Media VP? Mine's still stop-start with the VP installed, and yet runs pretty darn well without it. I'm just wondering if we are pushing things a bit too far with the current .vp? Oddly enough most performance slow-downs 'seem' to be around TGA's and ANI's :( Oh yes and about a 1/2 second freeze whenever the subspace node appears.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Singh on July 29, 2004, 08:04:55 am
random CTDs with this build. Once, I got no error. BUt the second time I got this:

Error: ai_find_path tring to find a path (30) that doesn't exsist, on ship GTD Ionas
File:C:\projects\fs2_open\code\Ship\AiCode.cpp
Line: 3876

Call stack:
------------------------------------------------------------------
    28072004_fs2_open_r.exe 005dd2ca()
    28072004_fs2_open_r.exe 005ddbde()
    28072004_fs2_open_r.exe 004d6f6d()
    28072004_fs2_open_r.exe 004d9072()
    28072004_fs2_open_r.exe 004d9240()
    28072004_fs2_open_r.exe 004b1914()
    28072004_fs2_open_r.exe 0043b1da()
    28072004_fs2_open_r.exe 011f5d48()
    28072004_fs2_open_r.exe 0121f808()
    28072004_fs2_open_r.exe 01220448()
    28072004_fs2_open_r.exe 0123a148()
    28072004_fs2_open_r.exe 0123e3c8()
    28072004_fs2_open_r.exe 012414c8()
    28072004_fs2_open_r.exe 0123bf08()
    28072004_fs2_open_r.exe 01200e08()
------------------------------------------------------------------
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Svizel on July 29, 2004, 09:08:14 am
Quote
Originally posted by Flipside
Have you tried it without the Media VP? Mine's still stop-start with the VP installed, and yet runs pretty darn well without it. I'm just wondering if we are pushing things a bit too far with the current .vp? Oddly enough most performance slow-downs 'seem' to be around TGA's and ANI's :( Oh yes and about a 1/2 second freeze whenever the subspace node appears.

Try the "lite" versions of .vp files (http://www.hard-light.net/forums/index.php/topic,25664.0.html), it might help your game to run better with current builds. :)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: TopAce on July 29, 2004, 09:11:55 am
OK, I downloaded it. I wIll test it today as well as  post comments.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Inquisitor on July 29, 2004, 09:29:52 am
taylor is our resident guru.

donations accepted.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 29, 2004, 09:30:20 am
Try this build: 20040729-win32.zip (http://icculus.org/~taylor/fso/testing/20040729-win32.zip)

I don't get any leaks with this one so if anyone else does please let me know what cmdline options you are using.  This build is plain CVS with nothing special added.  It was tested with all of the normal MediaVPs and all graphics options turned on.

Singh: That is a known problem but we're not 100% sure why it's happening or what to do about it.  It will get fixed though.  What mission did you get that error on?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Singh on July 29, 2004, 09:36:56 am
Quote
Originally posted by taylor
Try this build: 20040729-win32.zip (http://icculus.org/~taylor/fso/testing/20040729-win32.zip)

I don't get any leaks with this one so if anyone else does please let me know what cmdline options you are using.  This build is plain CVS with nothing special added.  It was tested with all of the normal MediaVPs and all graphics options turned on.

Singh: That is a known problem but we're not 100% sure why it's happening or what to do about it.  It will get fixed though.  What mission did you get that error on?


I get a FPS boost with this build (at least, in the parts I was able to play) and on the whole, it just seems faster.

EDIT: meant the previous build, not this one, sorry.

The mission I tested on was one I was developing, and in a nebula.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Taristin on July 29, 2004, 09:39:24 am
Quote
Error: ai_find_path tring to find a path (30) that doesn't exsist, on ship GTD Ionas


Wow. An error with a spelling error... Strangeness...
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: kasperl on July 29, 2004, 09:45:15 am
I've seen it happen a lot during the D3D parts of debug.

You should see of the comments in the source......
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kazan on July 29, 2004, 09:47:02 am
taylor: did the 'known bug' show up recently? it may be my fault (when i added AIM_FLY_TO_SHIP)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: kasperl on July 29, 2004, 09:55:39 am
on spelling errors:

I've seen it happen a lot during the D3D parts of debug.

You should see of the comments in the source......
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Flipside on July 29, 2004, 10:04:07 am
-spec -glow -pcx32 -jpgtga -d3dmipmap -phreak -ship_choice_3d -targetinfo -nomotiondebris -2d_poof -snd_preload -dnoshowvid -show_mem_usage  -fov 0.39 -mod TwistedInfinities

Still getting jerkiness here with the .vp installed. I don't think I should be, I'm using a XP1700+ with 768Mb of memory, with a GeForce FX5600 with 256Mb of memory.

Something hints that it seems to be problematic when messages are sent, that's why I tried the pre-load sound flag, but it just seemed to make matters worse :(
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kazan on July 29, 2004, 10:06:09 am
even without the leak i get like 700MB total usage in WCSaga
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 29, 2004, 10:26:01 am
Quote
Originally posted by Kazan
taylor: did the 'known bug' show up recently? it may be my fault (when i added AIM_FLY_TO_SHIP)

It's in Mantis, I think it's been closed twice but people keep reporting it.  It's probably a memory issue but it was first reported (that I know of) in February.

http://mgo.maxgaming.net/mantis/bug_view_page.php?bug_id=0000087
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Fear on July 29, 2004, 10:27:04 am
hmm that strange only 700? i use 900 in this build.
my fps is gr8 but everyfew seconds i got 1/2sec freeze, or the fps just suck .

cant see why my comp CAN handle it i think
gigabyte sq800
1.6A ghz
512 ddr(dual channel)
r9500pro 128mb.
no o/c.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 29, 2004, 11:12:52 am
Quote
Originally posted by Flipside
-spec -glow -pcx32 -jpgtga -d3dmipmap -phreak -ship_choice_3d -targetinfo -nomotiondebris -2d_poof -snd_preload -dnoshowvid -show_mem_usage  -fov 0.39 -mod TwistedInfinities

Is is still happening if you don't use -spec, -glow, -pcx32 or -jpgtga?  If you don't use -glow or -spec then it won't load the textures and therefore saves memory.  -pcx32 will double the memory usage of a PCX so if you don't need it don't use it.  Run with -nosound and see if it's any better.

Fear:
If it's using that much memory and you only have 512meg of RAM then it's going to disk for the rest.  That's going to slow it down during disk access which may be the reason for the freeze.  What cmdline options and mods are you using to get a 900meg footprint?

Everyone:
The game loads every single texture that's used in a mission on load.  The more TGA and ANIs that are in there the higher the memory usage is going to be.  One of the explosions for instance can use 5.75meg of memory by itself.  There isn't a whole lot that the coders can do about this but we are trying to make sure that what gets loaded is actually going to be used so there is no waste.  When stuff is paged in during a mission then that's where a freeze or stutter comes from so we are going to get complaints either way.

If you don't have the memory then don't use the hi-memory options.  Stay away from -pcx32 and -jpgtga, use the non-TGA planets, don't use hi-poly ships.  Also don't run anything in the background if you can help it.  If the computer is already using 120megs of RAM before you start the game then things aren't going to work as well as they could.  We can plug every memory leak in the game but the memory usage will still get higher as more options are used.  The artists and mod makers can do as much to keep the memory footprint low as the coders can, if not more.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Flipside on July 29, 2004, 11:41:21 am
Ok, no change with -nosound, however, removing -pcx32 helped a bit. There was still a little stuttering at Warp-ins, and often when a message was incoming, but as you play the mission, the effects seem to wear off.

I'm going to install the lite .vp and see whether that helps, thanks for the link Svizel :)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Black Wolf on July 29, 2004, 11:45:26 am
Taylor - will using jpeg textures help or hinder memory usage? I'm asuming filesize is directly related to memory use, which could be faulty, I'll admit.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Flipside on July 29, 2004, 11:53:22 am
Jpeg are decompressed before going into memory, they take up the same amount of room as a 32bit pcx to a video card.

DDS is a good format because the tetures are stored compressed, that's why I try to use them where possible. They're not too wonderful for effects, but I may well have a go at creating DDS files of all the ship textures etc :)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 29, 2004, 12:03:57 pm
Quote
Originally posted by Black Wolf
Taylor - will using jpeg textures help or hinder memory usage? I'm asuming filesize is directly related to memory use, which could be faulty, I'll admit.

Long answer but I'm just covering all bases:

Memory usage is calculated like this: (w * h * Bpp * frames)

Width and height should be obvious.  Bpp is bytes-per-pixel so 8-bit is 1, 16-bit is 2, 32-bit is 4.  Frames isn't taken into account unless its an ani but you get the point.  Basically it doesn't matter what format you use (unless it's DDS) since a JPG version of a TGA image is still going to take the same amount of memory.  The only thing it takes less of is disk space.  DDS can be sent to the card still compressed (for those that support it) so it will always take up less memory.  Using smaller images when possible or just less of them makes the difference.  The fewer number of frames in an ANI the less memory it's going to use.  If you load ship with animated textures then it's going to add up.

For mod makers, mission design has a big impact.  Ship/weapon textures are loaded once for each image.  So if you have 10 Ulysses in a mission then it's only going to load one set of textures and use them on all 10.  If you have 10 different types of ships and a bunch of different crusiers and larger ships then the memory usage is going to go through the roof.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: TopAce on July 29, 2004, 12:07:49 pm
Question: If I use 70 nebula/planet backgrounds in a mission, does it slow down a game more if I only used 32 of them, but the 32 are different. The 70 case has for example 20 types of images, most of them are used multiple times.

Question 2: Does scaling affect memory usage/Frame per second?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: jdjtcagle on July 29, 2004, 12:10:30 pm
YAY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11
Does it work?*downloads*
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kazan on July 29, 2004, 12:26:13 pm
memory usage is based on total _UNIQUE_ images used

so using 20 unique images for a total of 20 times is the same memory usage as 20 unique images for a total of 80 times

ie 14 Hellcat V fighters = 1 * (Hellcat V's textures)
7 Hellcat V fighters and 7 Arror fighters = 1 * (HV's Textures) + 1 * (Arrow Textures)

10 Hecates = 1 * (Hecate Textures)
5 Hecates + 5 Deimos = 1 * (Hecate Textures) + 1 * (Deimos Textures)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: jdjtcagle on July 29, 2004, 12:56:37 pm
Works great!!! :)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 29, 2004, 02:12:17 pm
Quote
Originally posted by TopAce
Question 2: Does scaling affect memory usage/Frame per second?

Not system RAM but can save on video memory if scaling down.  It still keeps the true image size in memory and just sends the resized image to the video card.  Scale up and it takes more video memory, down takes less but the size of the image loaded in RAM stays the same.

Slightly OT but don't want a new post to say it:
In testing right now is some rather simple code that unloads ship textures when they are no longer used in a mission.  So if you have say a couple of Fenris that die or jump out early in a mission and there aren't any more later on then the memory from those textures is released.  This doesn't help on initial memory usage but can be of some help for mission designers.

For instance, you have an intense battle upon entering a mission and the ships involved were destroyed or departed and aren't used later in the mission.  The memory used from those ships gets freed and you have to more room to play with things like message anims, sounds, etc.  After the battle you could have a period of story/plot work without needing much more, if any, memory than you started with in the first place.

The intent of this code is to expand it to cover more areas and hopefully end up with image/object loading being smarter.  This will eventually give us a slightly quicker load time, less memory at start, and lets go of memory we don't need anymore so we can use it for something else.  All of this isn't going to be working anytime soon and is a long term goal.  The hope though is to give mission designers the freedom to create larger and more complex missions while at the same time having some control, or at least insight, into how the memory footprint is going to behave.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Starman01 on July 29, 2004, 04:08:35 pm
Quote
Originally posted by Fear
Tested it and the memory leak is even huger. from 650mb ram in use in bobboau build. in this build i get 890mb ram of use.

besides loading is still huge and basiclly its fixed nothing for me only made is worse :( FSO still unplayable


Sorry to say that, but same goes for me. The leak is even bigger and renders the games nearly unplayable. I have to reboot after each mission, and the overall framerate is around 20% less than the orginal 3.6. build

I haven't tried that alternative build yet, will do this tomorrow.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kazan on July 29, 2004, 04:31:38 pm
that's really odd.. are you sure you're both using the new build -- it wasn't name fs2_open_r.exe but the [date]_fs2_open_r.exe
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: CP5670 on July 29, 2004, 05:01:49 pm
I actually ran into the old-style crash with this, where it inexplicably dumps you into windows when certain keys are pressed. This used to happen in several builds around 3.5 but stopped happening at some point. For example, I have one mission where I can get it to crash every time if I enable cheats (www.freespace2.com) and press ~U, but it only happens in that one mission, and it's a simple test mission with almost nothing in it. Does that keystroke even do anything? I only hit it by accident instead of ~I. Other missions have similar issues with other keys, although this is the only 100% reliable mission/key combo I have found.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Fear on July 29, 2004, 05:19:44 pm
Quote
Originally posted by taylor


Fear:
If it's using that much memory and you only have 512meg of RAM then it's going to disk for the rest.  That's going to slow it down during disk access which may be the reason for the freeze.  What cmdline options and mods are you using to get a 900meg footprint?

 

C:\Games\FreeSpace2\28072004_fs2_open_r.exe -spec -glow -pcx32 -jpgtga -d3dmipmap -phreak -ship_choice_3d -2d_poof -d3d_no_vsync -max_subdivide -env -decals  -mod Port
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Flipside on July 29, 2004, 05:21:22 pm
decals and -max_subdivide would be the first two I got rid of ;)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: CP5670 on July 29, 2004, 05:26:49 pm
You can probably also remove pcx32 for that matter, which doesn't really do what the launcher description says.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: kasperl on July 30, 2004, 04:08:37 am
Quote
Originally posted by CP5670
I actually ran into the old-style crash with this, where it inexplicably dumps you into windows when certain keys are pressed. This used to happen in several builds around 3.5 but stopped happening at some point. For example, I have one mission where I can get it to crash every time if I enable cheats (www.freespace2.com) and press ~U, but it only happens in that one mission, and it's a simple test mission with almost nothing in it. Does that keystroke even do anything? I only hit it by accident instead of ~I. Other missions have similar issues with other keys, although this is the only 100% reliable mission/key combo I have found.


Mantis?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Fear on July 30, 2004, 06:14:51 am
i look everywhere can some 1 help me find 5.2 launcher?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: karajorma on July 30, 2004, 06:33:42 am
Go to the 3.6 thread and download launcher 5.x. The rar says launcher5 but is in fact 5.2.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Fear on July 30, 2004, 10:12:03 am
thnx
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Starman01 on July 30, 2004, 11:24:42 am
Quote
Originally posted by taylor
Try this build: 20040729-win32.zip (http://icculus.org/~taylor/fso/testing/20040729-win32.zip)

I don't get any leaks with this one so if anyone else does please let me know what cmdline options you are using.  This build is plain CVS with nothing special added.  It was tested with all of the normal MediaVPs and all graphics options turned on.


Hey, I tested this build (according to the filename I already used that
one earlier). After browsing this forum, I launched FS (without reboot)
and loaded a mission. I quit and reloaded the mission 3 times (without
reboot or even leaving freespace), and encountered no big memory-leak
at all. Game-speed was at normal 100% (my scale, just for
explanation)

So far so good. I rebooted, and used the new build again.

After loading the same mission the first time, my game-speed was
only 70% of the old speed. Without exiting Freespace (or reboot
again) I reloaded the same mission, and the game-speed was down
to 20 % !  Another reload would either freeze it, or CTD.

I fear that this will be a hard thing for you guys fixing it, but I'm
pretty sure you will find the error. Don't give up ! :)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Darkhill on July 30, 2004, 12:37:30 pm
Its weird, we are running just the vanilla 3.6 and don't seem to have these problems.  There is the memory leak, but we don't seem to get crashes or have the performance decline.  But then again we don't run *any* of the extra graphical goodies you guys have come up with.  I just wonder if it would be worthwhile to look into how the game is using all the new *.vps that have been added in.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: StratComm on July 30, 2004, 12:51:07 pm
darkchrono, that's not a memory leak, it's just high memory consumption.  The memory leak is memory that is not released even though it isn't being used, resulting in huge and contiunally growing pagefile/ram usage and eventual out of memory errors (crashing).  The RAM thing needs to be brought under control as well, but it's a completely different beast.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Starman01 on July 30, 2004, 01:12:09 pm
I forgot to post my flags:

-glow -jpgtga -fps  -ambient_factor 100

that is all, nothing special at all. Also I don't use any of the new
vp's.

However, I'm pretty sure that our (WC-Saga) stuff is uge, but in
the testmission are only 2 different capships, 2 different allied
fighter-types (6 at all) and 2 different enemy fighters (14 at all, but not
launched while this testing). However, there is a bunch of capships
coming in at the end of the mission (8 at all, 3 different types).
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kazan on July 30, 2004, 01:34:59 pm
make sure you're not confusing high memory usage w/ a leak --- WCS has huge usage even without a leak (700mb)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Starman01 on July 30, 2004, 01:56:31 pm
No doubt. But as I said, the performance drops every mission, since
this build I have to reboot after each played mission.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Tolwyn on July 30, 2004, 02:23:06 pm
Quote
Originally posted by Kazan
make sure you're not confusing high memory usage w/ a leak --- WCS has huge usage even without a leak (700mb)


the usage increases with every build, Kaz.

Additionally, I have troubles with the interface. Sometimes certain images won't be preloaded at all (there is really no pattern here: once I had no pilot avatars in the pilot room, another time debriefing background was not loaded, once (and only once) a mask file could not be found)

I am using: 29072004B_fs2_open_r.exe


Here are my specs

P4 2.67
1024 MB DDR Ram
160 GB
Radeon 9700 Pro

spec -glow -pcx32 -jpgtga -d3dmipmap -ship_choice_3d -2d_poof -snd_preload -dnoshowvid -ambient_factor 90
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 30, 2004, 03:26:46 pm
Quote
Originally posted by Starman01
No doubt. But as I said, the performance drops every mission, since
this build I have to reboot after each played mission.

If you have to actually reboot your computer to get the game working at a good speed then it's probably a system problem.  Anything that the game does should be undone when it exits.  Going to one of WMCoolmon's recent builds doesn't do this?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Cyker on July 30, 2004, 03:39:25 pm
Quote
Originally posted by taylor

If you have to actually reboot your computer to get the game working at a good speed then it's probably a system problem.  Anything that the game does should be undone when it exits.  Going to one of WMCoolmon's recent builds doesn't do this?

This is the theory but I've found that with Windows this is very rarely the case. Heck, even Linux doesnt always cleanly clear released memory blocks (I restart X now and again specifically to try and clear the creep from KDE!)

Windows 2000 and XP are not too bad at clearing an unloaded program out of RAM but they never seem to clear the handles to any shared libraries completely, and also I've had many cases where programs have crashed (e.g. FS2 ;)) and screwed something up in the system, causing all sorts of weird stuff to happen until reboot (Protected Memory my backside!)

I won't even talk about Win98 for this kind of thing... ;)  Although on the bright side it reboots very quickly :D

I personally haven't had many problems but I'm still using the release version of 3.6 - It's working beautifully, even in Win98! :)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Singh on July 30, 2004, 04:00:25 pm
Dunno bout you guys, but the win32 is the most stable and fastest build I've played to date - combined with the media Vp, it runs smoothly.

*sets this build as his current default :D
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 30, 2004, 05:15:04 pm
Quote
Originally posted by Cyker
This is the theory but I've found that with Windows this is very rarely the case. Heck, even Linux doesnt always cleanly clear released memory blocks (I restart X now and again specifically to try and clear the creep from KDE!)

That's why I said "should" :)   The Linux VM works pretty differently so they don't really compare but X can do some freaky stuff sometimes.

Going by his post he said the when he first tried it everything was fine and at 100% even after multiple mission restarts.  When he rebooted his computer things went downhill.  That screams of a system problem so if it now happens with other builds too then we'll know that for sure.

This memory leak fix is one of the main goals of 3.6.1 though so we need to make sure it's working well for everyone.  I'm going to post a new test build this weekend for the new pilot file format stuff so I want to try and get any additional memory fixes in there for testing too.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: castor on July 30, 2004, 07:12:09 pm
Quote
Originally posted by Singh
Dunno bout you guys, but the win32 is the most stable and fastest build I've played to date - combined with the media Vp, it runs smoothly.

I can confirm this regarding the 98-version.
Yet I seem to get frequent crashes on multi with this one? (didn't get those with previous 3.6 based builds).
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Starman01 on July 31, 2004, 03:38:14 am
Quote
Originally posted by taylor

If you have to actually reboot your computer to get the game working at a good speed then it's probably a system problem.  Anything that the game does should be undone when it exits.  Going to one of WMCoolmon's recent builds doesn't do this?


You get this wrong. Pls read my post above, I made some test with
different builds, and just for make sure, I have rebooted the system
every time before FS loads (just to make sure the memory is clear).

With standard 3.6 and escpecially the 20040401-build, I have no
slowdown, and can load missions many times without slowdowns.

But with the new build I can only play 1 mission (and that slower than
in the other builds), and then when loading another mission, the
game is nearly freezing.

I have no knowledge about the coding-stuff, but it is obvious that
the memory isn't cleared anymore when exiting a misson.

Of course Kazan's is right, WCS has a high-memory use, but we
haven't encountered this kind of problems before.

(edit) Thats the post I was referring to :


Hey, I tested this build (20040401) (according to the filename I already used that
one earlier). After browsing this forum, I launched FS (without reboot)
and loaded a mission. I quit and reloaded the mission 3 times (without
reboot or even leaving freespace), and encountered no big memory-leak
at all. Game-speed was at normal 100% (my scale, just for
explanation)

So far so good. I rebooted, and used the new build again.

After loading the same mission the first time, my game-speed was
only 70% of the old speed. Without exiting Freespace (or reboot
again) I reloaded the same mission, and the game-speed was down
to 20 % !  Another reload would either freeze it, or CTD.


Once again, this are my system-specs and used flags:

-glow -jpgtga -fps  -ambient_factor 100

P4, 2,0 GHz, 512 MB RAM,
WIN98SE, GF4 TI4200 64 MB
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Tolwyn on July 31, 2004, 03:50:18 am
also take a look at this (http://www.hard-light.net/forums/index.php/topic,25805.0.html)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 31, 2004, 09:01:16 am
Quote
Originally posted by Starman01
You get this wrong. Pls read my post above, I made some test with
different builds, and just for make sure, I have rebooted the system
every time before FS loads (just to make sure the memory is clear).

I did read it wrong sorry 'bout that.  Memory is cleared at the start of a mission and not the end but it's always been that way.  Are you using newer MediaVPs?  Try it without them and see if it makes a difference.  The mission load freeze sounds more like the known issue with hi-poly models, especially the Fenris.  I'm not sure about the slowdown though, this is the fastest build I've used in a long time.  Memory usage is a lot better than it used to be and the D3D leak is fixed so I don't know what's going on here.  I'll play with it some this weekend and try to recreate any of your problems.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Tolwyn on July 31, 2004, 12:32:16 pm
Quote
Originally posted by taylor

I did read it wrong sorry 'bout that.  Memory is cleared at the start of a mission and not the end but it's always been that way.  Are you using newer MediaVPs?  Try it without them and see if it makes a difference.  The mission load freeze sounds more like the known issue with hi-poly models, especially the Fenris.  I'm not sure about the slowdown though, this is the fastest build I've used in a long time.  Memory usage is a lot better than it used to be and the D3D leak is fixed so I don't know what's going on here.  I'll play with it some this weekend and try to recreate any of your problems.


Starman is using WCS data set. But I can confirm that same happens with FS2 (TGA maps, no high res models; I will have to make some more testing on this matter)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Starman01 on July 31, 2004, 01:34:47 pm
And it's definitly not happening with the alternate build you posted.

I have worked on a mission today, and launched FS and the same
mission more than 15 times with this build without any reboot, and it
has every time the same (good) performance.

And as Tolwyn already said, I'm only using the WCS-Stuff, no other
media-vp included.

But that brings me to something, I never deleted the orignial
Freespace-VP's out of the folder. So, I guess they are loaded
too everytime, right ?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: ChronoReverse on July 31, 2004, 02:28:30 pm
Hmmm, played through several missions of the main campaign and let it sit for a while too.  No memory leaks that I can notice (i.e. big ones).
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on July 31, 2004, 05:22:34 pm
Quote
Originally posted by Starman01
And it's definitly not happening with the alternate build you posted.

But that brings me to something, I never deleted the orignial
Freespace-VP's out of the folder. So, I guess they are loaded
too everytime, right ?

Ok, so you don't have a problem with the build I posted only Kazan's?  I don't know if Kazan had anything other than plain CVS in there but mine was a clean checkout.  I'll assume that this is really a non-issue but if you get the same problem in future builds please make sure we know.

I haven't been keeping an eye on any of the mods (except BWO) so this may be a dumb question... Is WCS designed to be standalone with no original VPs?  If that's the case then you can try deleting the original VPs if you want but I don't think it will make much difference.  A little memory is used for storing information about all of the VPs but not enough to matter.

Tolwyn:  Have you tried using the "-safeloading" cmdline option?  I wonder if CFILE is just getting some strange results during file search.  Also you said that it happens on random graphics but are they random in each session.  In other words, when a graphic doesn't show up on a screen is it always missing when you go back to that screen without exiting the game?  I know you said OGL doesn't work well for you but does the same thing happen there as well?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Scuddie on July 31, 2004, 09:56:04 pm
I dont know if anybody has the same issue, but when playing the first mission of the Casualties of War campaign, the game does it's calculation thing of high poly objects, and then proceeds to give me an out of memory error, in kernel32.dll.  In D3D, the game crashes, and in OpenGL, I just alt-tab back in and it resumes loading as if nothing happens.  This "problem" doesnt happen in any of the previous builds, so I'm guessing it's new.

BTW, since you guys have said you fixed some of the memory problems in D3D, have you been able to find and fix the random restart or freezing problem in D3D?
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Fear on August 01, 2004, 08:00:37 am
Quote
Originally posted by Tolwyn
also take a look at this (http://www.hard-light.net/forums/index.php/topic,25805.0.html)


i dont get it they have 300mb of textures .... but my memory use is at 1giga.... and growing with each build. the ONLY build that acctually worked for me was bobboau and in his build i used 600mb. still i will remind u i got 512 MB DDR.

My flags are
 -spec -glow -jpgtga -d3dmipmap -phreak -ship_choice_3d -2d_poof -d3d_no_vsync -max_subdivide -env  -mod Port
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Tolwyn on August 01, 2004, 10:00:22 am
Quote
Originally posted by taylor
Tolwyn:  Have you tried using the "-safeloading" cmdline option?  I wonder if CFILE is just getting some strange results during file search.  Also you said that it happens on random graphics but are they random in each session.  In other words, when a graphic doesn't show up on a screen is it always missing when you go back to that screen without exiting the game?  I know you said OGL doesn't work well for you but does the same thing happen there as well?


well, if the image is not there it stays this way unti the end of the session. Not that I can play further, since if a mask file is missing I get a CTD as shown above.

However, if pilot avatars are missing in the pilots room, they won't reappear, should I exit to main hall and enter it again.

And, no, I have not tried the option you mentioned, but I will definetely give it a try...
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Lightspeed on August 02, 2004, 09:56:04 pm
Two odd bugs (both builds):

1) Only joystick buttons 1 &2 as well as 7 & 6 seem to work in game. 3, 4, 5 (fire countermeasure, cycle secondary, next hostile) do NOT work at all. However, they *do* work in the settings, i.e. I can assign them normally.

2) One mission I tested (unfortunately not public) had another very odd bug. My view was 'flickering' around wildly (a bit like if in engine wash, but thousand times worse) all the time, making the mission unplayable. It is pretty much rotating 360° wildly around and around. If I switch to external view, this doesnt happen. The second I change back into cockpit view, it's there again. This has only happened with ONE mission (didn't happen with older builds), it does NOT matter which ship I choose, and is 100% reproducable.

Other than that, taylor's build seems a lot faster than Kazan's - the loading times are amazing, even though there still seems to be heavy memory issues in-game (though I'll have to say, they got a lot better.). I'll have to do more testing on this part to give you exact details.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kazan on August 02, 2004, 10:02:22 pm
lightspeed: look for my joystick fix in builds (dated the day after this)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Tolwyn on August 03, 2004, 01:52:59 am
strangely, keyboard support for a Logitech keyboard is broken too (since 3.5.5). Energy management buttons (assigned by default, namely Del, Ins, etc) do not work at all. However, I can assign 'em, as Lightspeed said, in the setings.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Singh on August 03, 2004, 06:59:40 am
another strange bug: my secondaries wont load in the vanilla FS2 campaign. In the mission where your supposed to get cyclops, there are none in the weapons selection screen!!
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on August 03, 2004, 08:31:33 am
Quote
Originally posted by Singh
another strange bug: my secondaries wont load in the vanilla FS2 campaign. In the mission where your supposed to get cyclops, there are none in the weapons selection screen!!

Most likely a pilot file problem.  Try hitting the Reset button in the weapon loadout screen.  May not help but sometimes it will restore the correct values.  Whenever your weapons tbl changes this can happen.

A lot of work has gone into permanently fixing this problem and a test build will be released tonight but if your pilot file is already messed up it can't be (easily) fixed.  Cool thing too is that you'll be able to use one pilot for multiple campaigns and be able to switch between those campaigns without losing any progress.  Think "resume". ;)
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Lightspeed on August 03, 2004, 07:48:15 pm
Quote
Originally posted by Kazan
lightspeed: look for my joystick fix in builds (dated the day after this)


I tried your 01/08 build. BOTH of the bugs I mentioned are fixed :)


Unfortunately it also seems quite a bit slower than taylor's build.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kazan on August 03, 2004, 09:18:22 pm
well if taylor would commit his damn changes
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: jdjtcagle on August 03, 2004, 10:34:29 pm
He's a perfectionist? :D
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kosh on August 04, 2004, 12:14:55 am
Something wierd I noticed with OGL (haven't tested it with D3D yet), but in any nebula mission, the debris from capital ships does not have any textures or colors. The shape appears correct, but it is just white.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: taylor on August 04, 2004, 08:53:01 am
Quote
Originally posted by jdjtcagle
He's a perfectionist? :D

To an insane level in fact. :)

Seriously though all of my changes that were in that build are in CVS.  About the only difference is that I build everything with USE_DEVIL so that OpenGL has TGA and JPG support.  I'm not sure where the difference in speed is coming from.

Kosh: If you see it in D3D let me know.  I'll test in OGL today and see if it's a problem for me as well.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Kosh on August 04, 2004, 06:09:43 pm
Ok, I tested it in D3D and was unable to reproduce the problem. It looks like just another OGL issue.
Title: Thus spoke taylor: "What memory leak?" [build attached]
Post by: Trivial Psychic on August 04, 2004, 11:26:19 pm
Taylor, I finally got around to testing your 07-29 build, and had some puzzling problems.  Basically, it destroyed all but a few of my joystick bindings.  They were still set as required in the controls, but they just wouldn't respond, except under a realy weird situation.  I have a scroll wheel on my stick (Logitech WingMan Strike Force 3D, :cool: ) and I have its up-scroll bound to primary weapon cycling, down-scroll bound to secondary weapon cycling, and the wheel-button bound to cycling secondary double-fire mode.  Under your build, these would do nothing, until I then touched one of the arrow keys (which I have bound to control shield quadrants), at which point it would activate one of the commands I'd attempted to perform from the stick buttons.  When I reverted back to Kazan's 08/01 build, everything worked fine.  I hope that helps you track down the problem.  Also, I haven't attempted it with the joystick force settings in the launcher.

Later!