mcap icon indicating copy to clipboard operation
mcap copied to clipboard

`mcap doctor` reports no errors for corrupt mcap file

Open defunctzombie opened this issue 1 year ago • 1 comments

Description

NOTE: I believe this file is corrupt based on not being able to open it in studio with a bad magic error. I looked at the file in a hex viewer and the start of the file is ok - it is somewhere later in reading the file that Studio fails (possibly when it thinks there should be a footer record).

The file is our converted nuscenes.bag -> mcap located here: https://drive.google.com/drive/folders/10TFUJgvhOPqpSQ-q8tSbQum1CX33aO3L

When I run mcap doctor on this file there are no errors. But opening in Studio shows this error:

image

Studio uses the typescript reader so I imagine the result would be similar outside of studio for direct users of the typescript reader.

defunctzombie avatar Aug 17 '22 18:08 defunctzombie

Note that the "bad magic" that studio complains about is located near the end of the file. And it seems like the file does not end with the expected trailing magic.

image

jtbandes avatar Aug 17 '22 19:08 jtbandes

@jtbandes that byte string also occurs in many other places in the file (at least that is what I saw in my hex viewer).

defunctzombie avatar Aug 17 '22 19:08 defunctzombie

Oh yeah, you're right it does. I was just looking near the end because I wanted to see the trailing magic.

jtbandes avatar Aug 17 '22 21:08 jtbandes