Fix for 'Out of Memory' Crash


Anaharra

 

Posted

Until yesterday, my comp was routinely crashing in CoH with the now-familiar 'the game has run out of memory and must now exit' problem. After some diligent research and testing yesterday and today, I think I may have found a possible solution to the problem. I am not a programmer, but I will try to be as clear and concise as possible.

If your system has more than 4GB of RAM, you may be able to benefit from the solution I found. I'm running Windows 7 32-bit version with a Quad Core 2.83GHz CPU, with 4GB of RAM and a GTX 580 w/ 2782MB of memory (from my dxdiag). Your mileage may vary depending on your system.

Another thread on this board mentioned the '3GB switch', which is a setting in Windows that allocates more memory to user-mode applications and less to the kernel-mode applications. You need at least 4GB of RAM for this to be a viable option for your comp, and it helps if you don't run a lot of other programs in the background. You definitely don't want to choke out the kernel-mode applications, since as I understand it they're mostly keeping your computer alive.

Allocating more memory to user-mode applications (like CoH) sounds great. However, you also need to give a given application permission to use more memory than it would normally be allowed. To do this, you need to set the LargeAccessAware flag for that program. This can be done through the registry, which I do NOT recommend. There is an application you can get, though, that will allow you to flag CoH in this manner.

By increasing the amount of available user-mode memory, and flagging CoH as a program that is allowed to use more memory, I went from crashing more than once an hour (a lot more often if I hung around Atlas Park) to not crashing at all yesterday or today. I even put it to a severe test today by running the Underground Trial with Ultra settings turned up (not maxed, but very high), and I never had a hitch or a crash. After UG I ran a number of BAF's and Lambda trials in succession, also without crashing. I am satisfied that this fix has curtailed the 'out of memory' crash issue for me.

The step-by-step process to enable this is simple, but CAUTION: I am not a computer expert, I do not know anything about your particular computer. I know what worked for THIS computer. Make a restore point so you can roll back if you have any problems, and save all the information below so you can undo the changes if need be.

To enable the 3GB switch on Windows Vistaâ„¢ or Windows 7:
1) Right-click Command Prompt in the Accessories program group of the Start menu. Click 'Run as Administrator'.
2) At the command prompt, enter "bcdedit /set IncreaseUserVa 3072"
3) Restart the computer.

To disable the 3GB switch:
1) Right-click on Command Prompt in the Accessories program group of the Start menu. Click 'Run as Administrator'.
2) At the command prompt, enter "bcdedit /deletevalue IncreaseUserVa"
3) Restart the computer.

The Large Address Aware application can be found at this link:

http://www.techpowerup.com/forums/at...2&d=1269231650

The source page is here, and I recommend that you read it and understand it before you use the application: http://www.techpowerup.com/forums/sh...d.php?t=112556

After you download the application, run it, install it wherever you wish, then open it up. It will give you the option to Select an Executable to give permission to. Locate your cityofheroes.exe wherever you have it saved (C drive, etc.) using the Browse function in the app. Once you've selected it, you'll have the option to flag it with a check mark, enabling the Large Access Aware flag in your system. And that's all there is to it, although it can't hurt to restart your machine again.

I hope this helps out folks who've been running into the same frustrating problem I was. No crashes all day yesterday and today made me very happy. If you have any questions, please let me know, I will do my best to answer.

PLEASE do take precautions by setting a restore point BEFORE making any changes, and make a note of how to undo what you did in case you have any problems!


"Thank God I'm only watching the game, controlling it!"

 

Posted

Thank you for posting this.

It doesn't do me a bit of good directly, but every helpful post to keep the game running a smooth as possible is appreciated.


 

Posted

Several days later and I have not had any 'out of memory' crashes following this fix. I hope anyone who's been having this problem finds this suggestion to be helpful! I will not be bumping this again, so good luck to all.


"Thank God I'm only watching the game, controlling it!"

 

Posted

Can we get a Red Named approved test and sticky of this?


 

Posted

Just tried this out on two different machines and it seems to be working extremely well. Before I could not stay in atlas for more than 30 to 45 SECONDS, now I've run around for nearly 30 mins. I will report back later with more results.


 

Posted

Please note that the idea of the LargeAccessAware flag is mostly a legacy for *developers* to use when they have written their 32-bit application to be able to address more than 2Gb of RAM and the /3Gb switch is a bit of a half-***** fix.

Thus - and this is the important bit - while this may fix the Out of Memory problem on some 32-bit systems it's a hack and there is a good chance that it will cause other crashes as a result of things trying to access memory that they're not supposed to be accessing as well as reducing the amount of memory available for Kernel Mode apps, which could equally cause issues.


Omnes relinquite spes, o vos intrantes

My Characters
CoX Chatlog Parser
Last.fm Feed

 

