Problem with virtual memory

Let us help you solve any problems you might have with TNM. This forum should remain spoiler-free - if your problem is spoilery in nature, please post in the forum above.

Moderator: TNM Team

Forum rules
Please only use this forum for problems of a technical nature. If you're stuck somewhere in the game, post in the TNM Spoiler Zone forum. If the game crashes, you can't load a savegame, or something just plain isn't working, this is the place to post.
User avatar
Servalan
Thug
Posts: 43
Joined: Thu Jun 18, 2009 9:11 pm

Problem with virtual memory

Post by Servalan »

I didn't want my first post here to be a complaint or a "Help me!!!" or anything other than a pat on the back to all involved with TNM for producing a terrific mod...but unfortunately I do have a problem I hope someone can assist with.

I'm on my sixth run through the game, have the 1.0.2 patch and one or two glitches aside all has been well...until this morning. On starting the game I get an error message: "Ran out of virtual memory. To prevent this condition you must free up more space on your primary hard disk" and the game doesn't load. Here is a screen shot of the error.

I've uninstalled and reinstalled (keeping my saved games) - no success. I have 13G free on my C drive and 33G free on my secondary drive (on which DX and TNM are installed), so that ought to be ample virtual memory. DX itself (along with Zodiac, Hotel Carone and RedSun) loads and runs normally so it's a TNM-specific issue.

Any suggestions / advice would be welcome. :smile:
And I hope, and I dream, and I pray
That sometime we'll find a way
justanotherfan
Illuminati
Posts: 2285
Joined: Sun Feb 27, 2005 11:28 pm

Re: Problem with virtual memory

Post by justanotherfan »

Strange. Sounds like Windows is giving the error, not DX. Try hitting ctrl-alt-delete, and go to the Task Manager (would just appear with WinXP), and sort the list by "mem usage". An open program may have a memory leak.

More likely it's just Windows' virtual memory settings. Rightclick My Computer, Properties, Advanced, Performance-Settings, Advanced, Virtual memory - Change. There's lots of disagreements about what the settings should be. To reduce fragmentation, I normally use a very large custom size (currently at the recommended 4.6gb), and set both the initial size and maximum size to the same number. If you set it to System Managed Size, Windows should sort it out.

Basically, do any reasonable Windows tweaking stuff you can find to optimize memory usage and such. I have seen Windows give out that specific "out of memory" error erroneously, however.
User avatar
Servalan
Thug
Posts: 43
Joined: Thu Jun 18, 2009 9:11 pm

Re: Problem with virtual memory

Post by Servalan »

Tried that, but the problem persists - and is unique to TNM. I don't have the issue with any other programme.

Thanks for the suggestion.
And I hope, and I dream, and I pray
That sometime we'll find a way
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Problem with virtual memory

Post by DDL »

It's a long shot, but you could try altering the value for cachesizemegs in TNM.ini (under [Engine.GameEngine], I think).

It's one value I know is different in TNM vs all other DX mods.

Needs to be a power of 2, I believe, so if it's set to 32, try putting it down to 16. And so on.

Assuming this makes any difference (it IS a long shot), this may make some maps more unstable as a side effect, but at least you'll be able to play.

And anyway, you'll be saving frequently, and in different save slots, right? Right?* :D



*you'd be suprised how many people seem to keep a single savegame, and then act shocked when it gets fucked and they have to start all over again. Seriously.
User avatar
Servalan
Thug
Posts: 43
Joined: Thu Jun 18, 2009 9:11 pm

Re: Problem with virtual memory

Post by Servalan »

It was set to 4. :? So I went the other way and set it to 16 and then 32...and I still get the error. So no joy there.

And I've learned the hard way to have a few savegames handy (played a whole Hell's Kitchen level in DX, went to visit Smuggler, went to leave, didn't pay attention to where I was standing...and was crushed by the descending elevator. Had I saved before I visited Smuggler? Of course not :roll: ).

Thanks for the suggestion.
And I hope, and I dream, and I pray
That sometime we'll find a way
that guy
The Nameless Mod
The Nameless Mod
Posts: 1312
Joined: Mon Apr 26, 2004 1:54 am
Location: Perth, Western Australia

Re: Problem with virtual memory

Post by that guy »

It shouldn't even need to use virtual memory unless you have really low ram. Presumably you have a decent amount of ram?
User avatar
Servalan
Thug
Posts: 43
Joined: Thu Jun 18, 2009 9:11 pm

Re: Problem with virtual memory

Post by Servalan »

