-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
response for TraCI context subscription contains invalid command length #10108
Comments
It does not affect the python client which simply ignores the length of the return string but it is definitely a bug. Thanks for tracking this one down! |
Just for the record: None of our clients checks the length of the (inner) return message and consequently none of our clients will be able to handle multiple messages in one batch although the TraCI protocol allows it. |
Something still seems to be wrong: I now get an invalid response when sending a normal vehicle subscription ( Receiving a response with a length of 156 bytes: with I proposed a solution in 78d59dd#r66731320 |
You are right. But I think it may be better to revert to always sending the extended length. This way all clients relying on the old behavior (e.g. Traas) will still work. What do you think? |
Sure, I see no problem there. |
When adding a context subscription via TraCI for a vehicle (
0x84
) to retrieve surrounding vehicles (0xa4
) , the response message contains an invalid command length.Command:
00 00 00 2a 26 84 40 1c 00 00 00 00 00 00 40 8f 40 00 00 00 00 00 00 00 00 05 76 65 68 5f 31 a4 40 69 00 00 00 00 00 00 01 40
Response
00 00 00 20 07 84 00 00 00 00 00 00 00 00 00 14 94 00 00 00 05 76 65 68 5f 31 a4 01 00 00 00 00
Expected Response:
00 00 00 19 07 84 00 00 00 00 00 11 94 00 00 00 05 76 65 68 5f 31 a4 01 00 00 00 00
Detailed description found in the following images. The command length in the actual response (2nd picture) starts with a byte value of
0
, implying an extendedlength
field. the subsequent integer then contains a value of20
. However, the actual length of the whole command, including thelength
field of 5 bytes, is 21 bytes long in total. Therefore, I would expect that21
would be the actual content of thelength
field.The expected response would use the normal length field using one byte only, as the command length is shorter than 255 bytes:
SUMO-version: 1.12.0
operating system: Windows 10
The text was updated successfully, but these errors were encountered: