-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Mouse System.ArgumentOutOfRangeException: Index was out of range. #3195
Comments
@fejdraus hello, can you post full exception text here ? And try this build |
Full stack trace: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') This issue also reproduces on version 0.194.0. |
@fejdraus ok, then changes i did the linked build should fix this. Does it work fine for you ? |
@seerge I believe the changes you've made should resolve the issue. However, I haven't had the chance to test it yet. Ideally, it would be great if the default mode was applied when a specific mode is unavailable, as switching modes currently might result in an empty window. |
@fejdraus i'm not sure if this is a good idea, but try this build then |
I have run your changes on my system, and everything works perfectly. Thank you. |
Rules
What's wrong?
When switching the lighting mode for the mouse from "All" with "Battery State" selected to another mode (where "Battery Status" is not available), I get an error about accessing a non-existent index in the list at line LightingSetting? ls = mouse.LightingSettingForZone(visibleZone); in g-helper/app/AsusMouseSettings.cs.
I think the issue can be resolved by adding something like:
var selectedMode = 0;
if (index >= 0 && index < lightingModes.Count)
{
selectedMode = lightingModes[index];
}
How to reproduce the bug?
Open the mouse settings, select the "All" lighting mode, choose the "Battery State" type, then switch the mode to "Logo"
Logs
log.txt
Device and Model
Asus Rog Gladius III Willess, Asus Rog Strix G15
Additional information.
No response
Armoury Crate
Uninstalled
Asus Services
Peripherals
Version
0.191.0
OS
Windows 11 23H2
The text was updated successfully, but these errors were encountered: