1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

OOS logging

Discussion in 'Civ4Col - We The People' started by Andera412, Jan 5, 2019.

  1. Andera412

    Andera412 Chieftain

    Joined:
    Sep 30, 2014
    Messages:
    55
    Location:
    Ukraine
    I modifyed CvEventManager.py using Gerikle's OOSLogger so it writes log when the OOS occurs. I need your help in writing more full log with larger number of functions. Log comparation doesn't show any differences now.
     

    Attached Files:

  2. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    I wrote a desync log in WTC and it was added in 2.7.1. In CvMainInterface.py line 838:
    PHP:
           # desync log writing button
           # TODO figure out how to make it appear as needed instead of always or never
           
    if (0):
               
    screen.setImageButton("DesyncButton""pink"100100100100WidgetTypes.WIDGET_NETWORK_DESYNC, -1, -1)
    Change this to if (1): and it will show a button in the top left corner. Yes it's ugly and pink, but it's there. Clicking it will send a network message to make all players write a log at the same time. The actual log writing is done in the DLL and it can write data, which isn't exposed to python. Yes it's not complete yet and it would be nice to make the user interface for it more clean, but it is working as it is and has uncovered an otherwise near impossible cause of OOS, which has been fixed in 2.7.1.

    Rather than logs, it would actually be more useful to have a savegame, which desyncs when you click end turn. That will allow debugging and testing the effect of fixes.
     
  3. Andera412

    Andera412 Chieftain

    Joined:
    Sep 30, 2014
    Messages:
    55
    Location:
    Ukraine
    I know) Maybe I have a wrong source, but writeDesyncLog function in CvGame is not exported into python so is never called from the button.
     
  4. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    I just checked the DLL. The widget is of type WidgetTypes.WIDGET_NETWORK_DESYNC and the DLL will handle any click on that widget type as a click on that button, which makes it transmit the network message. Maybe the problem you have is that it doesn't actually confirm that the button was clicked ingame. It just writes the log file without reporting back in the game GUI. This is mainly because the feature is not completely done yet.

    If you click, it should make a txt file at the root of the mod directory. If you have multiple instances of the game running on the same computer, it will create a txt file for each. The player number is in the filename to prevent overwriting. It did work the last time I used it.
     

Share This Page