[Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Help and support regarding PR:BF2 installation and in-game issues
fatgyver
Posts: 8
Joined: 2012-04-06 10:54

[Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by fatgyver »

Hello.

My problem is that everytime i try join in server in BF2/PR it throws this error and crashes: (sometimes right away, sometimes 10secs after black screen)

Image :-|

that number changes everytime

And i have noticed that Connecting to account server takes much longer to login that before.. like 2-4minutes. :roll:

ONCE i have gotten in server with BF2, and even then it had black screen for like 5mins and then joined game without even showing loading screen.

I have tried defragging hardrives and checked viruses and tested rams and tried with only 1 ram etc.
Tried disabling soundcard.
Added more/less pagefile.
Reinstalled bf2/pr and uninstalled Punkbuster many times with different ways and installed it manually/automatically...
Tried compatibility modes and runned administrator..
Tried 4gb exe patch for bf2/pr executables.. ..
Did clean up computer from dust..
Disabled UAC and firewall and antivirus.


And theres nothing interesting in event viewer.

and none of things i have checked in google has worked for me..

Could it be issue with my 3g modem or something..? Because i think connecting to account server that long is not normal and is related to issue BUT NOT SURE.


PC:
4gb RAM
AMD Phenom II x4 920 Processor 2.80Ghz
Win 7 64-bit
Ati radeon hd 4800

This game has been working with no problem for long time, last time last week but this thing started happening this week. (tried restoring windows to restorepoint 2 weeks in the past, sorry my english lol)
fatgyver
Posts: 8
Joined: 2012-04-06 10:54

BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by fatgyver »

Hello.

My problem is that everytime i try join in server in BF2/PR it throws this error and crashes: (sometimes right away, sometimes 10secs after black screen)



that number changes everytime

And i have noticed that Connecting to account server takes much longer to login that before.. like 2-4minutes.

ONCE i have gotten in server with BF2, and even then it had black screen for like 5mins and then joined game without even showing loading screen.

I have tried defragging hardrives and checked viruses and tested rams and tried with only 1 ram etc.
Tried disabling soundcard.
Added more/less pagefile.
Reinstalled bf2/pr and uninstalled Punkbuster many times with different ways and installed it manually/automatically...
Tried compatibility modes and runned administrator..
Tried 4gb exe patch for bf2/pr executables.. ..
Did clean up computer from dust..
Disabled UAC and firewall and antivirus.

And theres nothing interesting in event viewer.

and none of things i have checked in google has worked for me..

Could it be issue with my 3g modem or something..? Because i think connecting to account server that long is not normal and is related to issue BUT NOT SURE.


PC:
4gb RAM
AMD Phenom II x4 920 Processor 2.80Ghz
Win 7 64-bit
Ati radeon hd 4800

This game has been working with no problem for long time, last time last week but this thing started happening this week. (tried restoring windows to restorepoint 2 weeks in the past, sorry my english lol)
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by LITOralis.nMd »

First, welcome to the forum. :)
second, thank you for searching out possible solutions before asking for help on the forum.

Do you have automatic updates for your Radeon video card drivers?

Have you played any vanilla BF2 recently?
This was a problem for many years,
easy solution is this:
GO to My Documents\Battlefield2\ and copy you Profiles folder to a backup location of your choice,
Remember your account information (usernames/passwords) , write it down somewhere.
delete the \My Documents\Battlefield2 folder.
start vanilla bf2.
Log in to multiplayer server.
Adjust your audio/video options to your preferences.
shut vanilla bf2.
start PR.

that should fix this.

(I do not know which files inside My Documents\Battlefield2 is the culprit, maybe someone else can explain this)
fatgyver
Posts: 8
Joined: 2012-04-06 10:54

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by fatgyver »

[R-COM]LITOralis.nMd wrote:First, welcome to the forum. :)
second, thank you for searching out possible solutions before asking for help on the forum.

Do you have automatic updates for your Radeon video card drivers?

Have you played any vanilla BF2 recently?
This was a problem for many years,
easy solution is this:
GO to My Documents\Battlefield2\ and copy you Profiles folder to a backup location of your choice,
Remember your account information (usernames/passwords) , write it down somewhere.
delete the \My Documents\Battlefield2 folder.
start vanilla bf2.
Log in to multiplayer server.
Adjust your audio/video options to your preferences.
shut vanilla bf2.
start PR.

that should fix this.

(I do not know which files inside My Documents\Battlefield2 is the culprit, maybe someone else can explain this)

!!
Millions of thankses to you.

I tried this thing before but didnt work, now i started bf2 first then pr now it works thx :D
fatgyver
Posts: 8
Joined: 2012-04-06 10:54

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by fatgyver »

welll.. damn... it worked but not it works very rarely and randomly.. hmm O.o

:///////

updated graphic card too yes .. :/
Last edited by MaSSive on 2012-04-08 08:31, edited 2 times in total.
Reason: duplicate posting use EDIT button.
MaSSive
Posts: 4502
Joined: 2011-02-19 15:02

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by MaSSive »

Please use EDIT function on your last post, do not make mulitple duplicate ones.

You mentioned you use 3G Modem? That might be a problem, its a instable connection and login might takes long becasue of it.

Go to Speedtest.net and measure your bandwidth, then go to Pingtest.net and measure your line quality.

After each test click share and post results here.

We might test more things after this with tracert.
Image
CATA4TW!

"People never lie so much as before an election, during a war, or after a hunt."
"God has a special providence for fools, drunks, and the United States of America."
― Otto von Bismarck
fatgyver
Posts: 8
Joined: 2012-04-06 10:54

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by fatgyver »

Speedtest was fine..

Image


but here this packet loss test failed everytime, tried few times.


EDIT: Tried pinging google on cmd, no packet loss problem there. On that pingtest site it was just because of some port not open or something.


Its like i have to try to restart game 20 times and join server 20 times to luckily get in.
Last edited by fatgyver on 2012-04-09 08:15, edited 3 times in total.
Bemetson
Posts: 5
Joined: 2009-09-28 15:06

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by Bemetson »

Hello dear support community, I would like to address my problem here too as I have the same issue and everything happened in the past week like to fatgyver.

I noticed this problem after having a week pause from PR and did a full virus scan, after that I tried the game and this problem showed up. I have re-installed BF2 and PR at least three to four times and the problem still exists. When I did my re-installation I followed all instruction to restart my computer after installation and every time I re-installed I made sure there was no trace of BF2 folders in my system and I cleaned the registry manually. I have also tried installing BF2 in different folders and still nothing. And I do own a legal copy of BF2. During the installions I had disabled all external programs running background and also disabled my anti-virus. I had also installed BF2 once in safe mode and tried compability modes and disabling Windows' visual effects, still nothing.

I don't remember installing any new software or updated windows during the week. I have done registry checks and cleaned them with a program called Eusing, a free utility, and I have run a memtest on my RAM and the test result came clean.

My PC specs:
CPU: AMD Phenom II 965 Black Edition 3.4 GHz
GPU: ASUS GTX-460
RAM: 8GB (don't remember manufacturer but I strongly believe it's Kingston)
PSU: 850 W
MB: ASUS M4A88TD-V EVO
HD: 1 TB (I don't remember the brand nor the manufacturer|||Page file is system set, around 8 GB)

I also use 3G modem to play PR and it has run perfectly fine since 0.95x, here are the result from Speedtest: http://www.speedtest.net/result/1886899033.png

One thing to mention: I am able to play this game offline, meaning, playing local (BF2 and PR). The game will load and optimize shaders even on maximum settings and I am able to play with bots. However, when I join a multiplayer server, it either hangs after I click the "Join server" or the memory error pops out after a few seconds of pressing the button. Also when I favourite a server and check it back on the Favourite section, the server shows there as dead but after clicking it, it shows all the information on the server but no ping or anything as it is red instead of being green. This occurs after patching the game to 1.5. On the disk version (1.1) server shows as green and functions properly. I downloaded fresh 1.41 and 1.5 patches after the clean install to avoid any file corruption on the old files I have kept on my USB stick and my computer for almost two years. When trying to join the server I have tried disabling firewall and anti-virus with no avail. Oh, and I have also deleted my Battlefield 2 folder manually and with BF2 cleaner, and tried to join a server but still the memory error persists.

I hope a fix to my problem could be found and there are no hardware issues on my system as every other game, such as Battlefield Bad Company 2, Battlefield 3 and Minecraft, work well. And my HW is fairly new, not even one year old.

This is the information I could provide now, feel free to ask me more on this matter if I missed a detail in my post.

With hopeful regards, Bemetson

(and if anyone suspects I am a troll as my post count would be 1 after this, I assure you, I am not.)

P.S. This problem might have had occured after installing PR:Vietnam but as I said before, I don't remember whether problem or Vietnam came first.

P.S.2. Logging in to my account and searcing for servers functions well. I get around 400 servers and I can ping them all, meaning I can click on them and see my ping to the server and see all the players on it.
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by LITOralis.nMd »

Bemetson, thanks for the detailed post.

What I would like to know is if you have a router between your 3G modem and your gaming PC.
If you do, please tell us the make and model of the router.

Please also tell us the 3G modem make and model number.

In the USA, some Cell phone companies block gaming traffic over 3G networks... it saturates the network and slows down everyone else who is simultaneously using the same cell tower. But let's put that aside and see if we can find the problem here.

My thoughts are the 3G modem might need another driver option activated... but my 4G modem is 1600km away right now so I can't test this until the weekend.
DrDickWanker
Posts: 3
Joined: 2012-04-07 21:24

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by DrDickWanker »

Are you currently using a vpn? I ask this because I got the same error while using a vpn. It is most likely a networking problem.
Bemetson
Posts: 5
Joined: 2009-09-28 15:06

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by Bemetson »

Thank you for your answer. My 3G modem is Huawei E1820 and I do use a router, which is a product of A-link: A-LINK WNAP(b) 3G ROUTER. I'd like to mention that PR had worked simply fine with current setup during March and this problem simply popped out of nowhere but who knows what is causing this
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by LITOralis.nMd »

fatgyver and bemetson, do you both use the same 3G service provider?

Maybe your cell provider is running 3G users behind a custom firewall?

Try this:

on the shortcut on the desktop right click, properties
target line should be like this

"C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\pr.exe" +restart 1 +playerName YourCaseSensitivePlayernName +playerPassword YourCaseSensitivePassword +joinServer 206.217.133.10 +port 16567

That will connect you to a north american server I play on regularly.

IDK is this will work, it will however save time testing things going forward.
Last edited by LITOralis.nMd on 2012-04-12 16:27, edited 1 time in total.
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by LITOralis.nMd »

Bemetson should try to completely remove his pagefile, reboot, then try to start PR.
Bemetson
Posts: 5
Joined: 2009-09-28 15:06

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by Bemetson »

Well, my 3G provider is a Finnish company called Saunalahti, don't know if fatgyver has the same provider. About 3G firewalls by them I have no clue.

I tried modifying the BF2 shortcut as mentioned above, didn't work as PR would not let me open it via BF2. Says that I have to run PR from PR.exe.

Removed page file completely and tried again, no avail.

I hope we are not running out of options here, as I am very afraid now..
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by LITOralis.nMd »

Somewhere in the 1.41 full patch and/or 1.5 fuill patch readme file is a list of the ports you need opened.

I think your PC firewall, your router, or your ISP are blocking a port?

This is an old list,

BF2 Server Ports Protocol Ports In/Out Function
TCP 80 ??? Battle Recorder / PunkBuster
TCP 4711 IN Remote console
??? 4712 ??? BF2 CC Daemon
UDP 27901 IN Stats port
UDP 1500-4999 ??? "General use"
UDP/TCP 1024-1124 ??? "General use"
UDP 29900 ??? Server status (Gamespy)
UDP/TCP 27900 ??? Stats port
UDP 16567 IN PunkBuster
UDP 55123-55125 IN/OUT VoIP
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by LITOralis.nMd »

Edit...

My above shortcut was incorrect...

Try this:

on the shortcut on the desktop right click, properties
target line should be like this.. YOU HAVE TO ADJUST THIS TO YOUR BF2/PR installation directory.

"C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\pr.exe" +restart 1 +playerName YourCaseSensitivePlayernName +playerPassword YourCaseSensitivePassword +joinServer 206.217.133.10 +port 16567

That will connect you to a north american server I play on regularly.

IDK is this will work, it will however save time testing things going forward.
Bemetson
Posts: 5
Joined: 2009-09-28 15:06

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by Bemetson »

LITOralis, thank you for your help, you short cut editing solved this problem. I don't know what could have caused this problem, but with editing the shortcut I am able to join the servers!
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by LITOralis.nMd »

Happy to hear you're able to start PR.

Can you now start PR without using the edited shortcut?

You can quickly narrow down the problem by reducing to the absurd here,

"C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\pr.exe" +restart 1 +playerName YourCaseSensitivePlayernName +playerPassword YourCaseSensitivePassword

"C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\pr.exe" +restart 1

"C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\pr.exe" +playerName YourCaseSensitivePlayernName +playerPassword YourCaseSensitivePassword

"C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\pr.exe" +restart 1 +joinServer 206.217.133.10 +port 16567 (Not sure this last one is a valid combination of command line options)

If you try this let me know, and we'll be able to permanently fix the problem without forcing you to join a server each time you first start PR.
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by LITOralis.nMd »

Fatgyver, try this and please let us know if it works. We're still here to help you out.
[R-COM]LITOralis.nMd wrote:Edit...

My above shortcut was incorrect...

Try this:

on the shortcut on the desktop right click, properties
target line should be like this.. YOU HAVE TO ADJUST THIS TO YOUR BF2/PR installation directory.

"C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\pr.exe" +restart 1 +playerName YourCaseSensitivePlayernName +playerPassword YourCaseSensitivePassword +joinServer 206.217.133.10 +port 16567

That will connect you to a north american server I play on regularly.

IDK is this will work, it will however save time testing things going forward.
Bemetson
Posts: 5
Joined: 2009-09-28 15:06

re: [Solved] BF2/PR Memory.dll: thread xxxx is deallocating main thread memory

Post by Bemetson »

After I had modificated my PR shortcut, now I can run it normally like before! The servers in favourites show as green and I get no more memory errors. When I tried editing the pr.exe, I launched BF2 normally and got memory error there. I instantly after having the error fixed the pr.exe file and it let me join the server. Now stuff works properly. Thank you, Thank You for your assist LITOralis.nMd

P.S. There was an update with Windows and my anti virus between the start of the problem and solving the problem but I believe they had no effect as I said above that when I tried BF2 it still gave me the error.
Locked

Return to “PR:BF2 Support”