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

Memory Leak?

Discussion in 'Civ4 - Bug Reports' started by jinif, Nov 4, 2005.

  1. jinif

    jinif Chieftain

    Joined:
    Jan 25, 2002
    Messages:
    89
    Location:
    Davis, CA
    I had a little trouble understanding this concept and any posible solutions. When running the game I have had a couple CTD on larger maps (the Earth map) with my computer saying afterwards there was a virtual memory problem.
    Is this something I can fix? I have 512 RAM, will getting more solve the problem?
    As I understand it the game may be suffering from a memory leak in which the game does not released unused memory, which eventually causes the game to crash.
    Once the game crashes, should I restart the computer to get the memory back? or is it released when Civ4 crashes?
    Thanks
     
  2. History_Buff

    History_Buff Knight of Cydonia

    Joined:
    Aug 12, 2001
    Messages:
    6,529
    Location:
    Calgary, Alberta
    Well, from my programming knowledge, as soon as Civ4.exe or whatever shuts down, all the memory allocated to it should be released, or so the operating system is designed to do.

    Of course, there could be issues on whether that actually happens, someone whos know more about the inner workings should be able to confirm.
     
  3. Ribannah

    Ribannah Fighter Druid

    Joined:
    Aug 6, 2001
    Messages:
    2,449
    Location:
    Castle Gobs
    There is no memory leak, as far as I can see. The game runs an entire day on my 256K RAM. However, there seems to be something else: each time you use a new feature, like an advisor screen, it gets loaded into memory and then stays there. So the more features you use during a session, the more memory is claimed by them. If you quit and reload the game the memory will be clear again.
     
  4. gh0st

    gh0st Chieftain

    Joined:
    Nov 5, 2005
    Messages:
    1
    Virtual memory is completely different than the concept of "I have X memory, will more help?"

    Virtual memory is disk space, not memory. Do disk maintenance (defrag, cleanup, etc.) Then, check out your virtual memory settings (google it).

    This may or may not help. But if you are getting a "virtual memory" message, this has nothing to do with your actual memory.
     
  5. Knyx

    Knyx Chieftain

    Joined:
    Mar 29, 2005
    Messages:
    31
    I'm pretty sure there is a huge memory leak problem when you load a saved game
     
  6. Harkonnen

    Harkonnen Prince

    Joined:
    Sep 13, 2005
    Messages:
    532
    Crashing without a single warning usually means stack overflow. But this can easily happen with 1.5Gb memory usage even without actual stack error. It can happen just because of 2Gb addressable user memory limit (some of which is reserved for system DLLs, memory-mapped files, etc...). I mean, it does not only grow outside physical memory, it grows outside 32bit address space. Wow! If it's not a memory leak, prepare for complete 64-bit upgrade (including OS).
     
  7. DaEezT

    DaEezT Civ, Pizza, Spam, Repeat

    Joined:
    Sep 22, 2001
    Messages:
    1,087
    Location:
    Munich, Germany
    oh god. If you don't know what virtual memory is please don't post nonsense like that. :rolleyes:

    I think you people should stop trying to prove that there is a memory leak by throwing around random terms without knowing what they mean or how they should be interpreted.

    If only half of the memory leak claims on this forum where true then the game wouldn't be able to run for more than 5 seconds!

    And yes, I study computer science in the 7th semester and no, I won't go explaining all the terms to you.
     
  8. Harkonnen

    Harkonnen Prince

    Joined:
    Sep 13, 2005
    Messages:
    532
    This can be a memory leak not with each frame, but with some rare, still continous event. Like new turn or entering advisor screen or auto-saving.
     
  9. ledhed

    ledhed Chieftain

    Joined:
    Oct 29, 2005
    Messages:
    35
    Hmmm I have no clue so I will just report what happened and let you geniuses figure it out . The game slowed down to a crawl with it taking almost 10 minutes a turn in the most annoying and frustrating ways . It started with a diplmomacy screen ..the music started the screen froze ..and I waited....and waited...nice music...drums are cool...still waiting....waiting...any day now....there we go...done ...oops onother screen technology this time ...ok....waiting....waiting....I'll be back got a house to build .....wow still loading ....next time I'll try a 3 story house...waiting...ok here we go...try to move units...hmmm cant really scroll...wtf ....screw this save ..exit ti desk top ..check task manager...page file history shows ...hmmm 2.4 gigs being used...why wont msn load ?...check processes...CIV IV STILL SHOWING as a running process....end programm.....blinking on and off...never seen that before....still running according to WTM...wtf.......hmmm here we go took a few minutes but it finally died .....I dont know what memory leak is but wtf...this game is screwed .
     
  10. Harkonnen

    Harkonnen Prince

    Joined:
    Sep 13, 2005
    Messages:
    532
    That's actually what memory leak is. Program asks for memory, does something with it, but does not return it back when it's finished. And then it eventually asks for more...

    It's like forgetting a pen on the floor instead of putting it back into a pen-box. Sooner or later you'll run out of pens (out of free memory).
     
  11. Tsume

    Tsume Chieftain

    Joined:
    Nov 4, 2005
    Messages:
    26
    Good analogy there Harkonnen. And for those of you saying that hardware is the issue, please shutup :) As someone said above they ran it for a whole day on 256mb of RAM. I've got 1Gb of dual channel DDR400 and it just crashed again. So I would say they have something fishy with the whole memory allocation thing in the game.

    DaEezt, please don't patronise people just because you're doing computer science. You're not better than the rest of us you just happen to know more. If you're so intelligent then tell us what a memory leak is instead of just saying
    "If only half of the memory leak claims on this forum where true then the game wouldn't be able to run for more than 5 seconds!

    And yes, I study computer science in the 7th semester and no, I won't go explaining all the terms to you."


    You don't actually help the situation with comments like that, you aggravate it. There is supposedly a patch on its way shortly so hopefully this will solve some serious issues the game seems to have such as the diplomacy issue. Hell I just clicked "Ghenghis Khan" to see if i could grab some tech off him and my entire computer reset itself!?! So maybe it'll all get fixed shortly :)
     
  12. DaEezT

    DaEezT Civ, Pizza, Spam, Repeat

    Joined:
    Sep 22, 2001
    Messages:
    1,087
    Location:
    Munich, Germany
    Actually I think people who post things that are completly and utterly wrong (like "Virtual memory is disk space, not memory.") aggrevate the situation because people who don't know whats going on believe it and suddently you have half a dozent memory leak threads where everyone blindly joins the crusade started by a few ppl who posted a few technical terms without knowing what they mean. And I didn't patronize anyone, I pointed out some wrong info and I won't argue any points about who is qualified to draw conclusions or who isn't because online, everyone suddently turns into an expert for everything... so you can either believe me or not.

    And I still won't preach the inner workings of PCs here, I gave up doing that online quite a while ago.
    But Harkonnen seems like he is still enthusiastic enough to explain some of the stuff in detail ;) (And he seems to know that he is talking about)

    Just remember: memory leaks don't cause slowdowns and having more main memory doesn't really help either (at least on the average windows system).
     
  13. Ribannah

    Ribannah Fighter Druid

    Joined:
    Aug 6, 2001
    Messages:
    2,449
    Location:
    Castle Gobs
    Ten years ago memory leaks were a common issue, but not now. Crashes are now most likely caused by calling or timing errors although initialization, range, overflow and similar errors are still possible.

    Slowdown can be caused by changes in threads, if it's a programming issue, but of course also by the simple fact that the CPU and/or the video chip has more calculations to make as the game progresses.
     
  14. ledhed

    ledhed Chieftain

    Joined:
    Oct 29, 2005
    Messages:
    35
    Again I do not know why it slows down , but experiance and common sense tells me that the more its got to do , the more it may slow down.. BUT what leads me to a programming problem is the fact that the slowdown is not consistant and seems to be cumulative . Also the ammount and type of problems running the game are ridiculouse ..I compare the game to others I run with the same equipment ..that meets or exceeds the reccomendend hardware and the game still runs like a hemmariodal geezer on morphine..sorry the softwares got some seriouse issues that need to be fixed .
    Whatever the problems called be it memory leak or galactic flux ..I care not..I want what I paid for . As it stands now I got a beta testers leftovers .
     
  15. Harkonnen

    Harkonnen Prince

    Joined:
    Sep 13, 2005
    Messages:
    532
    BTW, when I watched it from TaskInfo (more detailed app than task manager) - I saw 6-8 threads spawning and dying evey second. Perhaps these were python garbage collectors, I dunno...

    Looking at python folder I see that it uses OpenGL and uses it via Python... hic!
     
  16. Tsume

    Tsume Chieftain

    Joined:
    Nov 4, 2005
    Messages:
    26
    I meant that you could stop the pointless crusading on memory leaks because I for one AM interested to find out what it is. Ribannah thankyou, that explains a little bit more about what could be happening ^_^ But yeah how the hell does my computer reset itself when I click to see the mongols. I guess that's for another thread ;)
     
  17. Sevenhertz

    Sevenhertz Chieftain

    Joined:
    Nov 7, 2005
    Messages:
    18
  18. tegilbor

    tegilbor Chieftain

    Joined:
    Oct 31, 2005
    Messages:
    82
    Actually, that statement was completely and utterly correct. The virtual memory in Windows is contained in the so-called page file, which is stored on the hard disk, so yes, virtual memory is disk space.
    ...without ever explaining why it is supposedly wrong.
    It sure seems like it. :rolleyes:
    Yes, they do.
    Yes, it does.
    I hold an MSc degree in computer science and I am project manager in software development, and no, I won't go explaining all the terms to you.

    :rolleyes:
     
  19. tegilbor

    tegilbor Chieftain

    Joined:
    Oct 31, 2005
    Messages:
    82
    From reading the various threads where people complain about slowdowns and from my own experience with the game, the slowdowns in Civ4 are caused mostly by extensive harddrive accesses.
     
  20. Enigma

    Enigma Chieftain

    Joined:
    Jan 5, 2003
    Messages:
    31
    Look, there's definately a major memory leak:
     

    Attached Files:

Share This Page