Borderlands 2

Borderlands 2

View Stats:
Xaero Sep 20, 2013 @ 10:16pm
Potential cause of Opportunity freeze
As many people have come across previously, for some reason - the zone of Opportunity can frequently cause the game to freeze, regardless of system specifications, drivers used - the common denominator being PhysX. I believe I have come across the reason for this crash - the game not being able to allocate further memory, and not gracefully handling that barrier. As most of you know Borderlands 2 is a 32-bit only game; That does not however mean that it is limited to 2gb of memory addresses on 64-bit or PAE kernel based systems. The game executable is NOT LAA (Large Address Aware) flagged by default, so using a LAA patcher you can enable the game to utilize more memory per thread than it can by default.

Analysis leading to this conclusion:
Previously I had a 1920x1200 Dell U2410H on an nVidia GTX 670, at this resolution the frequency of freezes in opportunity was next to none. Similarly, my laptop with a GTX 650m running at 1080p on my TV downstairs experiences zero freezing while my roommate plays the game. I now have a higher resolution display - 2560x1440 Yamakasi Catleap. The increase in GPU memory would explain the more frequent freezing in Opportunity.
Please note: in the case of all applications the memory address limitation occurs with the total combined usage of BOTH RAM and vRAM; however the barrier is a little fuzzier with vRAM included in the total - where an application utilizing 0kb vRAM will hit the limitation at exactly 2GB an application utilizing 2gb of vRAM will hit the barrier at approximately 1.5gb RAM (A total of ~3.5gb - the limitation of non PAE aware kernels)

This problem could be completely avoided if you had a threaded memory mapping approach where seperate threads allocated memory and talked back and forth to the main game thread - however this isn't a very efficient approach to the situation and is probably why the game isn't programmed this way; however the reasoning for NOT compiling with the LAA flag enabled baffles me as that enables a full 4GB allocation per thread, instead of limiting it to ~3.5GB for the entire application.

If you wish to try playing the game with the LAA patch, you can obtain it from the original author's webpage HERE:
http://www.ntcore.com/4gb_patch.php
All this program does is change a couple of bits to flag the application as Large Address Aware and tells the kernel to allow mapping of memory ranges past the standard limits. Report back if it lowers the frequency of crashes for you, it certainly has for me!
< >
Showing 1-15 of 24 comments
thaline Sep 21, 2013 @ 2:27am 
I had several time the same issue at point in the game
Migz - DH Sep 21, 2013 @ 6:45am 
This has some good info and definitely an interesting theory, however, as I understand it, the GearBox folks don't read this forum very often.

Therefore, I suggest you repost this thread on their forums. http://forums.gearboxsoftware.com/forumdisplay.php?f=139

I will give that 4GB patch a go and spend some time in Opportunity with PhysX on high too. After an hour, I'll let you know if I crashed or not, because typically, I crash after about 45 minutes.
Migz - DH Sep 21, 2013 @ 8:51am 
Ok, so I did all of the Opportunity quests and spent another thirty minutes running around fighting stuff as well as exploring without a single crash.

Normally, I wouldn't be able to complete the quests without a crash.

So, I call this a good fix. Thanks for posting it!

One note though, for a minute or so, it looked like textures in the distance were running at low resolution on two loaders. But, after I took those two down, it didn't happen again. Not sure if it was my imagination or something strange happened for a very short bit.

My system RAM usage capped out at ~2.8GB usage.
BL2 capped out at ~1.4GB usage.
My VRAM usage capped at 902MB.



OS - Windows 7 Home Premium (x64), SP1
Processor - Intel i7-2600K 3.4GHz (OC @ 4.6GHz)
RAM - 4GB G-Skill @2133MHz (F3-17000CL7-2GBXHD)
Motherboard - ASUS P8P67 WS REVOLUTION Rev 1.xx
BIOS - Ver 2105, May 2012
GPU - 2x SLI NVIDIA Geforce GTX 570 (EVGA) OC @ 797 MHz Core Clock, 1950 MHz Memory Clock, 1.013V
Video Driver - 314.22 - WHQL
Monitor - Samsung S27B550V @ 1920x1080
System Drive - Samsung 830 SSD, 256GB, F/W CXM03B1Q
Sound Card - Creative Sound Blaster X-Fi Titanium
Sound Driver - 2.17.0008, July 2010
Speakers - Logitech G51 5.1 Surround
Last edited by Migz - DH; Sep 21, 2013 @ 8:54am
Migz - DH Sep 25, 2013 @ 2:05pm 
Hey, I quoted your thread on the Borderlands 2 official forums.

http://forums.gearboxsoftware.com/showthread.php?t=331482

