-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_parse_container does not receive proper data to process #763
Comments
It would be interesting to know which obj_type came before the exception. There is a problem with blf files in that different object types are padded differently. One person had issues with FlexRay data in the log. |
It’s also normal that containers do not start with LOBJ. Objects can be split up in two containers since containers usually have a fixed size. |
It is not the data of container actually, it is the data that will transfer to _parse_data. I will check what is the object type comes before this exception then get back to you later. Usually, this tool works perfectly with other blf files, even up to hours, but only there are some files coming from specific PC/Vector Application have this issue. |
Hi, Thanks for your hint! The real root cause seems to be the buffer size required for Struct.unpack_from is bigger than the buffer size that we defined. By the way, the uncompressed when I unpacked the Container is 131072 = exact 128kb. Shall we change this buffer size a little bit bigger to handle this case and how should we change it? (Where should we put the fixed code to not affect other functions) |
I think I know what the problem is. I did some optimizations recently in develop where I skipped checking if the object is split up in the next container and relies on struct raising an error if that’s the case. With CanMessage2 however we only read the first part of it so it could succeed even if the rest of the object is missing. So I think the latest released version should work for you. I’ll fix it in the coming days. |
That would be perfect. By the way, can you explain why don't we need the tail of the CAN2? Doesn't it contain data? Thank you so much. |
The rest of the data is not anything we use in our message class. |
Hello, I've only been using this module (version 3.3.2) for a day, but I'm also facing some BLFParseError with some files due to header issues. I've modified the blf.py to print the header here. In the console output, it seems like the file position is incorrect at the start of the iteration. In the exemple below, I think the position should be one byte earlier as we can clearly see the end of "LOBJ". In another example, the position is "late" and I only see the end of "LOBJ". For info, I'm using genuine BLF files generated by CANanlyzer. Thank you for your help! |
Hi Duracell, |
This makes me slightly more confused. Any example log files would be great! You can email me at christiansandberg at me dot com if you don’t want to share them publicly. |
@duracell013, I just realized a bug fix for CAN-FD messages has not been released yet so you can try develop instead. |
@christiansandberg I've emailed you a sample file. I have tested the develop branch without success (though I'm not 100% sure the module installation from the ZIP file was correct). Thank you for your help! |
I've made a fix that seems to work.
|
@christiansandberg Thank you so much for looking into it so quickly! That seems to work perfectly! |
Sorry for my late feedback. I have tested this on the blf files that I had problems with and it worked without any Parsing issues. The solution seems to work perfectly. Thank you a lot for your support @christiansandberg! |
Hi,
I am trying to use this tool to parse some blf files but there is one of them throwing me the Parsing Error.
I am tried to fix it by updating the source as well as relog it with different CANalyzer Version but it cannot work so I post it here to ask for your support.
Issue Description: The data given to _parse_container does not start with the proper signature (LOBJ), as a consequence, the _parse_data raised the BLFParseError.
Environment:
If you have any idea to figure out the root cause of this, kindly let me know. I will appreciate it so much.
I can share with you the blf for debugging via email in case you need it.
The text was updated successfully, but these errors were encountered: