std:bad_alloc error

std:bad_alloc error

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
Defyant
Posts: 6
Joined: 22 Aug 2008, 03:00

std:bad_alloc error

Post by Defyant »

Hey guys. I'm getting an error - std:bad_alloc - whenever I start up a game on a map such as Epic and OverCrudeWater32. Note: this happens no matter what mod I'm using, be it CA or THIS. No error log is produced either, the game just CTD's, and then 'FATAL ERROR: std:bad_alloc' pops up in a message box on my screen.
I am running Win7 64-bit, with an Intel i7 CPU (windoze says it has 8 cores, but I doubt that), a ATi Radeon Gigabyte 5870 with 6gb of RAM.

Does anyone have any idea what is causing this and how to fix this?

Also, I get a CTD with another map, TMA-0. An error log is produced, but there is no 'std:bad_alloc' message.

Thanks
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: std:bad_alloc error

Post by FLOZi »

Windows 7 shows 8 cores because i7s are hyperthreaded, essentially there are 2 logical cores for each of the 4 physical cores.

Anyway, you should probably make a report on mantis:

http://springrts.com/mantis/

Sorry I can't be of any more help. :(
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: std:bad_alloc error

Post by AF »

Epic and over crude water are huge maps, hence the name 'Epic'

The likely explanation is you simply ran out of memory trying to load the map, by which I mean both ram, and maxed out your page file.
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: std:bad_alloc error

Post by oksnoop2 »

Yes you ran out of ram.
Defyant
Posts: 6
Joined: 22 Aug 2008, 03:00

Re: std:bad_alloc error

Post by Defyant »

So would there be a workaround? Or do I just have to live with that? :\
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: std:bad_alloc error

Post by enetheru »

buy more ram?
User avatar
SirArtturi
Posts: 1164
Joined: 23 Jan 2008, 18:29

Re: std:bad_alloc error

Post by SirArtturi »

Well, it refers to ram usage, but cmon' the guy has 6gb ram, shouldnt it be enough? Or maybe you are running some heavy programs background?
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: std:bad_alloc error

Post by BrainDamage »

http://msdn.microsoft.com/en-us/library ... ory_limits

spring is compiled in 32 bit mode and with IMAGE_FILE_LARGE_ADDRESS_AWARE off, therefore even if his OS is 64 bit, and he has 6 GB ram, spring can only use 2 GB

if IMAGE_FILE_LARGE_ADDRESS_AWARE would be enabled, it would allow 4 GB to be used even in 32 bit mode, but the only "real" fix would be a 64 bit build to use all ram available
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: std:bad_alloc error

Post by oksnoop2 »

Is there 64 bit spring for windows yet?
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: std:bad_alloc error

Post by BrainDamage »

no, and doubt it'll be very easy because generally crosscompiling is usually a giant pain in the ass, not to mention, all other programs would have to be rebuilt too for 64 bit ( lobby, settings, etc ) otherwise they won't be able to access unitsync anymore
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: std:bad_alloc error

Post by oksnoop2 »

There's a 64 bit build for linux right?
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: std:bad_alloc error

Post by BrainDamage »

yes, but that's native, not cross compiled, also compiling in linux is much easier than windows ( I don't want to start a flamewar about dev-friendliness, so please take my statement as personal opinion and strictly linked to spring )

also, the linux builds are not done by spring devs, each linux distro has it's own with it's own maintainer
rein08
Posts: 2
Joined: 19 Jul 2010, 11:22

Re: std:bad_alloc error

Post by rein08 »

You just have to have ram.
That's it.
Good day.




Spartoo voucher
Last edited by rein08 on 05 Aug 2010, 22:16, edited 1 time in total.
Drone
Posts: 8
Joined: 22 Jul 2010, 16:07

Re: std:bad_alloc error

Post by Drone »

i once had this

people told me i needed to update my graphics drivers
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: std:bad_alloc error

Post by BrainDamage »

if you had an ati card, some old drivers used to leak ( constantly and progressively waste more and more memory needlessy ), if that's the case it was a sound advice
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: std:bad_alloc error

Post by AF »

I still think its a good idea to take unitsync.dll and replace it with unitsync32.dll and unitsync64.dll on windows, with the existing unitsync.dll defaulting to 32bit. It would be of enormous help, especially with Java projects, AFLobby on a 64bit Java VM was a nightmare since it couldnt communicate directly with 32bit unitsync
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: std:bad_alloc error

Post by hoijui »

if you give us stable 64bit mingw cross compiling instructions...
Post Reply

Return to “Map Creation”