AOS was not writing timestamp data header
AOS wasn't writing out the header to the timestamp data log part. Which
means the log part is corrupted and can't be read. Let's fix the bug
that's causing that, and put some checks in so if a log doesn't have a
header if throws a more helpful error than a segfault.
This was only happening when trying to relog a logfile with a
pre-existing config.
Change-Id: I373821f4cfbead90daddd820d3c61693e8886eda
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/events/logging/logfile_utils.cc b/aos/events/logging/logfile_utils.cc
index 4c19867..20e38d2 100644
--- a/aos/events/logging/logfile_utils.cc
+++ b/aos/events/logging/logfile_utils.cc
@@ -486,6 +486,8 @@
raw_log_file_header_ = std::move(*raw_log_file_header);
+ CHECK(raw_log_file_header_.Verify()) << "Log file header is corrupted";
+
max_out_of_order_duration_ =
FLAGS_max_out_of_order > 0
? chrono::duration_cast<chrono::nanoseconds>(