OOS logging

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.
 

Attachments

  • Player 0 - OOSLog - Turn 76.txt
    283.8 KB · Views: 85
  • Player 1 - OOSLog - Turn 76.txt
    283.8 KB · Views: 92
  • CvEventManager.zip
    11.5 KB · Views: 160
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", 100, 100, 100, 100, WidgetTypes.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.
 
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.
 
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.
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.
 
Top Bottom