GobySoft / dccl

Dynamic Compact Control Language
Other
17 stars 13 forks source link

Message failed to decode. Reason: Cannot relinquish_bits - no more bits to give up! Check that all field codecs are always producing (encode) and consuming (decode) the exact same number of bits #120

Closed patel999jay closed 10 months ago

patel999jay commented 1 year ago

When will we have this exception ?

dccl.DcclException: Message <Hex_String> failed to decode. Reason: Cannot relinquish_bits - no more bits to give up! Check that all field codecs are always producing (encode) and consuming (decode) the exact same number of bits

This is the string coming from the WHOI modem, encoding and decoding works fine for few minutes and we had this error time to time, what does this mean ? Does this imply that this frame has a BAD Frame or BAD CRC ? How do we handle this in real time ?

Thanks.

tsaubergine commented 1 year ago

This exception could happen any time the bytes to be decoded by DCCL (on the receiver) do not match the bytes encoded (by the sender). Likely somewhere in here you've got a single-bit error or even missing a byte off the end, or something like that. The WHOI Micro-Modem has a CRC check so it's highly unlikely you'll get a bad packet from the modem (I have seen it happen once or twice ever) so if it's happening after a few minutes you've got some other problem in your software. I would carefully compare the output bytes to the input bytes and see what might be going on.

psmskelton commented 1 year ago

@ltoohey has seen a similar error message recently. We suspected it was largely isolated to an arm32 problem as it has not been observed on our arm64 or amd64 platforms which use identical modems and similar software stacks. Will reassess once that platform is upgraded to arm64.

From memory, if I passed the offending hex string through my system, it decoded fine. But may be misremembering field trials. Will assess and update when more information is available.

tsaubergine commented 1 year ago

@patel999jay Can you provide the architecture & distribution of your system and DCCL version?

patel999jay commented 1 year ago

@tsaubergine please find this, this is my machine where i do the decoding; the encoding at the other side is happened at the uuv vehicle, i don't them right now, but will assess and update when more information is available :

# Decoding side: 
jay@jay-Inspiron 
---------------- 
OS: Ubuntu 20.04.6 LTS x86_64 
Host: Inspiron 7570 
Kernel: 5.15.0-78-generic 
Uptime: 58 mins 
Packages: 2946 (dpkg), 16 (snap) 
Shell: bash 5.0.17 
Resolution: 1920x1080 
DE: GNOME 
WM: Mutter 
WM Theme: Adwaita 
Theme: Yaru [GTK2/3] 
Icons: Yaru [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i5-8250U (8) @ 3.400GHz 
GPU: NVIDIA GeForce 940MX 
GPU: Intel UHD Graphics 620 
Memory: 2702MiB / 15728MiB 

#Encoding side:
ODROID-XU4, ARM device, which used architecture for 32-bit computing(arm32).
dccl version : 4.1.0
tsaubergine commented 10 months ago

Closing due to lack of information to determine if there's a bug. Please reopen or open new issue if the issue persists.