-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Devices with LinearCmd features before ScalarCmd will trigger index out of bounds errors #668
Labels
Comments
blackspherefollower
added a commit
to blackspherefollower/buttplug-rs
that referenced
this issue
Nov 8, 2024
Do you think this is also #656 ? I'll dupe that against this if so, since this has more detail |
Yes, I suspect it is. Sorry, I should really have searched the issues for the error. |
Nah you're fine, I didn't really know what the error was so it was kinda hard to discern. Since this one has details and a fix I'll just dupe the other. |
blackspherefollower
added a commit
to blackspherefollower/buttplug-rs
that referenced
this issue
Nov 17, 2024
blackspherefollower
added a commit
to blackspherefollower/buttplug-rs
that referenced
this issue
Nov 17, 2024
This does not apply to RotateCmd because there isn't a v3->v4 feature index converter yet. Fixes buttplugio#668
blackspherefollower
added a commit
to blackspherefollower/buttplug-rs
that referenced
this issue
Nov 17, 2024
This does not apply to RotateCmd because there isn't a v3->v4 feature index converter yet. Fixes buttplugio#668
blackspherefollower
added a commit
to blackspherefollower/buttplug-rs
that referenced
this issue
Nov 17, 2024
This does not apply to RotateCmd because there isn't a v3->v4 feature index converter yet. Fixes buttplugio#668
qdot
pushed a commit
that referenced
this issue
Nov 20, 2024
This does not apply to RotateCmd because there isn't a v3->v4 feature index converter yet. Fixes #668
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a device is defined to have a LinearCmd feature followed by a ScalarCmd features, sending a ScalarCmd will trigger an index out of bounds error at src\server\device\protocol\actuator_command_manager.rs:231
This was captured in https://nonpolynomial.sentry.io/issues/4643392620/events/fb027d99efc041d9bb8c33b30cca4c19/?project=4505694319476736
It appears the v4 global feature indexing was not accounted for in the actuator_command_manager.rs state manager logic: if a non-ScalarCmd feature precedes a ScalarCmd (or a RotateCmd), the feature index will not match the ScalarCmd states index.
E.g.
feature 0, LinearCmd (not stateful)
feature 1, ScalarCmd -> state array has a size of 1, but the feature index is used to store it's state: state[1] results in the out of bounds error.
The text was updated successfully, but these errors were encountered: