- edited description
Error reading CanErrorFrame
As I am playing around with the parser code I get a bugout everytime I get to read a CanErrorFrame.
...
356563575 ns: CanErrorFrame: channel=3 length=0
ObjectSize=36 doesn't match calculatedObjectSize()=40
End of file.
Keep up the good work.
Comments (8)
-
reporter -
reporter - attached logfile001.blf
File used to produce the error.
Data comes from a logger and blf format was choosen as the format during export.
-
repo owner - changed status to open
-
repo owner Interesting. The test data I got from the original tool chain (binlog, converter, ...) always had 40 bytes. Yours only has 36 bytes. The only difference I see is that in your case length=0. See here (first three are from test samples and last one is yours):
2459565876494606882 ns: CanErrorFrame: headerVersion=1 objectSize=40 objectFlags=0x2 objectVersion=0 channel=4369 length=8738 reserved=0x0 2459565876494606882 ns: CanErrorFrame: headerVersion=1 objectSize=40 objectFlags=0x2 objectVersion=0 channel=4369 length=8738 reserved=0x0 2501000000 ns: CanErrorFrame: headerVersion=1 objectSize=40 objectFlags=0x2 objectVersion=0 channel=1 length=6 reserved=0x55c178 356563575 ns: CanErrorFrame: headerVersion=1 objectSize=36 objectFlags=0x2 objectVersion=0 channel=3 length=0
So either
- I ignore the 4 bytes reserved field, if objectSize=36, or
- it has something to do with length=0 and that the reserved field is then missing.
I'll go with the first solution, for now.
-
repo owner Ignoring the 4 bytes is not that easy, because the calculation of objectSize is not possible then. I've implemented the length=0 check instead. It successfully parses my test samples and your provided BLF file. The patch is on master and v2.1 branches.
-
repo owner - changed status to closed
Fix published in v2.1.5.
-
reporter Hello,
Thanks a lot for the fix.
I do suspect that there is an issue with the converter that I was using. I did look at the standard and your code and they match. Then I could not understand why this failed.
I tried a few ugly fixes myself however I did not find the correct place to fix.
I am currently building with msys2 on win10 and it works fine. A few issues with finding dlls and stuff.
Thanks again. now I can continue to tinker with this.
Best Regards Petter
-
repo owner -
assigned issue to
-
assigned issue to
- Log in to comment