Announcement

Collapse
No announcement yet.

PROJECT: Playtest

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by Martin Gühmann
    You have a text editor like notepade with a basic find function. You could use it to look for log.
    I think he means that he did search for "crash", but didn't think to search for "log".

    Comment


    • Yes, the most basic function needed is thinking, but sometimes it's lacking
      The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

      Comment


      • CtD on SaveGame Load

        I guess these games were saved under April 3 playtest. With April 18 playtest savegame gives CtD on load but autosave will load fine. No crash log.

        Save is AD500, Auto is turn AD510
        Attached Files
        ·Circuit·Boi·wannabe·
        "Evil reptilian kitten-eater from another planet."
        Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

        Comment


        • Originally posted by Martin Gühmann
          The only problem with this is explaination is that it is not valid for this patch. It is right that I did the globals before John released the latest playtest, but I posted it afterwards, so you can load games saved with previous versions. However I looked into it and so far I have no idea why the global container crashes but the player array with the additional government member does not crash.
          No problem here. It may crash just as well on the added player.government . The 3 new members were just earlier in the load process, so I found those first. After removing the 3 g members, the player.government one was exposed quite easily. After repairing this by commenting out the 4 AddMember statements in SlicBuiltin.cpp, loading old saves and starting scenarios works again.

          The other problem (crash on GrantAdvance when pressing end turn) is probably not caused by the GrantAdvance code itself. The code is executed without crashes when you enter /reloadslic before ending the turn, so it is more likely that there is a problem in the Slic engine initialisation.

          Comment


          • Originally posted by Fromafar
            No problem here. It may crash just as well on the added player.government . The 3 new members were just earlier in the load process, so I found those first. After removing the 3 g members, the player.government one was exposed quite easily. After repairing this by commenting out the 4 AddMember statements in SlicBuiltin.cpp, loading old saves and starting scenarios works again.
            So, is there an easy solution which would allow addition of such things without causing problems like this one, or is it better to just implement all these features as SLIC functions, rather than variables?

            Comment


            • I thought someone had fixed the pillaging neutral tile imps bug. I got the 3 of April build and when I go to destroy an old American tile imp which is spoiling my view it crashes.
              "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
              The BIG MC making ctp2 a much unsafer place.
              Visit the big mc’s website

              Comment


              • Originally posted by The Big Mc
                I thought someone had fixed the pillaging neutral tile imps bug. I got the 3 of April build and when I go to destroy an old American tile imp which is spoiling my view it crashes.
                Actual we never fixed, I did some testing with a work around, but I wasn't happy, because it was a work around, but finally I noticed that the bug just disappeared, I guess it has to do something with the memory leaks Fromafar fixed and now reappeared.

                Originally posted by Fromafar
                No problem here. It may crash just as well on the added player.government . The 3 new members were just earlier in the load process, so I found those first. After removing the 3 g members, the player.government one was exposed quite easily. After repairing this by commenting out the 4 AddMember statements in SlicBuiltin.cpp, loading old saves and starting scenarios works again.
                Then this means I loaded a scenario afterwards I added the player.government, in that case it means if you start a scenario, then slic is relaoded at scenario start actual what I exspected.

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

                Comment


                • OK, I figured out, why it may occur and why it may not occur:

                  Code:
                  #if !defined(ACTIVISION_ORIGINAL)
                  	//Added by Martin Gühmann to prevent
                  	//the game from accessing an invalid
                  	//area of memory, plain arrays don't
                  	//have out of bounds array, so accessing
                  	//g_player[-1] may give you everything.
                  	//It is not very probably that you get 0.
                  	if (owner == -1)
                  		return GEV_HD_Continue;
                  #endif
                  
                  	Player *owner_player = g_player[owner];
                  	if (owner_player == NULL ||
                  		owner_player->GetGaiaController() == NULL)
                  		return GEV_HD_Continue;
                  Plain arrays don't have any range checks, so you can access even places beyond the bounds, that is no problem if you don't use the resulting object. Accessing invalid memory can give you anything. If you are lucky it is NULL, if you have bad luck it is something else. And crash.

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

                  Comment



                  • Could someone test my savegame with a debug version to see why it gives a CtD on load.
                    ·Circuit·Boi·wannabe·
                    "Evil reptilian kitten-eater from another planet."
                    Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                    Comment


                    • Not that its very helpful but the save loaded fine on the unmodded 1.1 CtP2, then i tried loading with the 2004.4.12 playtest and it crashed on loading.
                      Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                      CtP2 AE Wiki & Modding Reference
                      One way to compile the CtP2 Source Code.

                      Comment


                      • That is just bizarre!
                        ·Circuit·Boi·wannabe·
                        "Evil reptilian kitten-eater from another planet."
                        Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                        Comment


                        • help me!!

                          I compiled the source code successfully without any sound. because I comment out mss.h mss.lib.

                          where can I download these files?

                          Comment


                          • Re: help me!!

                            Originally posted by gogo03
                            I compiled the source code successfully without any sound. because I comment out mss.h mss.lib.

                            where can I download these files?
                            You should first apply the file you find in this post. And maybe you should also read the end of the first post or better the end of the second part of the first post of that thread, to get some install notes. The file for that you ask is in huge file pack with a lot of other additions.

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

                            Comment


                            • Originally posted by Flinx
                              That is just bizarre!
                              Most of the following information was already available, but the user noticable effects got a bit buried beneath the technical information to get to the cause of the error .
                              I guess it is time for a status update on the save file loading crashes.

                              Crashes when loading a file

                              At the moment, we have 4 different file formats for save files, dependent on the release. Only the first 2 types are correct.
                              • Playtest releases 2004.02.21 and before generate files that are in the same format as the original (unpatched) Activision release.
                                These releases can read files that have been generated with the unpatched Activision release, but can not read files that have been generated with the Activision 1.1 patch.
                                Files generated with this release can be loaded with the Activision executables (both patched and unpatched), and with the 2004.03.31 and 2004.04.03 releases.
                              • Playtest releases 2004.03.31 and 2004.04.03 generate save files that are compatible with the Activision 1.1 patch format.
                                This release is able to load both 1.1 patch format files and original unpatched format files.
                                Generated files can be loaded with the Activision 1.1 executable, but not with the unpatched executable, nor with playtest releases 2004.02.21 and before.
                              • Playtest release 2004.04.12 generates incorrect save files - because of the added player.government variable.
                                Loading any other than 2004.04.12 format files may cause a crash, and loading files generated with this release may cause a crash when loading with any other release.
                              • Playtest release 2004.04.18 generates another type of incorrect save files - because of 3 more added variables.
                                Loading correct or 2004.04.12 save files may cause a crash, and loading files generated with this release may cause a crash when loading with any other release.

                              Releases that crash on loading correct save files will also crash when starting a scenario.

                              For people with the source code: comment out the 4 new AddMember statements in SlicBuiltIn.cpp to reenable loading any correct file format and generation of Activision 1.1 patch format files.

                              Crashes after loading a file

                              These occur mostly when pressing the end of turn button, but may also be triggered by other Slic events during the movement phase.

                              All playtest releases since January 2004 contain a design error that may surface when executing database related Slic functions (such as GrantAdvance) after loading a file.
                              Using /reloadslic immediately after loading the file will prevent the crash.


                              So, nothing bizarre here. Just software.

                              Comment


                              • Thanks for the explanations Fromafar... and most of all for the /reloadslic trick.

                                Has someone corrected the problem you are writing about or is it a bug that we will also find in the next playtest release?
                                "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                                Comment

                                Working...
                                X