Error: Failed to allocate 536870916 bytes and will now terminate.
zbuntz92
Join Date: 2013-12-04 Member: 189763Members
Game has been crashing on and off for about a month or two, started working again after build 261, but then the issue still persisted. Most of the time it'll happen mid-game on the marine side during a firefight. The Screen will freeze and the audio will repeat, have to Ctrl-alt-del just to get back to the desktop. The title of this thread is the error message that occurs when the game freezes. I have the tech support .zip ready to go but don't know how to post it in this thread. I really like this game so a quick response would be awesome.
These are my PC Specs:
Processor: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz (4 CPUs), ~3.3GHz
Video Card: NVIDIA GeForce GTX 650 Ti BOOST
Memory: 8192MB RAM
OS: Windows 7 64bit
These are my PC Specs:
Processor: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz (4 CPUs), ~3.3GHz
Video Card: NVIDIA GeForce GTX 650 Ti BOOST
Memory: 8192MB RAM
OS: Windows 7 64bit
Comments
- Right-click your NS2.exe > Properties > Compatability tab > Tick "Run this program in compatabiltiy mode for: Windows 7". I also tick "Disable display scaling on high DPI settings" (raw input?) and "Run as Administrator".
- System Settings > System > Advanced (tab) > "Settings..." button in Performance > Advanced (tab) > "Change..." button at Virtual Memory > increase Virtual Memory to say 4GB+
The easiest thing you can do to try to avoid this crash is to reduce texture quality.
If you would like to post the tech support zip, you could do so using a service like dropbox or copy. they both give you reasonable amounts of space for free and
Or you can just upgrade to 64 bit and benefit from the increased performance too!
Think about it as a car odometer as it measures how far you have driven. Eventually the number gets too big and the whole thing rolls over. With a 32 bit number you have 32 binary digits and a 64 bit number is 64 digits long.
Going back to our car example what is happening is the old school ns2 car has a 4 digit odometer and its reading something like 9789. you ask it to go 200 km. Now its at 9989. You drive over to your mum's and back and half way though it hits 0000. In a car this isn't a huge deal. But, in a program this can be catastrophic, for reasons I am going to gloss over for now.
Ultimately that's what this comes down to is that the numbers can only get so big and still work and when you get bigger than that number bad times happen.
What you can do to mitigate this issue is to drive less. This means using smaller, textures, fewer decals, that sort of thing. basically everything you load moves that counter up and teh goal is to keep it down.
TLDR:
The car explodes after you driver it 10000km so try to use your bike more
The devs will have been working all the time to get the memory usage down while they add new stuff. But it's hard.
To continue my analogy, while it seems like we can just slap a 8 digit display it it turns out to be way more complicated than that because of :reasons:
How would I go about doing this?
http://www.techpowerup.com/forums/attachments/laa_2_0_4-zip.34392/
Place that executable in the same folder as NS2.exe and then follow the 3 steps that the program shows. really simple
Although i dont think it will do anything for you, considering you are running 64 bit already.. the game should automatically recognize that you are and enable large address aware.
Hmm..
Please provide the exact numbers that follow the memory allocation error like you did in the title, whenever this happens.
It shows that it failed to load 512 MB of memory.. which is a ton, and more than any individual file, iirc...
And i wasnt asking for more info from that one incident.
I was asking for ANY crash that may happen to you with that error that occurs in the future - IF the numbers are different.
This is important because it tells us how much memory is failing to allocate.. in your case a whole 512 mb.. which.. is a lot and is making me wonder how thats happening.
So yeah.. if you get "failed to allocate X bytes".. anytime in the future.. please tell me what X is if its ever different from the amount you already provided.
Thanks
ok I guess i'll do that, its been the same exact number like 10-20 times so far, so its clearly a specific issue, specific chunk of data or a file maybe, idk
So i noticed in the log that the error returned was "536870916" this time.
Also known as 536 MB.. funny thing is, there's no file that is this large, i checked. (largest is 182)
And as far as i understand it, memory allocation failure should be happening on a per file basis, not aggregate. (though i could be wrong)
So this makes me wonder if there's something going on with your RAM.
Follow these steps, just so we can rule out hardware and move on to something else:
http://howto.cnet.com/8301-11310_39-57569731-285/test-your-ram-with-windows-memory-diagnostic-tool/
* First download memtest, boot from cd/usb and run it for atleast 7 passes. Yes this will take a good amoutn of hours. 1 pass simply isnt realistic.
* Open task manager, go to the performance tab. Start Perfmon. Click open the memory tab & go play. (The graph will show a short history) If you experience lag, tab out and check. I have a feeling you are somehow leaking memory.
I directed you to the perf monitor (by calling upon it through the task manager button, not perfmon directly) to check both ns2 memory usage but also memory usage in total.
Is there any free or reserved memory left at the time of the crash?
It is rather impressive that it so quickly grabs around 500MB of memory. Another reason I want to see what the rest of your memory does.
Note that various programs can influence ns2 like antivirus, 'boosters' etc. Not debating the use of such programs, and naturally something like a AV program influences a lot more. But it is possible one is causing a leak somewhere.
Its all gambling at this point, but it sounds weird still.