Announcement

Collapse
No announcement yet.

PROJECT: Playtest Thread III

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

  • Rev540
    CTD turn 28 - reload autosave - okay
    CTD turn 44 - reload autosave - okay
    CTD turn 135 - reload autosave - okay
    CTD same spot, could not continue game.

    Well, so much for that one.

    crash.txt:

    0x004cb6b0 [?GetSpecialForcesSupportModifier@MilitaryReadiness @@QBENJ@Z + 0x0]
    0x00484034 [?GetDescription@ArmyEstablishEmbassyOrderEvent@@EA EXPADJ@Z + 0x14]
    0x00501cb3 [?SaveUnits@MapFile@@QAE_NPAU_iobuf@@@Z + 0xb3]
    0x004fe5a0 [?gameinit_Initialize@@YAJJJAAVCivArchive@@@Z + 0x12f0]
    0x004fe30e [?gameinit_Initialize@@YAJJJAAVCivArchive@@@Z + 0x105e]
    0x00494041 [?NotifyAdvance@CityData@@QAEXJ@Z + 0xa1]
    0x0049d7e2 [?SetEnabled@CriticalMessagesPrefs@@QAEXPBD_N@Z + 0x172]
    0x005ba9df [?CheckRequiredFields@RiskRecord@@QAEXPAVDBLexer@@@ Z + 0x3cf]
    0x005ba976 [?CheckRequiredFields@RiskRecord@@QAEXPAVDBLexer@@@ Z + 0x366]
    0x005bb5da [?Parse@SpecialAttackInfoRecord@@QAEJPAVDBLexer@@@Z + 0x3a]
    0x005b9294 [?Serialize@ResourceRecord@@QAEXAAVCivArchive@@@Z + 0x204]
    0x005bb438 [?Serialize@SpecialAttackInfoRecord@@QAEXAAVCivArch ive@@@Z + 0x78]
    0x005bb3db [?Serialize@SpecialAttackInfoRecord@@QAEXAAVCivArch ive@@@Z + 0x1b]
    0x0040f081 [?GetNextPosition@Anim@@QAEJJ@Z + 0x11]
    0x00407dd0 [??0CivApp@@QAE@XZ + 0x10]
    0x00407847 [?AddSearchPath@?$aui_Resource@Vaui_Image@@@@QAE?AW 4AUI_ERRCODE@@PAD@Z + 0xc7]
    0x008a790c [?g_mapTokenData@@3PAUTokenData@@A + 0x9e5c]
    0x77e814c7 [__onexitbegin + 0x773b5fef]
    What do I think of Western civilization? I think it would be a very good idea.
    Mohandas Gandhi

    Comment


    • hmmmm,

      I'm dont read the crash text too well o hopefully J bytheay, fromafar, or martin G or someone can spot the problem and put in a fix.

      My guess would be a pathing problem, but I dont know why it happened so late in the game. Any chance you can tell what techlevel you are at or the player where the crash is? maybe its a late game order that is causing the crash.

      Thanks for testing this, sorry about the problems
      Formerly known as "E" on Apolyton

      See me at Civfanatics.com

      Comment


      • I know very little about the error codes used in this program, but the line:

        0x00407847 [?AddSearchPath@?$aui_Resource@Vaui_Image@@@@QAE?AW 4AUI_ERRCODE@@PAD@Z + 0xc7]

        sort of looks like it can't find a picture for a resource that you may have added. Am I even close?

        well anyway, tried the cheat mode to see if anything was amiss by removing the fog of war, the turn completed okay, so I reloaded the autosave again and got the game up to turn 139 where it crashed again.

        Crash.txt:
        0x004cb6b0 [?GetSpecialForcesSupportModifier@MilitaryReadiness @@QBENJ@Z + 0x0]
        0x00484034 [?GetDescription@ArmyEstablishEmbassyOrderEvent@@EA EXPADJ@Z + 0x14]
        0x00501cb3 [?SaveUnits@MapFile@@QAE_NPAU_iobuf@@@Z + 0xb3]
        0x004fe5a0 [?gameinit_Initialize@@YAJJJAAVCivArchive@@@Z + 0x12f0]
        0x004fe30e [?gameinit_Initialize@@YAJJJAAVCivArchive@@@Z + 0x105e]
        0x0048ec6b [?CalculateTradeRoutes@CityData@@QAEJ_N@Z + 0xcb]
        0x004954ac [?GetValue@CityData@@QBEJXZ + 0x14c]
        0x004900e3 [?CheckRiot@CityData@@QAEXXZ + 0x133]
        0x0048fbaf [?BeginTurn@CityData@@QAEJXZ + 0x12f]
        0x0048f1f6 [?SupportBuildings@CityData@@QAEJ_N@Z + 0x106]
        0x0049c19f [?ReleaseCityName@CivilisationData@@QAEXJ@Z + 0xf]
        0x005ba9df [?CheckRequiredFields@RiskRecord@@QAEXPAVDBLexer@@@ Z + 0x3cf]
        0x005ba976 [?CheckRequiredFields@RiskRecord@@QAEXPAVDBLexer@@@ Z + 0x366]
        0x005bb5da [?Parse@SpecialAttackInfoRecord@@QAEJPAVDBLexer@@@Z + 0x3a]
        0x005b9294 [?Serialize@ResourceRecord@@QAEXAAVCivArchive@@@Z + 0x204]
        0x005bb438 [?Serialize@SpecialAttackInfoRecord@@QAEXAAVCivArch ive@@@Z + 0x78]
        0x005bb3db [?Serialize@SpecialAttackInfoRecord@@QAEXAAVCivArch ive@@@Z + 0x1b]
        0x0040f081 [?GetNextPosition@Anim@@QAEJJ@Z + 0x11]
        0x00407dd0 [??0CivApp@@QAE@XZ + 0x10]
        0x00407847 [?AddSearchPath@?$aui_Resource@Vaui_Image@@@@QAE?AW 4AUI_ERRCODE@@PAD@Z + 0xc7]
        0x008a790c [?g_mapTokenData@@3PAUTokenData@@A + 0x9e5c]
        0x77e814c7 [__onexitbegin + 0x773b5fef]


        Well anyway, tried the game on the German side since it seemed they were the ones bombing the game out, and as soon as I ended my turn - bam CTD. Tried it as the French (the next player) and it finished the turn with no problem. Went back to the German player the next turn - bam CTD. Hope that helps. Game is saved, so if anyone needs it for troubleshooting...

        Aren't cities supposed to be spread out a little further than this? (see below) How are they supposed to grow? Those two cities up in the mountains aren't going to be very useful, no growth and nothing but specialist farmers just to keep the population where it is, no one left to build other stuff with. The French had four cities practically on top of each other - two spaces between cities so they have no chance to expand.
        Attached Files
        What do I think of Western civilization? I think it would be a very good idea.
        Mohandas Gandhi

        Comment


        • Fugi,
          Thanks for helping on this. I'm assuming you only added the Rev540 build and not my other EMOD right? Also if it is just the Rev540 did you copy everything in the zip over? There are some additional files there (but nothing I added)

          Until someone better comes along any chance you can check out the Germans and see what they are buildinig in their cities? That might be the problem. I remember (a long time ago) I was having a build problem like that too but I think it was a mod of mine (IIRC I think the problem was building an oil refinery for some reason). It was around the industrial age it happened, is that where you are at? Are there any unfinished tile improvements? or wonders?

          feel free to post your save game and I'll try to give it a shot.


          As for the AI building, sometimes they build close depending on the situation for operational depth IIRC when they were discussing how the AI will build its empire. The mountain cities are a problemit looks like, but the AI will treat them as forts I think. However in my EMOD I did make where the AI can only build on grass, plains, and deserts and it settled pretty good.
          Formerly known as "E" on Apolyton

          See me at Civfanatics.com

          Comment


          • You assume correct. And just to make sure that all needed files were moved over I moved all the files, not just the executable that I did last time (since that was the only new file), but apparently something is different since I now get a whole mess of Out of Bound errors that weren't there before when hit the turn button to see if that was the problem.
            As for what the Germans were building: 3 catapults, 1 Granary, 2 Hoplites, 4 settlers, and one slaver. The slaver is the only one that would be completed next turn, or the turn that would screw up, and a settler out near the edge of the empire moves back toward the safety of the empire when seeing a neighboring military unit. The only unfinished tiles that I can see are in the neighbor to the north, probably a road since it is on a swamp.

            Well anyway, started a different game, playing as Etruscans, player one this time, 22 empires, huge map, doughnut world. Everything was fine until turn CTD on turn 58. Reloaded from autosave okay and played okay until turn 68 with another CTD - no matter how many times I reloaded the autosave, the game refused to go further.

            crash.txt:

            0x004cb6b0 [?GetSpecialForcesSupportModifier@MilitaryReadiness @@QBENJ@Z + 0x0]
            0x00484034 [?GetDescription@ArmyEstablishEmbassyOrderEvent@@EA EXPADJ@Z + 0x14]
            0x00501cb3 [?SaveUnits@MapFile@@QAE_NPAU_iobuf@@@Z + 0xb3]
            0x004fe5a0 [?gameinit_Initialize@@YAJJJAAVCivArchive@@@Z + 0x12f0]
            0x004fe30e [?gameinit_Initialize@@YAJJJAAVCivArchive@@@Z + 0x105e]
            0x00494041 [?NotifyAdvance@CityData@@QAEXJ@Z + 0xa1]
            0x0049d7e2 [?SetEnabled@CriticalMessagesPrefs@@QAEXPBD_N@Z + 0x172]
            0x005ba9df [?CheckRequiredFields@RiskRecord@@QAEXPAVDBLexer@@@ Z + 0x3cf]
            0x005ba976 [?CheckRequiredFields@RiskRecord@@QAEXPAVDBLexer@@@ Z + 0x366]
            0x005bb5da [?Parse@SpecialAttackInfoRecord@@QAEJPAVDBLexer@@@Z + 0x3a]
            0x005b9294 [?Serialize@ResourceRecord@@QAEXAAVCivArchive@@@Z + 0x204]
            0x005bb438 [?Serialize@SpecialAttackInfoRecord@@QAEXAAVCivArch ive@@@Z + 0x78]
            0x005bb3db [?Serialize@SpecialAttackInfoRecord@@QAEXAAVCivArch ive@@@Z + 0x1b]
            0x0040f081 [?GetNextPosition@Anim@@QAEJJ@Z + 0x11]
            0x00407dd0 [??0CivApp@@QAE@XZ + 0x10]
            0x00407847 [?AddSearchPath@?$aui_Resource@Vaui_Image@@@@QAE?AW 4AUI_ERRCODE@@PAD@Z + 0xc7]
            0x008a790c [?g_mapTokenData@@3PAUTokenData@@A + 0x9e5c]
            0x77e814c7 [__onexitbegin + 0x773b5fef]

            Oh well, back to Playtest 1.

            Game save from first game attached:
            Attached Files
            What do I think of Western civilization? I think it would be a very good idea.
            Mohandas Gandhi

            Comment


            • I compiled a rev540 Debug version and the last bunch is this:
              Code:
                  c3debug.cpp@320 : Assertion (!targets.empty()) Failed in File:F:\SVN-Code\trunk\ctp2_code\ai\mapanalysis\SettleMap.cpp, Line:228
                  c3debug.cpp@323 : Stack Trace: '  0x00457720  [(unknown) + 0x0]
                0x00452174  [(unknown) + 0x0]
                0x00b5af1e  [(unknown) + 0x0]
                0x00b73550  [(unknown) + 0x0]
                0x00b715a5  [(unknown) + 0x0]
                0x006206e1  [(unknown) + 0x0]
                0x006ed906  [(unknown) + 0x0]
                0x006ed831  [(unknown) + 0x0]
                0x006ef8d5  [(unknown) + 0x0]
                0x006eb3b2  [(unknown) + 0x0]
                0x006ef4a5  [(unknown) + 0x0]
                0x006ef3de  [(unknown) + 0x0]
                0x006ef2d9  [(unknown) + 0x0]
                0x006ef0c6  [(unknown) + 0x0]
                0x004b3071  [(unknown) + 0x0]
                0x004a8f44  [(unknown) + 0x0]
                0x004a660a  [(unknown) + 0x0]
                0x0046d39f  [(unknown) + 0x0]
                0x0046d8de  [(unknown) + 0x0]
                0x00461c2e  [(unknown) + 0x0]
                0x00461233  [(unknown) + 0x0]
                0x00b88fc3  [(unknown) + 0x0]
                0x7c816d4f  [(unknown) + 0x0]
              the last repeating stuff is the stack, but it does appear the mapanalysis is the problem.

              The line in question has something to do with settle target, Can someone with better programming skills help?
              Last edited by Ekmek; January 25, 2006, 16:10.
              Formerly known as "E" on Apolyton

              See me at Civfanatics.com

              Comment


              • Fugi,

                I messed around with it some more. Sometimes I could go another turn with the save you posted but most times I get the crash.

                I thought at first maybe my settlecity code did it but i removed it and got the same error. So after messing wiith it I think the error might be with the DOUGHNUT shape. it might be throwing off the ai settling targets. You might try loadingit with playest 1 but not sure it will work. ANy chance you are willing to try a normal world map (with less players) and a little smaller just to get through a whole game?
                Formerly known as "E" on Apolyton

                See me at Civfanatics.com

                Comment


                • The assert in SettleMap.cpp is harmless. From what I can see, it just tells you that there were no (good enough) spots to settle. The first real crash is in ArmyData::Bombard. There are a couple of GetNonLethalBombard calls where you are using the defender index while looking in the attacker list (and the other way around).

                  And don't forget to put the proper map file in your next distribution. The generated crash.txt is useless when the exe and map files do not match.

                  Comment


                  • thanks fromafar,
                    When I tested the code it seemed to work, and the reason I called the defender index while in the attacker list was because on the counterbombard stuff.

                    the original code looked like this:
                    Code:
                        for (i = m_nElements - 1; 0 <= i; i--) { 
                            if (m_array[i].GetHP() < 0.999) {
                                m_array[i].KillUnit(CAUSE_REMOVE_ARMY_COUNTERBOMBARD, defender.GetOwner());  
                            } 
                        }
                        
                        //kill off defending units that were newly damaged
                        for (i = defender.Num() - 1; 0 <= i; i--) { 
                            if (defender[i].GetHP() < 0.999) {
                                defender[i].KillUnit(CAUSE_REMOVE_ARMY_BOMBARD, GetOwner());
                    I thought I should add an attacker NonLethalBombard check before the killunits to preventthe unit from being killed. which appeared to work. should I take it before the 'for' statement then? I'll check it out.

                    thanks!

                    PS for the map files, I think this relates to the ctp2_debug.exe. Are they also in the ctp folder?
                    Last edited by Ekmek; January 26, 2006, 13:16.
                    Formerly known as "E" on Apolyton

                    See me at Civfanatics.com

                    Comment


                    • Fromafar,

                      I out commented the conflicting marray and defender lines (the nonlethal lines) and figured out the ctp2.map file so I got this crash text:
                      0x004cbc40 [?GameObj_Get@@YAPBVGAMEOBJ@@PAV1@K@Z + 0x9]
                      0x004841d4 [?Get@ObjPool@@QBEPBVGAMEOBJ@@K@Z + 0x24]
                      0x00502073 [?GetArmy@ArmyPool@@QBEPAVArmyData@@K@Z + 0x13]
                      0x004fe960 [?GetOwner@Unit@@QBEJXZ + 0x18]
                      0x004fe6ce [?GetDBRec@Unit@@QBEPBVUnitRecord@@XZ + 0x11]
                      0x00494198 [?Fight@ArmyData@@QAEJAAVCellUnitList@@@Z + 0x6fa]
                      0x0049d9e2 [?GEVHookCallback@BattleEvent@@EAE?AW4GAME_EVENT_HO OK_DISPOSITION@@W4GAME_EVENT@@PAVGameEventArgList@ @@Z + 0x79]
                      0x005ba8ef [?Run@GameEventHook@@AAE?AW4GAME_EVENT_ERR@@AAViter ator@?$list@UNode@GameEventHook@@V?$allocator@UNod e@GameEventHook@@@std@@@std@@PAVGameEventArgList@@ AAJ@Z + 0x63]
                      0x005ba886 [?Activate@GameEventHook@@QAE?AW4GAME_EVENT_ERR@@PA VGameEventArgList@@JAAJ@Z + 0x7e]
                      0x005bb44a [?ActivateHook@GameEventManager@@QAE?AW4GAME_EVENT_ ERR@@W4GAME_EVENT@@PAVGameEventArgList@@JAAJ@Z + 0x3a]
                      0x005b91a4 [?Process@GameEvent@@QAE?AW4GAME_EVENT_ERR@@AAH@Z + 0x2f]
                      0x005bb2a8 [?ProcessHead@GameEventManager@@QAE?AW4GAME_EVENT_E RR@@XZ + 0x33]
                      0x005bb24b [?Process@GameEventManager@@QAE?AW4GAME_EVENT_ERR@@ XZ + 0x7b]
                      0x0040f041 [?Process@CivApp@@QAEJXZ + 0x103]
                      0x00407db0 [?CivMain@@YGHPAUHINSTANCE__@@0PADH@Z + 0x3b6]
                      0x00407827 [WinMain@16 + 0x74]
                      0x008a78bc [WinMainCRTStartup + 0x134]
                      0x7c816d4f [__onexitbegin + 0x7bc71e17]
                      With debug.exe I got this in the log

                      c3debug.cpp@320 : Assertion (!targets.empty()) Failed in File:F:\SVN-Code\trunk\ctp2_code\ai\mapanalysis\SettleMap.cpp, Line:228
                      c3debug.cpp@323 : Stack Trace: ' 0x00457720 [char * __cdecl c3debug_StackTrace(void) + 0x20]
                      0x00452174 [void __cdecl c3debug_Assert(char *,char *,int) + 0x44]
                      0x00b5ad6e [public: void __thiscall SettleMap::GetSettleTargets(long const &,bool const &,class std::list > &)const + 0x2be]
                      0x00b733a0 [private: static void __cdecl CtpAi::AddSettleTargets(long) + 0x150]
                      0x00b713f5 [public: static void __cdecl CtpAi::BeginTurn(long) + 0xd25]
                      0x006204d1 [private: virtual enum GAME_EVENT_HOOK_DISPOSITION __thiscall BeginTurnEvent::GEVHookCallback(enum GAME_EVENT,class GameEventArgList *) + 0xc1]
                      0x006ed6f6 [private: enum GAME_EVENT_ERR __thiscall GameEventHook::Run(class std::list >::iterator &,class GameEventArgList *,long &) + 0xa6]
                      0x006ed621 [public: enum GAME_EVENT_ERR __thiscall GameEventHook::Activate(class GameEventArgList *,long,long &) + 0x81]
                      0x006ef6c5 [public: enum GAME_EVENT_ERR __thiscall GameEventManager::ActivateHook(enum GAME_EVENT,class GameEventArgList *,long,long &) + 0x65]
                      0x006eb1a2 [public: enum GAME_EVENT_ERR __thiscall GameEvent::Process(int &) + 0x32]
                      0x006ef295 [public: enum GAME_EVENT_ERR __thiscall GameEventManager::ProcessHead(void) + 0x65]
                      0x006ef1ce [public: enum GAME_EVENT_ERR __thiscall GameEventManager::Process(void) + 0x7e]
                      0x006ef0c9 [public: enum GAME_EVENT_ERR __thiscall GameEventManager::ArglistAddEvent(enum GAME_EVENT_INSERT,enum GAME_EVENT,class GameEventArgList *) + 0x189]
                      0x006eeeb6 [public: enum GAME_EVENT_ERR __cdecl GameEventManager::AddEvent(enum GAME_EVENT_INSERT,enum GAME_EVENT,...) + 0x1b6]
                      0x004b3071 [void __cdecl dh_endTurn(class DQAction *,class Sequence *,enum DHEXECUTE) + 0x41]
                      0x004a8f44 [public: void __thiscall Director::HandleNextAction(void) + 0x124]
                      0x004a660a [public: void __thiscall Director::Process(void) + 0x2a]
                      0x0046d39f [public: long __thiscall CivApp::ProcessUI(unsigned long,unsigned long &) + 0x22f]
                      0x0046d8de [public: long __thiscall CivApp::Process(void) + 0xce]
                      0x00461c2e [int __stdcall CivMain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int) + 0x3be]
                      0x00461233 [WinMain@16 + 0x83]
                      0x00b88e13 [WinMainCRTStartup + 0x1b3]
                      0x7c816d4f [\177zlib1_NULL_THUNK_DATA + 0x7b46649f]
                      '

                      Can anyone help?


                      In the meantime, Fugi I reverted back to Build538 before I did some changes and posted a build in my signature. The good news is that I tested it on your save file and it works. So you can install the files in this 538 build (it includes the ctp2.map to get a proper crash.txt too) and hopefully you can finish your previous games!
                      Last edited by Martin Gühmann; May 23, 2008, 18:26.
                      Formerly known as "E" on Apolyton

                      See me at Civfanatics.com

                      Comment


                      • Good news: your dumps start making sense now, and the non-empty targets assert is irrelevant. When you press continue/ignore at the pop-up when using the debug version, the program will run just fine. You may also remove the Assert from the code.

                        The other one is the real cause. From the first 4 lines, you can deduce that you are once more trying to access an invalid object. This time from ArmyData::Fight. Something that looks suspicious is the AllSneakAttack part. You may be accessing m_array[i] with an invalid i. But you should be able to find this yourself with the debugger.

                        Comment


                        • Thanks Fromafar, I messed with trying to fix my sneak attack code but keep getting problems with the loop (I described it in my source code attempts thread).

                          I'm not sure I'll remove the Assert fro the code, I'll leave that to more experienced hands like yourself (dont want to outcomment the wrong thing).
                          Formerly known as "E" on Apolyton

                          See me at Civfanatics.com

                          Comment


                          • Originally posted by E
                            You might try loadingit with playest 1 but not sure it will work.
                            E how often did I say that we don't number the playtests like this?!

                            Once again for you - and for Fugi as well. Playtest versions are identfied by date so if a playtest was released on December the 9th 2003 than it is playtest from 2003-09-12 and nothing else. By the way the playtest I quoted is the only playtest that you can call Playtest 1. Because that's the only first playtest we ever released and we will never release a second first playtest.

                            These numberings have only to do something with the threads. And to make it clear again a new playtest thread is posted if the old one has reached or has exceeded the limit of 500 posts, like this one that is actually done for 37 posts now.

                            So continue there in PROJECT: Playtest (the 4th Thread).

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

                            Comment

                            Working...
                            X