Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#3339 closed enhancement (fixed)

[PATCH] Command line option for pid+timestamp in OOS-log filename

Reported by: elexis Owned by: Imarok
Priority: Nice to Have Milestone: Alpha 23
Component: Core engine Keywords: patch
Cc: Patch:

Description (last modified by Imarok)

If you try to reproduce an out-of-sync error, host a game with one instance, join as a client with the second instance of 0ad and actually manage to produce an out of sync error, then both instances of 0ad will write the ooslog to the same file. Thus one file will be overwritten and you can't diff the files.

attachment:t3255_use_timestamp_and_pid_for_oosdump_filename.patch:ticket:3255 contains a patch that adds the current unix timestamp and process id to the filename and thereby prevents the file from being overwritten.

However since oos dumps are very big (dozens of megabytes) multiple files should only be created if the application was started with a specific command line argument.

Attachments (3)

t3339_command_line_option_ooslog_unique_v1.patch (2.8 KB ) - added by elexis 9 years ago.
Adds the command line switch, updates readme.txt. Add true || to the cit->second != expected check in line 647 of NetTurnManager to trigger an out of sync error, even as the only client on a server.
t3339_command_line_option_ooslog_unique_v1.1.patch (3.1 KB ) - added by elexis 9 years ago.
Changed the name of the option to "oosdump-unique", some beautifying.
t3339_command_line_option_ooslog_unique_v1.2.patch (3.1 KB ) - added by elexis 9 years ago.
Uses std::time(NULL) instead of std::time(0).

Download all attachments as: .zip

Change History (8)

by elexis, 9 years ago

Adds the command line switch, updates readme.txt. Add true || to the cit->second != expected check in line 647 of NetTurnManager to trigger an out of sync error, even as the only client on a server.

comment:1 by elexis, 9 years ago

Description: modified (diff)
Keywords: review added
Milestone: BacklogAlpha 19
Summary: Command line option for pid+timestamp in OOS-log filename[PATCH] Command line option for pid+timestamp in OOS-log filename

by elexis, 9 years ago

Changed the name of the option to "oosdump-unique", some beautifying.

by elexis, 9 years ago

Uses std::time(NULL) instead of std::time(0).

comment:2 by elexis, 9 years ago

Milestone: Alpha 19Alpha 20

comment:3 by elexis, 8 years ago

Keywords: review removed
Milestone: Alpha 20
Resolution: wontfix
Status: newclosed

Linked the patch to wiki:Debugging.

Would be nice to have it (and attachment:serializationChange.patch:ticket:3292) committed to ease debugging. But on the other hand it will only be used by developers. Hence we probably shouldn't have it in the readme.txt / code.

comment:4 by Imarok, 7 years ago

Owner: set to Imarok
Resolution: wontfixfixed

In 20141:

Command line option for pid+timestamp in OOS dump, mainlog and interestinglog

Reviewed by: elexis Fixes #3339
Differential Revision: https://code.wildfiregames.com/D51

comment:5 by Imarok, 7 years ago

Description: modified (diff)
Milestone: Alpha 23
Note: See TracTickets for help on using tickets.