Yep - 4G (we'll ignore the fact that I use 32 bit XP with that RAM).

It's a weird one. All was well until this morning. DX, other DX mods, and other programmes are working normally. But TNM keeps giving me this error.
And I hope, and I dream, and I pray
That sometime we'll find a way
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Problem with virtual memory

Post by Jonas »

Another long shot, but you could try moving your savegames somewhere else and see if that does anything. That's an even longer shot than what DDL suggested though.
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
that guy
The Nameless Mod
The Nameless Mod
Posts: 1312
Joined: Mon Apr 26, 2004 1:54 am
Location: Perth, Western Australia

Re: Problem with virtual memory

Post by that guy »

Does it crash immediately or does it seize up and then crash? If it was leaking memory rapidly enough to actually be filling your virtual memory then I would expect there to be a significant period of freeze before the crash.

Also can you clarify, when you examine tnm.exe in task manager is it using an unreasonable amount of memory?
User avatar
Servalan
Thug
Posts: 43
Joined: Thu Jun 18, 2009 9:11 pm

Re: Problem with virtual memory

Post by Servalan »

Jonas wrote:Another long shot, but you could try moving your savegames somewhere else and see if that does anything. That's an even longer shot than what DDL suggested though.
That didn't help, either.
that guy wrote:Does it crash immediately or does it seize up and then crash? If it was leaking memory rapidly enough to actually be filling your virtual memory then I would expect there to be a significant period of freeze before the crash.
It crashes pretty much immediately - click on shortcut, splash screen appears, a second or two passes, and the error appears.
that guy wrote:Also can you clarify, when you examine tnm.exe in task manager is it using an unreasonable amount of memory?
Looking at it just now after it keeled over, it was only using about 16M. Just for the heck of it I started DX and called up Task Manager; it's using around 77MB and it's running normally.

Now that I've moved my savegames I'll try wiping out everything and reinstalling. Thanks for the help. 8)


Edit: ...and that didn't work, either. Grrr.
And I hope, and I dream, and I pray
That sometime we'll find a way
justanotherfan
Illuminati
Posts: 2285
Joined: Sun Feb 27, 2005 11:28 pm

Re: Problem with virtual memory

Post by justanotherfan »

I've seen the error when Windows had plenty of RAM. It was either under Win2003 or Vista. I reinstall Windows when I come across too many stupidly broken things at once, so I wouldn't have fixed the problem.

You could have an application somehow hogging VM.
http://www.askdavetaylor.com/how_can_i_ ... ndows.html

The overkill fixes would of course be to reinstall windows, update drivers, reinstall and patch the game, etc.
User avatar
Jane_Denton
X-51
Posts: 931
Joined: Fri May 08, 2009 1:22 pm
Location: Earth

Re: Problem with virtual memory

Post by Jane_Denton »

Just throwing this out there.... but is it possible to play TNM in Safemode like Deus Ex? Safemode may resolve the weird memory issues you are having....
Who we are is but a stepping stone to what we can become...
User avatar
Servalan
Thug
Posts: 43
Joined: Thu Jun 18, 2009 9:11 pm

Re: Problem with virtual memory

Post by Servalan »

I've now checked out those options and aside from Firefox chewing up memory (as it does), there's nothing out of the ordinary. I've also tried rebooting and running TNM without anything else running, and I still get the same damned error. I can't think of anything that changed yesterday that's causing this issue with TNM and TNM only.

Oh, well. I'm probably overdue for a Windows reinstall anyway. That may be the only thing that will fix this nonsense.

Thanks, everyone, for the suggestions. 8)


Edit: I'll try the safe mode idea and see what happens.

Edit 2: That didn't work, either. Oh, well.
And I hope, and I dream, and I pray
That sometime we'll find a way
justanotherfan
Illuminati
Posts: 2285
Joined: Sun Feb 27, 2005 11:28 pm

Re: Problem with virtual memory

Post by justanotherfan »

I'm sure there is a fix. I used to search so hard to bring Windows installations back from the dead. Learned a lot of useless crap. Honestly, backing up and reformatting is the best way to fix Windows. When it isn't something specific that's broken, the whole system is borken.
User avatar
Servalan
Thug
Posts: 43
Joined: Thu Jun 18, 2009 9:11 pm

Re: Problem with virtual memory

Post by Servalan »

Well, now I feel like a complete twit. It occurred to me that uninstalling a programme doesn't get rid of every reference to it, so I decided to look in my DX\System folder and see if anything TNM-related was left. There were a couple of .ini files and a third file with no extension. Got rid of those, reinstalled, and the error is gone. :mrgreen: So I'll just assume one of the .ini files was somehow corrupted and get on with finishing the game again. At least I'll know what to do if it recurs.

Many thanks to all who responded to this thread, and again - kudos on a terrific mod.
And I hope, and I dream, and I pray
That sometime we'll find a way
Post Reply