Error: Failed to allocate 536870916 bytes and will now terminate.

zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
edited December 2013 in Technical Support
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
«1

Comments

  • _INTER__INTER_ Join Date: 2009-08-08 Member: 68392Members, NS2 Playtester, Reinforced - Shadow
    edited December 2013
    Not sure if it helps but worth a try, for Windows user:

    - 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+
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    I already have 8 gigabytes of virtual memory allocated, so I don't think that's the reason. There's another thread talking about it, but no one has responded to his thread yet. Our builds are similar makes and close in quality, maybe its an incompatibility with a specific type of video card, or a memory glitch.
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Basically, despite how big your ram is ns2 can only allocate a few gigs of system ram because its a 32 bit executable.

    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
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    That didn't seem to have worked either, I drop boxed the tech support zip so hopefully I hear from them soon.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    This crash is because you are using 32 bit Windows instead of 64 bit (10% of all steam users use 32 bit).. There are work arounds like using another program to force ns2 into thinking you aren't. http://www.techpowerup.com/forums/threads/large-address-aware.112556/

    Or you can just upgrade to 64 bit and benefit from the increased performance too!
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    If you're talking about my OS I run Win 7 64bit so that doesn't make sense unless you're referring to the program executing in 32bit. How do you upgrade? I don't really understand where to even start with the link you sent me lol whole new territory. :p
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Sadly, ns2 is only 32 bit.

    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

  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    lol, awesome explanation confused, you're right too, I dropped my game down to bare minimum of effects and no more crashes, is there any way to either convert the 32 bit program to 64 or is it something that will just have to patiently be waited for until I can jack up the graphics that my comp can easily handle?
  • vartijavartija Join Date: 2007-03-02 Member: 60193Members, Constellation, Reinforced - Onos, WC 2013 - Shadow
    Normally a windows application should not crash because lack of memory. If the stuff loading does not fit into gpu memory, you just drop stuff to main memory. If main memory is full, it can drop stuff to virtual memory (page file). Only if this gets full the app should crash. I guess ns2 engine is a bit special in handling this.
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Sadly there is not a whole lot you can do on your end. The problem with 64 bit versus 32 bit is that adds a whole extra pile of stuff you need to test, maintain, and write. Like most things in software in theory it is easy to change but in practice it is a giant pain in the tuckus.

    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:
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    Is there any possibility of this glitch being fixed in the near future?
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    IronHorse wrote: »
    This crash is because you are using 32 bit Windows instead of 64 bit (10% of all steam users use 32 bit).. There are work arounds like using another program to force ns2 into thinking you aren't. http://www.techpowerup.com/forums/threads/large-address-aware.112556/

    Or you can just upgrade to 64 bit and benefit from the increased performance too!

    How would I go about doing this?

  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    edited December 2013
    Well you have to run that program that the link provides:
    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...

  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    That's the only error numbers I notice when it crashes, I thought the tech support zip would explain the "extra numbers after"? :/ sorry I'm kinda green on this NS2 Troubleshooting lol :P
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    Are there any graphical settings that I can boost up since like I said my build "would" be able to handle it, or should I just play flat low settings from now on until this bug is fixed?
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    You say you have 8gb of ram and a 64bit OS. That's cool, but if you have a ton of background apps using memory and then you try and run ns2 you may as well have low (like 2gb) memory anyway. This can cause the crash, BEFORE you start the game I ask you to check task manager and see how much ram is being used (see the performance tab). My bet is it's over 5gb. If it is, close something big before starting the game. Firefox is naughty for using memory for example, it has bad leaks which cause it to use more and more memory over time. I've personally seen my firefox (now waterfox) get to 3.5gb of memory before. Close it.
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    nope that's not the issue, all are shut down, the point of the specs was to show that its not the hardware that's the issue. Not to brag about what I got lol....... hence tech support
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    edited December 2013
    He was speaking about potential software.. not your hardware..

    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
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    I know, that's why I said there aren't extra processes running, I already answered that question....
    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
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    Assuming you have plenty of free memory when you start the game (let's say 4gb) then I'm going to have to assume something is corrupt, maybe the exe maybe some lua or dlls. I dunno, but assuming you do in fact have enough memory, there's no reason it should fail to allocate 512mb of memory. If your game is actually 100% fine and you also have that much available memory, something much, much deeper is the problem. Like a faulty OS that's allocating memory like some really clever analogy.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    Can you upload your techsupport zip file somewhere? or PM it to me. I'd like to see your logs, i have a sneaky suspicion.
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    Sure thing Ironhorse, I wish I could but idk how to send you a file like that on this site. :( I e-mailed my tech support zip to UWE tech support yesterday. Thanks for taking the time for putting up with my problem lol and all the help and responses that everyone has provided, I think I'm getting closer to getting to the source of the issue. :)
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    Upload the zip to somewhere on the web like zippyshare or fileswap etc and then provide the link to it here or in a private message
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    IronHorse wrote: »
    Upload the zip to somewhere on the web like zippyshare or fileswap etc and then provide the link to it here or in a private message
    awesome, thanks a million ironhorse, sent the zip in a pm, its in private though, I can resend it if you need me to.

  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    Received.
    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/
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    I didn't think of that, ran the diagnostics though and it came up with nothing, all works properly. :/ Like I said though when I turn all the graphics settings to flat low, game never crashes, but if I improve them even a little bit, it crashes most of the time half-way through, still runs at a solid 60-100 fps though even on everything max, crashes albeit, but runs smooth before it crashes. Hopefully that helps somehow. :/
  • DC_DarklingDC_Darkling Join Date: 2003-07-10 Member: 18068Members, Constellation, Squad Five Blue, Squad Five Silver
    2 things.

    * 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.
  • zbuntz92zbuntz92 Join Date: 2013-12-04 Member: 189763Members
    edited December 2013
    Did 7 passes of all the memory tests on that memtest program, didn't find anything wrong with my memory. Then I did the Performance monitoring, tried to make the game crash to test it so I set all settings to max and played. Got through about 2 rounds, ran at a solid 60 FPS with zero lag, then crashes on the third game mid game like usual. Popped up with the same error message(Error message is title). When I checked the performance of memory used it was running at about 2.75 gb to 3.25, when it crashed it shot up to 3.75 pretty quickly. Not sure what it means but those are the results I got.
  • DC_DarklingDC_Darkling Join Date: 2003-07-10 Member: 18068Members, Constellation, Squad Five Blue, Squad Five Silver
    we are almost on the same page.. Lets try again. But it seems your memory itself is ok if it passed 7 runs. :)

    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.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    Also, its unrelated, but you should disable that ambient occlusion ;-)
Sign In or Register to comment.