(typo)
Last edited by Migz - DH; Oct 17, 2015 @ 10:27am
H3X Sep 25, 2013 @ 2:53pm 
Random question; would CFF Explorer be able to set the flag for the .exe or are there other things that need to be changed too? As I already have CFF Explorer and could patch that file in seconds lol :) I suffer awfully on my rig in that area, no matter the settings.. So any improvement is a good improvement, haha
Last edited by H3X; Sep 25, 2013 @ 2:54pm
Migz - DH Sep 25, 2013 @ 2:54pm 
From what I read on their site, changing the flag should do it.

I'd make a copy of the .exe first though...
Migz - DH Sep 25, 2013 @ 2:56pm 
" In order to achieve this, a flag has to be set in the file's internal format. This is, of course, very easy for insiders who do it every day with the CFF Explorer. "
Last edited by Migz - DH; Sep 25, 2013 @ 2:56pm
H3X Sep 25, 2013 @ 3:01pm 
Cool, thanks :)

I'll give it a go and see how it behaves, if not tonight then tomorrow, and report back if you want to hear my results. I learned the hard way with a few games to back everything up before changing anything vital lol, hopefully steam doesn't flag it as an incorrect .exe, but I'll find out.
bigbenisdaman Oct 3, 2013 @ 7:17am 
This fix didn't work for me, still crashing in Oportunity. Usually it also crashes at the Wildlife Preserve also. Ram usage at 1365984K, VRAM at 861 and 153MB. Running physx on a 650Ti.
Migz - DH Oct 3, 2013 @ 11:05am 
Huh, I don't know what to say about that.
bigbenisdaman Oct 3, 2013 @ 11:07am 
I was just trying to see if anyone had a fix, apperantly it's a common problem. For me its easy just backing out turning physx on low/off and going back in, just kinda gets to be a hassle as i'm running through on Normal and TVHM on a few characters to get UVHM unlocked lol.:bandit:
Bhima Jun 14, 2014 @ 7:32pm 
I just encountered this issue myself while playing Borderlands, i tried all the suggestions posted here but what worked in the end was:
1) Uninstall game
2) Install the game again in a new directory
3) Verify game cache

This fixed the issue for me, i am now able to play the game on the highest settings with no crashes.
Goras May 11, 2015 @ 1:57pm 
I had this problem and solved it with your fix, thanks!
Breithe Nua Sep 27, 2018 @ 5:36am 
Originally posted by Xaero:
As many people have come across previously, for some reason - the zone of Opportunity can frequently cause the game to freeze, regardless of system specifications, drivers used - the common denominator being PhysX. I believe I have come across the reason for this crash - the game not being able to allocate further memory, and not gracefully handling that barrier. As most of you know Borderlands 2 is a 32-bit only game; That does not however mean that it is limited to 2gb of memory addresses on 64-bit or PAE kernel based systems. The game executable is NOT LAA (Large Address Aware) flagged by default, so using a LAA patcher you can enable the game to utilize more memory per thread than it can by default.

Analysis leading to this conclusion:
Previously I had a 1920x1200 Dell U2410H on an nVidia GTX 670, at this resolution the frequency of freezes in opportunity was next to none. Similarly, my laptop with a GTX 650m running at 1080p on my TV downstairs experiences zero freezing while my roommate plays the game. I now have a higher resolution display - 2560x1440 Yamakasi Catleap. The increase in GPU memory would explain the more frequent freezing in Opportunity.
Please note: in the case of all applications the memory address limitation occurs with the total combined usage of BOTH RAM and vRAM; however the barrier is a little fuzzier with vRAM included in the total - where an application utilizing 0kb vRAM will hit the limitation at exactly 2GB an application utilizing 2gb of vRAM will hit the barrier at approximately 1.5gb RAM (A total of ~3.5gb - the limitation of non PAE aware kernels)

This problem could be completely avoided if you had a threaded memory mapping approach where seperate threads allocated memory and talked back and forth to the main game thread - however this isn't a very efficient approach to the situation and is probably why the game isn't programmed this way; however the reasoning for NOT compiling with the LAA flag enabled baffles me as that enables a full 4GB allocation per thread, instead of limiting it to ~3.5GB for the entire application.

If you wish to try playing the game with the LAA patch, you can obtain it from the original author's webpage HERE:
http://www.ntcore.com/4gb_patch.php
All this program does is change a couple of bits to flag the application as Large Address Aware and tells the kernel to allow mapping of memory ranges past the standard limits. Report back if it lowers the frequency of crashes for you, it certainly has for me!

Would this fix still work on Windows 10? I've been having this issue in Opportunity myself lately. (Also I have no idea how to check ram and vram usage, though I think I at least know what those are, so I can't provide those stats. I'm just a casual gamer. Sorry if that makes me a but harder to help out).
Xaero Nov 3, 2018 @ 6:40pm 
Yes, patching the game to be LAA should help with issues in Opportunity. Windows 10 supports PAE and LAA even on 32-bit versions, which means regardless of your computer's specs it should help.
< >
Showing 1-15 of 24 comments
Per page: 1530 50

Date Posted: Sep 20, 2013 @ 10:16pm
Posts: 24