Ticket #430 (new task)

Opened 3 years ago

Last modified 8 weeks ago

Create binary serializer debugging code

Reported by: Philip Owned by: Philip
Priority: Nice to Have Milestone: Backlog
Component: UI & Simulation Keywords:
Cc:

Description

There's currently DebugSerializer for producing human-readable output, but it's quite different to the normal serialization done by BinarySerializer. When there are bugs with the binary serialization/deserialization code, it would be helpful to have an 'annotated' version of the binary output - perhaps just implement Put so it prints the name string and a hex dump of the bytes, and then add markers for the start of each component, so it's easier to follow. (That would also help with offline analysis of the dumps to check for space efficiency and optimisation opportunities.)

It might also be nice to have a mode where the serializer stores extra data (names, types) that are verified by the deserializer, to detect bugs where it's trying to read back data in the wrong format.

Change History

comment:1 Changed 3 years ago by anonymous

  • Milestone Unclassified deleted

Milestone Unclassified deleted

comment:2 Changed 3 years ago by wacko

  • Milestone set to Backlog

comment:3 Changed 8 weeks ago by historic_bruno

This more or less already exists (see DEBUG_SERIALIZER_ANNOTATE in StdSerializer.h), though it's not very friendly and it breaks network message serialization and probably the tests. Once finished, we could enable it with the command line.

Note: See TracTickets for help on using tickets.