1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

A New Dawn Bug Reports and Feedback

Discussion in 'Rise of Mankind: A New Dawn' started by 45°38'N-13°47'E, Dec 3, 2009.

Thread Status:
Not open for further replies.
  1. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    39
    Hi,

    AND crashes when I try to capture an opponents city. I am playing a giantic earth map with a lot of civs so it is a quite heavy map to run, might that cause the crashes? Are there any known bugs with AND and capturing cities? I could capture enemy cities earlier in the game.

    Oh, and I'd like to congratulate you on a very good mod as everyone else ;)

    Update 1: I tried running the game as administrator with the same result, also I tried to capture an other smaller city and that worked fine.

    Update 2: I tried to capture a similar but larger city (large cultural boarders and a wonder present in the city), upon which the game crashed.

    Update 3: I tried decreasing the graphics settings from maximum to minimum and tried to capture the original ciry upon which the game once again crashed.

    Cheers,
    David
     
  2. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    39
    Update 4: I tried the somewhat far fetched idea to run the game in window mode, but it still crashes. Also I tried increasing the virual memory by vast amounts, but the crashes persist. I'm including (hence the new reply) images of the game options I run with, the cities I try to capture and of the crash it self.
     

    Attached Files:

  3. AndarielHalo

    AndarielHalo Prince

    Joined:
    Oct 27, 2009
    Messages:
    368


    Holy hell.


    I play the game in windowed mode ALL the time. I can tell you that given the huge amount of civilizations you have in that game, most likely that is going to be the source of much, if not all of your game crashes, especially so early into the game
     
  4. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    39
    lol, I can see why.

    Yeah, I read some earlier parts of this thread and it seems as though the number of civs is a reoccurring topic. Although, the amount of RAM should be the limiting factor in this case, AND occupies some 1.5 GB of RAM, I have 2x 3GB so I guess RAM shouldn't be a problem. Sure the number of civs should make it unbearable to wait between turns after a while, but as long as the RAM can handle the pressure the game shouldn't crash as a result of failure to allocate enough memory. Or am I missing something?
     
  5. AndarielHalo

    AndarielHalo Prince

    Joined:
    Oct 27, 2009
    Messages:
    368


    I have a 64 bit system that has 8 GB RAM. Usually I get that many civs in a game with Revolutions on or Emerging civs, and by that time, the game crashes any time a new civ emerges
     
  6. baha

    baha Chieftain

    Joined:
    Sep 8, 2007
    Messages:
    51
    Having 6 GB of RAM will not help. CIV is running as a 32Bit application (you can see it is marked by an asterix in the task manager) 32 bit application can only allocate 2 GB of RAM. 1.5 GB is already close to the limit and the crashes are probable to occur due to memory allocation failures.
     
  7. Stormwind

    Stormwind King

    Joined:
    Dec 7, 2008
    Messages:
    697
    Civ4 and many other 32bit applications have a flag in their exe that allows them to allocate 3GB of memory.
     
  8. AndarielHalo

    AndarielHalo Prince

    Joined:
    Oct 27, 2009
    Messages:
    368

    Where, and how
     
  9. baha

    baha Chieftain

    Joined:
    Sep 8, 2007
    Messages:
    51
    as far as I know the 3Gb switch is for the operating system, not for the applications
     
  10. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,516
    Location:
    israel
    hey guys - afforess and koshling just now made some fixes to the memory issues,

    ive been having memory allocation error with the latest updates - but its due to some errors in the code,
    (and i have neer had mafs before).

    so the next release should be more stable lower mem pc's.
     
  11. Stormwind

    Stormwind King

    Joined:
    Dec 7, 2008
    Messages:
    697
    @AndarielHalo
    Google for IMAGE_FILE_LARGE_ADDRESS_AWARE
     
  12. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    39
    This my friend, looks really intressting, I shall try it tomorrow, I do not have access to the computer with my save until then. Do you have any idea how one would go about to acivate this IMAGE_FILE_LARGE_ADDRESS_AWARE? A quick glance at google suggests that you'd have to recompile the BTS exe.

    Baha, you are making a very good point. I hadn't event considered that BTS were a 32-bit application >.<
     
  13. Stormwind

    Stormwind King

    Joined:
    Dec 7, 2008
    Messages:
    697
    @jackehehe
    As I said before, the BtS exe 3.19 already has the flag.
     
  14. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    39
    Ah, I missed that, sorry.

    As I understand it civ then should then be able to allcate 4 GB of RAM (64-bit operating system + flag) according to http://msdn.microsoft.com/en-us/library/aa366778.aspx#memory_limits

    That disregards Baba's (and AndarielHalo's?) previous comment about civ being able to allocate only 2 GB of RAM being the reason for the crashes? Given that Civ actually have access to 4 (or 3) GB of RAM.

    So, what is then the cause of the crashes when one plays big maps with a lot of civs? A fair start seems to be to deactivate the modcomponents one by one (Yey, the scietific method :goodjob:"!), is there a way to deactivate say the revolution mod once the game is started? Somewhere it should be defined which mods the savefile calls upon startup.
     
  15. AndarielHalo

    AndarielHalo Prince

    Joined:
    Oct 27, 2009
    Messages:
    368



    I have a 64 bit system with 8GB RAM, and AND crashes constantly, even when I play on Standard size with average settings on civs and such. I don't understand if this ram switch even applies to me. I just figured it might be something to ease the heavy level of crashes
     
  16. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    Lots of wrong or half-wrong information here, let me try if I can set this straight. I'll try to make it not overly technical (at the expense of some accuracy, but please bear with me):

    1. There's an important difference between available memory and address space. Available memory is the total size of RAM in your machine (usually about 2-8 Gigabyte), plus your "virtual memory" - that's hard drive space set aside for Windows to use as swap space when there's not enough RAM. You can envision your computer like a huge cloakroom, in which clothes are constantly stored and retrieved. Your RAM is the main cloakroom, it provides quick access. Your virtual memory is an additional storage space behind the main cloakroom - it offers additional space, but it takes longer to access. For Civ4, modern computers usually have enough memory, though I'd recommend to have 3 GB of physical RAM (= main cloakroom space) for super-huge games, otherwise you may have long waiting times while the game swaps data around between physical and virtual memory.

    2. Address space is, in our cloakroom analogy, the range of retrievement numbers that can be given out to customers. This is NOT related to the actual capacity of the cloakroom, it's just a fixed amount of "number slips" that are printed for every cloakroom. This leads to two possible problems:

    Problem 1: There may be more number slips than there's actual cloakroom capacity, so someone may want to store a cloak, and there are still numbers that could be given out, but there#s simply no capacity left to store the cloak. In this case the cloakroom will stop to operate (in PC terms: If Civ4 tries to allocate more memory than the total memory of your machine, then it will crash).

    Problem 2: The number slips may run out although there's still room in the cloakroom, so someone may want to store a cloak, but can't, because there's no number slip that he could be given, even though there's still a lot of free space in the cloakroom. In this case, the customer will not be able to store his cloak (in PC terms: If Civ4 tries to allocate more address space than your operating system provides, then it can't store any more data and will most likely crash).

    3. You can envision a 32-bit Windows as having about 4 billion number slips that can be given out. However, half of those are reserved for cloakroom employees (i.e. Windows' own processes, which require memory and address space as well). So a single customer (Civ4) can at maximum have access to 2 billion slips, and store 2 billion cloaks - even if the cloakroom has room for much more.

    4. However, there's a special rule in our cloakroom: Every customer always wants to store hundreds, thousands, or even millions of cloaks at once, and each set of cloaks must be given a contiguous set of numbers. So, if the customer wants to store 1 million cloaks, then the cloakroom needs 1 million of contiguous number slips, with not a single one being already occupied or missing, to hand out to him. This leads to a third possible problem:

    Problem 3: Even if there is enough space in the cloakroom, and the wardroom has enough number slips left, there may not be enough _contiguous_ number slips for a given set of cloaks. Let's say the customer wants to store 1000 cloaks, and we have 1200 number slips left, more than enough. But if these number slips have e.g. the numbers 301-900, and 1201-1800, then the set of cloaks cannot be stored.

    5. Also, the customer will keep _all_ number slips of a given set of cloaks until _each_ of these cloaks has been retrieved. Therefore, there may be number slips that currently aren't actually used to store any cloaks, but which can't be given out for new cloaks, because the customer hasn't returned them yet.

    This is the reason why it's important to understand the difference between memory (cloakroom capacity) and address space (number slips available). Even if Civ4 currently only occupies, say, only 1.6 GB of memory, it may be allocating 1.95 GB of address space already. Unfortunately, when you check Civ4's memory usage in the task manager, it will only tell you the actual memory usage (the number of cloaks Civ4 has actually physically stored in the cloakroom). Civ4 may have nearly exhausted its available address space (about 2 billion numbers) already, you just don't know - at least not from the display of the regular task manager. Hence, if Civ4 crashes while occupying 1.6 GB of memory, then the reason for the crash may be that it exhausted its 2 GB of available address space.

    6. Because many programs required more than 2 Gb of address space, there's a setting that tells Windows to enlarge the address space to 3 GB. This setting is activated by booting Windows with a special command, the "3GB switch". Note that there are still only 4 GB of address space in total, it's just divided differently: Previously, it was split in half between Windows and Civ4. With the 3GB option switched on, Civ4 gets 3 GB of address space, while Windows will have to make do with 1 GB. In our cloakroom analogy, this means that 1 billion number slips that previously were reserved for cloakroom employees, can now be used by the customer.

    7. Of course, this only works if the customer actually understands numbers bigger than 2 billion. In PC terms, this is signified by a "flag" that can be set (or not) inside each program. For Civ4 BtS 3.19, this flag is already set. This means, the program _can_ handle numbers bigger than 2 billion. Of course, this flag is only effective if used together with the 3GB switch mentioned above, which causes Windows to actually allow Civ4 to access addresses in this range.

    8. In a 64-bit operating system, the address space is much, much larger than 4 GB. (It's like a new form of cloakroom which has many more number slips than the previous versions.) However, the customer still needs to understand the numbers given to him. In PC terms: A 32-bit program that has doesn't have the "flag" enabled, will still only underatnd numbers up to 2 billion. Civ4, which has the flag enabled, will understand numbers up to 4 billion. A native 64-bit program will understand numbers much, much larger, but Civ4 is a 32 bit program, so 4 billion is the limit.

    Hrm. Still quite a wall of text. But I hope it helps to understand why there are different types of memory limitations, and what the mysterios 2 GB barrier, 3 GB switch, flag, and 32-bit vs 64-bit addressing, mean in terms of Civ4's playability and stability.
     
  17. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    39
    Psyringe, thank you for a necessary and pedagogical explanation of the technical concepts involved!

    If think that you have cleared some of the technical confusion up. Let me try to interpret your conclusion. BTS 3.19 is flaged and therefore has 4 GB of access space available. Thus your bolded comment "Even if Civ4 currently only occupies, say, only 1.6 GB of memory, it may be allocating 1.95 GB of address space already." shouldn't really be a problem in a 64-bit machine, since 1.95 GB isn't close to 4 GB.

    So, on a 64-bit machine, civ IV, being a 32-bit application, should be able to allocate 4 GB of address space, and given the sufficient amount of physical RAM, it should occupy 4 GB of RAM to. If this is correct, then the mystery isn't solved since I (and others complaining about the same problem) do have >= 6 GB physical RAM and a 64-bit operating system. I agree that there should be crashes on a 32-bit machine without the 3 GB switch, but the way you put it there should be plenty more that 2 GB of both access memory and physical RAM for civ to utilize.

    Did I misunderstand you?

    Thanks again for taking your time to explain stuff...!
     
  18. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    Glad to be of help. :)

    I believe that this is correct. You have a 64-bit OS and >6 GB of RAM, under these conditions Civ4 should not crash due to memory problems of either type, neither lack of memory nor lack of address space. If it crashes nonetheless, then the reason for the crashes is unlikely to be related to memory. Unfortunately this means that your mystery isn't solved. Fortunately it means that it _can_ be solved, there's no hard unsurmountable limitation involved as far as I can see. The problem is that solving this problem may require substantial debugging and programming skills, as well as a good amount of time ...
     
  19. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    The fix for the memory allocation issues was pushed yesterday. I imagine Afforess will make an update imminently
     
  20. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    39
    Psyringe
    Haha, well, I guess we'll be relying on the compitent minds of Afforess and those who help him develop this marvelous BTW mod. It feels good to have come to an end with the RAM issue one and for all atleast, I think that it is a question that have been hanging in the air for quite some time now.
    But I guess that means that's it for my hotseat save for now =(

    Kushling
    Maybe that can be worth trying then. Can I find that fix somewhere or is it yet to be posted?

    I'm uploading my save (the 7z file) as per the instuctions at the begining of this thread. I tried to locate the "A New Dawn.log" to include it too, but that file is nowhere to be found. Where is it supposed to be more precisly?
     

    Attached Files:

Thread Status:
Not open for further replies.

Share This Page