Announcement

Collapse
No announcement yet.

Med Mod 2 Multiplayer Crash

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

  • J Bytheway
    replied
    It must be one of the (BeginTurn) triggers which directly causes the crash, right?

    Leave a comment:


  • Spanscape
    replied
    And again, just tried commenting these two guys:

    HandleEvent(ContactMade) 'DIP_FlagContactMade' pre
    HandleEvent(EstablishEmbassy) 'DIP_FlagEmbassyMade' pre

    with everything else left in... crashed.

    Leave a comment:


  • Dale
    replied
    Well, you can elliminate:

    HandleEvent(BeginTurn) 'WDT_BeginGame' pre

    After the first turn, this is disabled anyways.

    Also, I don't think it's going to be:

    HandleEvent(InitDiplomaticState) 'DIP_InitDiploState' pre
    HandleEvent(NextDiplomaticState) 'DIP_NextDiploState' pre

    These two functions will only ever trigger if you're an AI.

    Which leaves the embassy functions. I had a hellova time getting that running. Wouldn't surprise if there was still a bug in it. *sigh*

    Leave a comment:


  • Spanscape
    replied
    Originally posted by J Bytheway
    Try it with none of the embassy code and all of the other code and vice versa.
    Ok left all the WDT code in and removed all the embassy stuff:

    HandleEvent(BeginTurn) 'DIP_EmbassyCheck' pre
    HandleEvent(BeginTurn) 'DIP_MainRoutine' post
    HandleEvent(BeginTurn) 'DIP_EstabEmb' pre
    HandleEvent(InitDiplomaticState) 'DIP_InitDiploState' pre
    HandleEvent(NextDiplomaticState) 'DIP_NextDiploState' pre
    void_f DIP_EstablishEmbassyFunc(int_t recipient)
    HandleEvent(ContactMade) 'DIP_FlagContactMade' pre
    HandleEvent(EstablishEmbassy) 'DIP_FlagEmbassyMade' pre

    With those 8 guys gone, no crashing.

    Leave a comment:


  • Peter Triggs
    replied
    What's really surprising is that you're not getting ANY error messages.

    Leave a comment:


  • J Bytheway
    replied
    Try it with none of the embassy code and all of the other code and vice versa.

    Leave a comment:


  • Spanscape
    replied
    Ok, in addition to these 4 (which removing by themselves do not cause the crash):

    HandleEvent(BeginTurn) 'DIP_EmbassyCheck' pre
    HandleEvent(BeginTurn) 'DIP_MainRoutine' post
    HandleEvent(BeginTurn) 'DIP_EstabEmb' pre
    HandleEvent(BeginTurn) 'WDT_MainRoutine' pre

    I took these 5 additional triggers and 2 functions out:

    HandleEvent(InitDiplomaticState) 'DIP_InitDiploState' pre
    HandleEvent(NextDiplomaticState) 'DIP_NextDiploState' pre
    void_f DIP_EstablishEmbassyFunc(int_t recipient)
    HandleEvent(ContactMade) 'DIP_FlagContactMade' pre
    HandleEvent(EstablishEmbassy) 'DIP_FlagEmbassyMade' pre
    HandleEvent(BeginTurn) 'WDT_BeginGame' pre
    int_f WDT_GetDistanceNearestCity(location_t theLoc, int_t thePlayer)


    And... *bling* no more crashing...

    Leave a comment:


  • Immortal Wombat
    replied
    Originally posted by Peter Triggs
    It gives you more and better error messages.
    Yeah, usually "array index 0 out of bounds" which is annoying, because there's not always an obvious array, and its almost certainly not out of bounds

    I don't understand that one...

    Leave a comment:


  • Spanscape
    replied
    Originally posted by Dale
    BTW, does the crash occur IMMEDIATELY when you hit end turn, or does it crash where normally the destroyed civ would take it's turn? IE: Hit end turn - CRASH! or Hit end turn - player 2 goes, player 3 goes, player 4 (destroyed) CRASH!

    My most recent tests have been running 'Cradle 1.3 Beta' which points to Diplomod 3.5.

    Just ran a test where I commented out the following 4 triggers:

    HandleEvent(BeginTurn) 'DIP_EmbassyCheck' pre
    HandleEvent(BeginTurn) 'DIP_MainRoutine' post
    HandleEvent(BeginTurn) 'DIP_EstabEmb' pre
    HandleEvent(BeginTurn) 'WDT_MainRoutine' pre

    Still crashes with these 4 out of CRA_diplomod.slc. Double-checked and removing CRA_diplomod.slc from CRAG_script.slc means no crashing.

    At first I thought the game crashed when it reached the dead AI civ in the turn cycle. But then I realized that the other human player was at index 2 (after myself as the host and index 1 conquered the civ) never got their turn, with the AI civs being index 3-8. So its at the beginning of a human turn when the host crashes.

    BTW, whats the difference between g.player and player[0] in a trigger?

    Leave a comment:


  • Spanscape
    replied
    Edit: deleted duplicate post

    Leave a comment:


  • Dale
    replied
    Just as a clarification:

    There absolutely no difference between Cradle Diplo 3.6, Med Mod Diplo 3.6 and Apolyton Diplo 3.6, EXCEPT in concern to diplomats establishing embassies:

    - The actual unit used to establish embassies is different in the MODS.
    - The advance which enables the above diplomat units is different in the MODS.

    They're the only two differences between all the Diplo 3.6 versions.

    BTW, if you change to the Diplo 3.6 script, you MUST use the diplomacy.txt that comes with Diplo 3.6. One major change between Diplo 3.6 and Diplo 3.6 was I added the "normal" and "make friends" diplomatic personalities. If you don't, then Diplo 3.6 SLIC with diplomacy.txt 3.5 WILL crash when it checks AI diplomatic personalities.

    Hope this helps.

    BTW, does the crash occur IMMEDIATELY when you hit end turn, or does it crash where normally the destroyed civ would take it's turn? IE: Hit end turn - CRASH! or Hit end turn - player 2 goes, player 3 goes, player 4 (destroyed) CRASH!

    Leave a comment:


  • Martin Gühmann
    replied
    Originally posted by hexagonian
    There should be a default diplomacy.slc file - offhand I do not know what the name of that file is - but it should be in the default/gamedata folder.
    You know the name it is diplomacy.slc. By the way this file only contains triggers that removed diplomacy from the original game. The AI was stopped from accepting proposals, counter proposals and threats and was stopped from making threats by default. I guess this file shouldn't never be in the game, its probably purpose was showing modmakers how to change the AI behaviour in diplomacy.

    -Martin

    Leave a comment:


  • Spanscape
    replied
    Originally posted by hexagonian
    Try using the default diplomacy files. The files would be

    diplomacy.txt
    diplomacyproposal.txt


    to tie that file into the test setup

    Yup, just tried this - no crashing works fine.


    Peter: Basically whenever I conquer a civ (destroy their last city) in a multiplayer game under Cradle or MM2 (not not Apolyton), something in the Diplomod (3.5 and 3.6) is causing me to immediately crash to the desktop on the host machine as soon as the conquering civ ends its turn (whether it be the host or the joined player). I get no messages, no popups if DebugSlic=Yes, just back to Windows.

    I suppose my next step is to start commenting out triggers in CRA_diplomod.slc and see if I can isolate the problem...

    Leave a comment:


  • hexagonian
    replied
    Try using the default diplomacy files. The files would be

    diplomacy.txt
    diplomacyproposal.txt

    There should be a default diplomacy.slc file - offhand I do not know what the name of that file is - but it should be in the default/gamedata folder.

    And there will be a file in the english/gamedata folder that is part of the default diplomacy setup - offhand I do not know what the name of that file is either. You will have to make a change in the

    (CRA_)Strings.txt

    to tie that file into the test setup

    Leave a comment:


  • Peter Triggs
    replied
    What exactly does DebugSlic do?
    It gives you more and better error messages. With DebugSlic =No, the game can run even though it contains some errors.

    Spanscape, what are you getting when these crashes are happening?

    I downloaded one of your savegames a couple of days ago, but I couldn't put it into multiplayer and get it working.

    Leave a comment:

Working...
X