Changes between Version 2 and Version 3 of Debugging
- Timestamp:
- Sep 13, 2013, 8:20:10 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Debugging
v2 v3 96 96 === Serialization test mode === 97 97 98 The engine has a very useful test mode for debugging serialization errors. Using the `-serializationtest` command line option tells the simulation to do a full test of the simulation state every turn. This will be extremely slow compared to a normal run of the game, but can reveal problems the moment they occur. Note:it will currently always fail with AI players, since they don't serialize properly.98 The engine has a very useful test mode for debugging serialization errors. Using the `-serializationtest` command line option tells the simulation to do a full test of the simulation state ''every turn''. This will be extremely slow compared to a normal run of the game, but can reveal problems the moment they occur. '''Note:''' it will currently always fail with AI players, since they don't serialize properly. 99 99 100 When the serialization test fails, an error window will be shown, but the more useful data is created in the game's log folder (see GameDataPaths) inside `oos_log`. In the following filenames, .a means data from the primary simulation state (e.g. the one used in a typical game), while .b is data from the secondary simulation state - the one being reconstructed every turn to compare with the primary state. When they differ, it's a serialization test failure.100 When the serialization test fails, an error window will be shown, but the more useful data is created in the game's log folder (see GameDataPaths) inside `oos_log`. In the following filenames, '''.a''' means data from the primary simulation state (e.g. the one used in a typical game), while '''.b''' is data from the secondary simulation state (e.g. the one being reconstructed every turn to compare with the primary state). When they differ, it's a serialization test failure. 101 101 102 * `debug.after.a` / `debug.after.b` - A good place to begin, these are the debug output of the serializer (like `oos_dump.txt` for OOS errors) and can be compared with a diff tool.102 * `debug.after.a` / `debug.after.b` - A good place to begin, these are the debug output of the serializer '''after''' the current turn updates and can be compared with a diff tool (like `oos_dump.txt` for OOS errors). 103 103 * `state.after.a` / `state.after.b` - Binary dump of the simulation state '''after''' the current turn update occurs. If an error occurs here, it is probably because some data that affects the simulation state isn't being serialized. 104 104 * `state.before.a` / `state.before.b` - Binary dump of the simulation state '''before''' the current turn update occurs. If an error occurs here, it's probably a bug in the (de)serializer or the way it is (de)serializing the data.