getsize_cdr size mismatch to serialize_cdr
Your Environment
Thank you for taking the time to report an issue.
To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.
-
Your operating system:Ubuntu 20.04.6 LTS
-
Version of python you are running (
python --version
): Python 3.10.6 -
How did you install rosbags? Did you use pip to install from PyPI or a repository checkout or something else? pip install
-
Version of rosbags you have installed (
pip show rosbags | grep Version
): 0.9.15
If you're having issues with (de)serialization of custom message types please include a copy of the following:
- Message definition files (msg or idl)
- The bytes of an example message
The Issue
Please describe the issue that you are experiencing.
I notice that with messages having Valtype.SEQUENCE
where the length is not a multiple of 4, the rawdata buffer is not of adequate size. I believe this is because line 126 of cdr.py is indented whereas in serialize_cdr the corresponding line is not indented, which results in a mismatch of the computed sizes. Unfortunately I cannot share the message definition or examples here as it is proprietary.
Steps to Reproduce
If the issue is predictable and consistently reproducible, please list the steps here.