Posted

As far as I know, the large address aware thing also works on a 64 bit system, if you're using it on a 32 bit program - which CoH is, as far as I know. So it might be worth trying if you're on a 64 bit system with more than 4gb of ram as well.


[Admin] Emperor Marcus Cole: STOP!
[Admin] Emperor Marcus Cole: WAIT ONE SECOND!
[Admin] Emperor Marcus Cole: WHAT IS A SEAGULL DOING ON MY THRONE!?!?

 

Posted

Is there any solution out for those of us with only 2 GB of RAM on our machines? This doesn't look like it'll help me much, and I've been getting the Out of Memory errors and just general crashing with increasing regularity.


You want to know the secret of the world? It's this: Save it, and it'll repay you, every second of every day.
@Dr. Reverend - My DeviantArt Gallery
Crow Call - Gods of the Golden Age

 

Posted

Quote:
Originally Posted by Doc_Reverend View Post
Is there any solution out for those of us with only 2 GB of RAM on our machines? This doesn't look like it'll help me much, and I've been getting the Out of Memory errors and just general crashing with increasing regularity.
If you set Windows' virtual memory paging file (swap) to a value 2GB or larger, the /3GB option will also work on machines with only 2GB of physical RAM installed.


 

Posted

I appreciate this information. I have 16GB myself, and hardly any of it is being used! It galls me to get these out of memory errors when I have so much! Here's hoping this fix will improve things, since they've gotten pretty bad lately! I'll post whether or not this happens again after one of my marathon gaming sessions (takes a few hours normally).


 

Posted

How many people are still seeing 'out of memory' crashes?


 

Posted

Quote:
Originally Posted by Tex View Post
How many people are still seeing 'out of memory' crashes?
I used to get them quite frequently -- whenever I ran one or two trials -- and I haven't had one in a long time, though I have been running fewer trials. It seems to have definitely improved.


 

Posted

Quote:
Originally Posted by Tex View Post
How many people are still seeing 'out of memory' crashes?
I never had a single one till last week's update, and now I get them about once every couple hours, preceded by an ever-choppier game when I try to rotate the camera. Ran a MoM last night and my system could handle all the crazy graphics from 24 people fighting if I stood still, but if I tried to move it became a slide show. You can imagine how many times the pink circles of death got me.


 

Posted

well I have not had this problem ,but one big TY to OP,if this does not cause other problems,this will be a big help.


Fluffy Bunny 1 Person SG
Rabid Bunny 1 Person VG
Both on Pinnacle
Hobbit's Hole 1 Person SG
Spider's Web 1 Person VG
Both on Freedom

 

Posted

Quote:
Originally Posted by Tex View Post
How many people are still seeing 'out of memory' crashes?
I am, haven't tried the fix yet, but just wanted to lump my name in there with the folks having in-game memory issues. For me it's usually the "memory allocation failed" for one texture or another. I've been through troubleshooting with tech support, and after a while just gave up as there didn't seem to be anything they could tell me. =/


-@Wenchette
----
[Insert long list of alts and only ONE level 50 after alll this time]

 

Posted

Quote:
Originally Posted by Tex View Post
How many people are still seeing 'out of memory' crashes?
I am encountering this error nonstop on my girlfriend's computer. It shows up as a corrupt Pigg file error. I've tried every method on the forums and it doesn't relent.


The Story of a Petless MM with a dream
Quote:
Originally Posted by Deus_Otiosus View Post
This entire post should receive some kind of award for being both hysterical and fantastic.
Well done.
I have a 50 in every AT, but Scrappers and Dominators are my favorites.

 

Posted


If the game spit out 20 dollar bills people would complain that they weren't sequentially numbered. If they were sequentially numbered people would complain that they weren't random enough.

Black Pebble is my new hero.

 

Posted

Besides, if RedSwitchblade had started a new thread, someone would have flamed him for not searching to see if this subject already had a thread.


 

Posted

I did start a new thread, just didn't get any help. I was hoping 5 months was under the necro radar :/


The Story of a Petless MM with a dream
Quote:
Originally Posted by Deus_Otiosus View Post
This entire post should receive some kind of award for being both hysterical and fantastic.
Well done.
I have a 50 in every AT, but Scrappers and Dominators are my favorites.

 

Posted

Don't feel bad: no matter how careful you are, there's always someone on this forum who will find a reason to flame you. It's not your fault. :-)


 

Posted

Quote:
Originally Posted by CinnderScot View Post
Besides, if RedSwitchblade had started a new thread, someone would have flamed him for not searching to see if this subject already had a thread.
Normally the posts following said flames mention linking to existing necrotic threads...trust me, I've triggered them. :-p


 

Posted

well i haven't tried this "fix" yet, the "out of memory" problem still persists in the game.