Skip to content

RioLog will stop functioning if it receives the packet header twice in a row #788

@Gold856

Description

@Gold856

While I was testing #786, I would start RioSender, have RioLog connect, wait a while, then restart RioSender, which would indicate the RioLog connected, but no new messages would be displayed. That PR hasn't touched the data handling, so this has just been a latent bug. The console shows a RangeError, with the error being The value of "offset" is out of range. It must be >= 0 and <= 244. Received 4384. Debugging indicated occurs at https://github.com/wpilibsuite/vscode-wpilib/blob/2027/vscode-wpilib/src/riolog/shared/message.ts#L73 and is caused by the errorCode in https://github.com/wpilibsuite/vscode-wpilib/blob/2027/vscode-wpilib/resources/testing/riosender.py#L50 being misinterpreted as a byte length, and adjusting 0x111111 to say, 0x111112 does in fact cause the read byte length to increase by one.

This only happens on reconnect; RioLog will always display the first time, and it only happens if you wait long enough (20 seconds should be overkill). And it consistently reads the errorCode as a byte length (or at least two bytes of it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions