Announcement

Collapse
No announcement yet.

CTP and the memory leak

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CTP and the memory leak

    It seems that CTP2 (and CTP1) has a bad memory leak.

    For those of you that don't what this is I'll try and explain.

    When CTP does its calculations it needs some memory to do this.(RAM) The game therefore request Windows to set aside an appropriate amount. This is necessary so that if another process running on your PC needs some resources Windows knows that this particular block has been asigned to CTP. Here's the rub. When CTP has finished it does not tell windows that the memory is no longer needed. Next time some memory is needed Windows assigns another (new) block. Again this is not released. Soon all 256 MB of RAM is filled with crud. When CTP now asks for some memory windows frees some up by putting stuff on the hard drive. All of a sudden the hard disk starts to whirr furiously and the game slows to a crawl. Quitting CTP has no effect since windows still thinks that the memory is in use. Only restarting the PC will work.

    This bug makes CTP virtually unplayable. Does anyone know of a patch or work around for this problem?

  • #2
    1. Name me one (fairly) recent commercial game/app that *doesn't* have any kind of resource leak (with all these 2GHz 512 MB systems, programmers are soooo sloppy these days - long live the 640k era! )

    2. When Windoze is your OS, it's ALWAYS a good idea to reboot your system every few hours/days (depending on intensity of usage), with or without playing CtP. Nothing new here....

    3. At least on my system the problem isn't nearly as bad as you describe: I've played CtP for many hours on end and not had any really unacceptable delays (although with time it *does*get slower and slower). Do you have the patches installed? (Not sure if they fix any memory leaks though)

    4. How often do you play games for hours on end anyway? I mean, don't you have a life or anything?
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • #3
      Originally posted by Locutus
      2. When Windoze is your OS, it's ALWAYS a good idea to reboot your system every few hours/days (depending on intensity of usage), with or without playing CtP. Nothing new here....
      When windoze is your OS, the PC crashes three times every evening anyway, so there's no problem.
      Concrete, Abstract, or Squoingy?
      "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

      Comment


      • #4
        The problem becomes apparent after about 10 turns. My earlier PC had 128 MB of RAM and only about 5 turns were needed.

        I am an old codger and have already had a lifle. What is left is devoted to playing computer games. I also dapple in designing and programming my own to play with friends.

        Comment


        • #5
          Hi, Lou

          Welcome onboard.

          The problem becomes apparent after about 10 turns. My earlier PC had 128 MB of RAM and only about 5 turns were needed.
          Wow, that's strange. I've only got 128 MB and I've never noticed any problem. Also, I think you're the first one to bring this up; surely if it were a more common problem someone would have mentioned it earlier. You say it affects CTP1 too? Maybe it would be an idea to post a question in CTP1 Multiplayer. I think there's still a lot of guys playing it so there's more likely to be someone there who has come across it.

          You mentioned earlier:

          In my view the most serious drawback of CTP2 is the almost total passivity of the AI. Given that there will be no CTP3 is there any point in 'brainstorming' the CTP2 AI to see what can be done? (I know that some work has already been done in this regard.)
          Although much has been done, IMHO there's still much more that could be done. Paradoxically, one of the big drawbacks of CTP2 is that it is so modifiable. You can change almost anything; in particular, you can virtually completely rewrite the AI. Check out player1's thread "Strategic CODE " in the CTP2-Creation/... forum. As Locutus pointed out there, in theory you could completely clear the existing strategies and then start over from scratch. But as he went on to note, this would just be too huge an undertaking. Still, there's lots of room for experimentation.

          So, the problem is, though, that even after a year, it's difficult to know where to start. I see you're a programmer, so if you're interested and you've got some time on your hands, this has got to be the forum for you. There's definitely a point to 'brainstorming' the AI: for example, the problems of getting the AI to use it's Aircraft carriers properly and also to mount amphibious invasions have never been addressed.

          Comment


          • #6
            Originally posted by Peter Triggs
            Wow, that's strange. I've only got 128 MB and I've never noticed any problem.
            Heck, I used to play CtP1 on 32 MB and never had any problems (now I'm have 64 MB and, like I said before, still no problems). That's very weird, after just 10 turns.

            I see you're a programmer, so if you're interested and you've got some time on your hands, this has got to be the forum for you.
            Yeah, we can always use some fresh blood Join us now, you won't regret it!
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #7
              Originally posted by Locutus
              Yeah, we can always use some fresh blood Join us now, you won't regret it!
              Wow, Locutus missed an opportunity to say:
              YOU WILL BE ASSIMILATED
              Concrete, Abstract, or Squoingy?
              "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

              Comment


              • #8
                Originally posted by Peter Triggs
                Wow, that's strange. I've only got 128 MB and I've never noticed any problem.
                Originally posted by Locutus
                Heck, I used to play CtP1 on 32 MB and never had any problems (now I'm have 64 MB and, like I said before, still no problems). That's very weird, after just 10 turns.
                I never had this problem. Neither on my current computer (Athlon 1333 Mhz, 255 Mb Ram, Windoze98) nor on my old one (K6 233 Mhz, 64 Mb Ram, Windoze95). I had only a problem with CTP1 this bug caused a crash everytime I tried to load an advanced savegame, I had to throw 2 files into the dustbin before loading a savegame and it worked. That was before the hack patch, so my question do you have the patch installed? I guess you have but nevertheless I should ask.

                -Martin
                Civ2 military advisor: "No complaints, Sir!"

                Comment


                • #9
                  Originally posted by Immortal Wombat

                  Wow, Locutus missed an opportunity to say:
                  YOU WILL BE ASSIMILATED
                  Ssssssst... assimilating human beings over the Internet is very tricky, therefore we have adapted: we now only inform drones of their assimiliation after the act. BTW, Big Mc: you have been assimilated, your distinctiveness has been added to our own
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #10
                    Ah, most cunning.
                    Concrete, Abstract, or Squoingy?
                    "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                    Comment


                    • #11
                      Assimilation

                      Lou......Beware. Could wind up all your bases are belong to us!!!!

                      Actually, I believe I am running into this problem. I thought I was just running a whole lot of decisions by other civilizations in the background, but I couldn't understand why it was still sludgy during my turn

                      Wow - a fix would be great. I'd volunteer, but I'm not much of a programmer.
                      Many are cold, but few are frozen.No more durrian, please. On On!

                      Comment


                      • #12
                        Well, I must confess that the memory problem only manifests itself in the mid game when presumably there is lots going on. Still with 256 MB of RAM there should be no need to go to the hard disk except perhaps to look up a few things. Even this is problematical though since it ALL should fit comfortable in RAM. The difference in performance is huge. For those of you who have not experienced the problem perhaps you should 'attune' yourselves to what your PC is actually doing.

                        As for helping with MODS I am happy to. I am (was) a database programmer and my skill with low level languages is limited. As pointed out the problem with the CTP AI is that there are just too many variables. Leaving aside for the moment whether the game engine is actually capable of doing anything 'smart' there are more possible combinations and permutations than there are atoms in the universe.

                        My suggestion for 'brainstorming' the AI would fall into several parts. Firstly decide just how exactly we want the AI to behave. Then start varying the parameters in a systematic way and play test and play test and play test.

                        I have been playing CRA and am enjoying it immensely. This is far better than Civ3. MODded CTP is simply a hugely under rated game worthy of more attention

                        Comment

                        Working...
                        X