IPB Style© Fisana

Jump to content


Cannot Use "very Big" Or "giant" Random Maps


  • Please log in to reply
15 replies to this topic

#1 Annozero

Annozero

  • Community Newbie

  • Tiro
    (9 posts)

Posted 20 June 2011 - 08:55 PM

Hi, I have found that I cannot select "very big" or "giant" in the random maps size menu. If I do, after the loading screen the game returns to the main menu. In the log there is:
ERROR: JavaScript error: out of memory
ERROR: JavaScript error: Argument must be an object
ERROR: CMapReader::ParseTerrain() failed to get 'tileData' property


Thanks

#2 k776

k776

  • Open Source Development Manager

  • Centurio
    (658 posts)

Posted 21 June 2011 - 01:19 AM

Yes, the map was too big, and your computer doesn't have enough RAM to generate it the game hasn't set aside enough memory to generate it.

What are your computer specs?

We should probably add limits so this type of thing doesn't happen.

Kieran P [ aka k776 ]
Wildfire Games Open Source Development Manager
Contact me: kieran@wildfiregames.com


#3 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,924 posts)

Posted 21 June 2011 - 01:45 AM

View Postk776, on 21 June 2011 - 01:19 AM, said:

Yes, the map was too big, and your computer doesn't have enough RAM to generate it.
I don't think it has to do with RAM but rather the amount of memory set aside for random map scripting (which is hard coded to something like 96MB right now).
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com

#4 Annozero

Annozero

  • Community Newbie

  • Tiro
    (9 posts)

Posted 21 June 2011 - 11:48 AM

I have 8Gb of RAM, so I don't think I'm running out of memory :). I'm on amd64 if that makes a difference.

#5 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,924 posts)

Posted 22 June 2011 - 12:27 AM

Does it always fail to generate a very large or giant map, or only occasionally?
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com

#6 Annozero

Annozero

  • Community Newbie

  • Tiro
    (9 posts)

Posted 22 June 2011 - 02:38 PM

View Posthistoric_bruno, on 22 June 2011 - 12:27 AM, said:

Does it always fail to generate a very large or giant map, or only occasionally?

100% of times so far; I've also tried with different maps.

#7 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,924 posts)

Posted 22 June 2011 - 08:56 PM

That's odd, it seems to always work for me. I also have 8GB RAM on a 64-bit system. Which version of the game are you playing?
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com

#8 wrod

wrod

  • Community Members
    Pip

  • Discens
    (86 posts)

Posted 22 June 2011 - 09:01 PM

i had that problem too but idc cuz i dont play random maps :banana::P

#9 Mythos_Ruler

Mythos_Ruler

  • 0 A.D. Project Leader

  • Megas Philhellene
    (13,788 posts)

Posted 22 June 2011 - 11:29 PM

Is it possible that the random map generation process is taking more than 96MB of RAM, and therefor causing an error?
Michael D. Hafer [aka Mythos_Ruler]

Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!


0 A.D.

#10 Rasunadon

Rasunadon

  • Community Members
    Pip

  • Discens
    (79 posts)

Posted 23 June 2011 - 07:11 AM

I tried all sizes and no crash occured. It was only a bit slow. (IIANM: 2GB RAM on 32 bit Ubuntu)

#11 Annozero

Annozero

  • Community Newbie

  • Tiro
    (9 posts)

Posted 23 June 2011 - 10:37 AM

View Posthistoric_bruno, on 22 June 2011 - 08:56 PM, said:

That's odd, it seems to always work for me. I also have 8GB RAM on a 64-bit system. Which version of the game are you playing?

I'm using the latest development version (0ad.dev ppa) on Kubuntu 11.04. Is there anything I can try (like a setting to allow more than 96 mb of ram)? In the settings I've changed the lodbias to the value suggested in the comment to make the graphics sharper (-1.5), but reverting the change doesn't fix the problem.

Edited by Annozero, 23 June 2011 - 10:51 AM.


#12 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,924 posts)

Posted 23 June 2011 - 09:09 PM

View PostAnnozero, on 23 June 2011 - 10:37 AM, said:

I'm using the latest development version (0ad.dev ppa) on Kubuntu 11.04. Is there anything I can try (like a setting to allow more than 96 mb of ram)?
If you'd like to try compiling the source code yourself, the constant RMS_RUNTIME_SIZE is defined in \source\graphics\MapGenerator.cpp. Otherwise, I can try gradually increasing the limit but you'd have to wait for the next dev package to test whether it works or not.
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com

#13 Annozero

Annozero

  • Community Newbie

  • Tiro
    (9 posts)

Posted 25 June 2011 - 08:16 PM

View Posthistoric_bruno, on 23 June 2011 - 09:09 PM, said:

If you'd like to try compiling the source code yourself, the constant RMS_RUNTIME_SIZE is defined in \source\graphics\MapGenerator.cpp. Otherwise, I can try gradually increasing the limit but you'd have to wait for the next dev package to test whether it works or not.

Thanks for the input. I downloaded the source from svn, updated that value up to 256 Mb, then 512 Mb, then 1 Gb and rebuilt every time, but nothing changes. Maybe I have to change also something else?

#14 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,924 posts)

Posted 25 June 2011 - 11:37 PM

View PostAnnozero, on 25 June 2011 - 08:16 PM, said:

Thanks for the input. I downloaded the source from svn, updated that value up to 256 Mb, then 512 Mb, then 1 Gb and rebuilt every time, but nothing changes. Maybe I have to change also something else?
Are you using 32-bit or 64-bit Kubuntu?
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com

#15 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,924 posts)

Posted 26 June 2011 - 03:05 AM

Thanks to Philip, we've discovered the memory error is not occurring in the map generator context, but when the data is returned - so changing that constant wouldn't help. I'm guessing you use a 64-bit build of 0AD on 64-bit Linux, because Philip was able to reproduce this (I was not, I only have a 32-bit build on 64-bit Windows).

I've committed some changes to reduce the size of the random map data. Try the latest revision (r9664) and let us know how it works :)
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com

#16 Annozero

Annozero

  • Community Newbie

  • Tiro
    (9 posts)

Posted 26 June 2011 - 11:14 AM

View Posthistoric_bruno, on 26 June 2011 - 03:05 AM, said:

Thanks to Philip, we've discovered the memory error is not occurring in the map generator context, but when the data is returned - so changing that constant wouldn't help. I'm guessing you use a 64-bit build of 0AD on 64-bit Linux, because Philip was able to reproduce this (I was not, I only have a 32-bit build on 64-bit Windows).

I've committed some changes to reduce the size of the random map data. Try the latest revision (r9664) and let us know how it works :)

Yep! It works perfectly now, and it also seems faster at generating the map.Yes, I'm using an amd64 build on an amd64 system.Thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users