Announcement

Collapse
No announcement yet.

DEBUG: Start up crash over 11 Civs

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

  • DEBUG: Start up crash over 11 Civs

    Fugi Crash

    I set my number of players to 12 (in the game) 14 max players and my player color to 2 and got your crash before the game starts. Messing with it and I saw that 11 and below there is no crash but 12 and higher.

    Code:
      0x005177fa  [?GetTransType@UnitRecord@@QBE_NAAJ@Z + 0xa]
      0x00517463  [?Create@UnitPool@@QAE?AVUnit@@JJABVMapPoint@@V2@PAVUnitActor@@@Z + 0x60]
      0x004ddabc  [?CreateUnit@Player@@QAE?AVUnit@@JABVMapPoint@@V2@HW4CAUSE_NEW_ARMY@@@Z + 0x332]
      0x0052944f  [?gameinit_PlaceInitalUnits@@YAJJQAVMapPoint@@@Z + 0x23c]
      0x0052f496  [?gameinit_Initialize@@YAJJJAAVCivArchive@@@Z + 0x2e7b]
      0x0040d71a  [?InitializeGame@CivApp@@QAEJAAVCivArchive@@@Z + 0x196]
      0x0040f18c  [?StartGame@CivApp@@QAEJXZ + 0x11]
      0x0040ffcf  [?Execute@StartGameAction@@UAEXPAVaui_Control@@KK@Z + 0x12]
      0x006e73a1  [?HandleActions@aui_UI@@QAEXXZ + 0x5f]
      0x006e732c  [?Process@aui_UI@@UAE?AW4AUI_ERRCODE@@XZ + 0x47]
      0x0040ecca  [?ProcessUI@CivApp@@QAEJKAAK@Z + 0x1fd]
      0x0040f01a  [?Process@CivApp@@QAEJXZ + 0xa7]
      0x00407e01  [?CivMain@@YGHPAUHINSTANCE__@@0PADH@Z + 0x3b6]
      0x00407878  [WinMain@16 + 0x74]
      0x008bb8dc  [WinMainCRTStartup + 0x134]
      0x7c816d4f  [__onexitbegin + 0x7bc5b917]
    Fugi says he didn't see it since 577. I think it might be a change to unitpool.cpp according to the crash but not sure why that affects player numbers. This crash was identified in 597 and still exists in 599.
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

  • #2
    I think it is a problem with incorrect initalization of g_player. Maybe I should move its initialization to the start. Or I should figure out how I set it its values to zero.

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

    Comment


    • #3
      Thanks Martin,

      Thats in player.cpp right? I'd like to check it out for my own learning.
      Formerly known as "E" on Apolyton

      See me at Civfanatics.com

      Comment


      • #4
        Originally posted by E
        Thats in player.cpp right? I'd like to check it out for my own learning.
        Not really, the initialzation of g_player is somewhere else. To solve the problem partly there is an additional NULL check of g_player somewhere necessary. But to make the government modified stuff really work g_player needs to be initialized.

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

        Comment

        Working...
        X