Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Fineus on June 20, 2004, 11:44:44 am

Title: Virtual Memory Issues
Post by: Fineus on June 20, 2004, 11:44:44 am
This may well have been raised before - but I'm running into serious problems running FSO with all the features turned on.

Obvious answer? Turn them off.

But I'd still like to find out if there's a way around this... no other game has this issue at the moment - and after playing one of Lightspeeds nebula preview missions to test out the newly skinned Perseus - I ended the mission and suffered a Crash To Desktop along with the message that virtual memory was seriously low.

Opening task manager I found that the standard Windows task Explorer had ballooned from around 10mb to over 200mb in memory usage. Shutting down and restarting the task fixed the low memory problems.

I'm imagining that there's a lot of textures and what have you being booted up now - what with high res ship, nebula and weapon textures as well all the other stuff.

I'm running the latest version of all files (FSO version 3.6) and have a 1GB virtual memory paging file (...going to up this to 3GB in an attempt to solve the problem).
Title: Virtual Memory Issues
Post by: Darkhill on June 20, 2004, 12:04:48 pm
This is a problem I get with it too.  I don't run any of the fancy stuff.  But if I start and end the program several times my system starts to degrade from the low virtual memory.
Title: Virtual Memory Issues
Post by: Fineus on June 20, 2004, 12:26:17 pm
Mm, understandable - I've upped the VM to about 3.0GB and haven't experienced any slowdowns or crashes (which is nice). However I still get the feeling there's a memory leak somewhere...
Title: Virtual Memory Issues
Post by: Lightspeed on June 20, 2004, 12:32:16 pm
Well, seeing as FS2open uses ~1500 MB of memory (!!!) there has to be something really wrong somewhere.
Title: Virtual Memory Issues
Post by: SA22C on June 20, 2004, 03:47:59 pm
Yeah, I usually get out of memory crashes after five or six consecutive missions.  I've also started getting the stutter when new ships appear again.
Title: Virtual Memory Issues
Post by: Starman01 on June 20, 2004, 04:04:58 pm
I have the same problems. Most errors related to this are enormous
performance drops in the game right after mission start (And I use
more or less standard-flags).

Reloading the missions, or re-exiting the game solves this matter.
Looks like FS has problems loading stuff correctly. (I even encountered
this matter inside a newly created mission, where I switch the models from
5 capships to nav-bouys and back the other way).

When Exiting the game, the PC seems to be heavy busy deleting
temporary files from the HD.
Title: Virtual Memory Issues
Post by: Turambar on June 20, 2004, 04:05:13 pm
we should direct our efforts to fixing this before we do anything else.

we being the coders..... (wonders why he said we)
Title: Virtual Memory Issues
Post by: jdjtcagle on June 20, 2004, 04:07:57 pm
My problem is that when I exit freespace 2, it takes a long time for me to run anything else, because it's so slow...
Title: Virtual Memory Issues
Post by: Lightspeed on June 20, 2004, 05:19:25 pm
Thats all the memory being freed again.

Seriously - there's no way it should take up such extreme amounts of memory.

There's some really really fishy things going on, and we need to fix them.... but how?
Title: Virtual Memory Issues
Post by: Kosh on June 20, 2004, 10:13:37 pm
I got the same thing as Lightspeed. Definate memory leak somewhere.
Title: Virtual Memory Issues
Post by: Darkhill on June 20, 2004, 10:29:56 pm
I don't remember this being a problem with FS2.  It has to be somewhere in the code updated for DX8.
Title: Virtual Memory Issues
Post by: ShadowDrakken on June 20, 2004, 10:32:43 pm
LS: "but how" isn't there a project to rewrite the engine from the ground up to use the same data files but with a more modern and stable engine? if not, there should be :)
Title: Virtual Memory Issues
Post by: WMCoolmon on June 21, 2004, 12:13:41 am
It might be useful to know how much the difference is between fs2_open and retail fs2 using vanilla data *cough cough*.

My contribution is the currently-faulty load-only-used-weapons code. :p
Title: Virtual Memory Issues
Post by: Lightspeed on June 21, 2004, 07:13:20 am
Quote
Originally posted by ShadowDrakken
LS: "but how" isn't there a project to rewrite the engine from the ground up to use the same data files but with a more modern and stable engine? if not, there should be :)


dream on.

That will a) never get finished b) be just the same as buggy c) not be FS2 anymore.
Title: Virtual Memory Issues
Post by: kasperl on June 21, 2004, 07:51:18 am
SD: Ferrium
Title: Virtual Memory Issues
Post by: WMCoolmon on June 21, 2004, 03:46:55 pm
Quote
Originally posted by ShadowDrakken
LS: "but how" isn't there a project to rewrite the engine from the ground up to use the same data files but with a more modern and stable engine? if not, there should be :)


If Ferrium comes out, it's much more likely the game will use formats optimized for newer stuff and you'll have to use a converter.
Title: Virtual Memory Issues
Post by: taylor on June 23, 2004, 04:53:19 am
Just a note that I'm working on finding these leaks.  I've found and fixed almost 1Meg of recurring memory loss (lost each mission load) but there looks to be about 3 times that getting lost.  It's not enough to explain the 1500+ Meg mem usage but I'll keep working on it.

Can someone with this huge memory usage please post a set of numbers with and without the media VPs (and no mods) for me to compare against.  With every option on and all of the media VPs I can't get above 630Meg.  A plain FS2_Open is about 1/3 that number for me.  Even with the memory leaks I'm seeing it would be very hard to hit 1.5 Gig (you'd have to load over 200 levels) so there has to be something else going on.
Title: Virtual Memory Issues
Post by: WMCoolmon on June 26, 2004, 04:44:22 pm
I'm seeing a 100 MB increase per mission with the Media VPs and Derelict. It seems to drops down about 150 MB, then goes back up 250, after the first mission loading, when I load the same mission.

A thought...Are preloaded sounds being freed?

Edit: command line stuffs
Quote
E:\games\freespace2\fs2_open_ex.exe -glow -jpgtga -phreak -ship_choice_3d -targetinfo -nomotiondebris -snd_preload -pcx2dds -d3d_no_vsync -fps  -mod derelictdata
Title: Virtual Memory Issues
Post by: Jonathan_S47 on June 26, 2004, 05:02:58 pm
I used to have a lot of Virtual Memory problems on my laptop (it has 256MB worth of ram and it is trying to run windows XP pro….. yeah…). I then downloaded a RAM defragmenter program all I haven’t had much of a problems since. Here is the link to the one I use.

http://www.amsn.ro/index.php?action=8