PepperDash / Essentials

The Essentials Application Framework Libraries
MIT License
133 stars 77 forks source link

[BUG]-Lighting Base loop not incrementing index #974

Closed jkdevito closed 2 years ago

jkdevito commented 2 years ago

Was this bug identified in a specific build version? 1.10.3

Describe the bug Recall of lighting scenes was causing index out of range exception

Stacktrace

Error in Eisc_SigChange handler: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <2ad40006e9c141b299c9c7c533021a74>:0   at PepperDash.Essentials.Core.Lighting.LightingBase+<>c__DisplayClass6.<LinkLightingToApi>b__4 () [0x00011] in <26c7966683f7427b95fa15d50310d8bb>:0   at PepperDash.Essentials.Core.SigAndTriListExtensions+<>c__DisplayClass1.<SetSigTrueAction>b__0 (System.Boolean b) [0x00003] in <26c7966683f7427b95fa15d50310d8bb>:0   at PepperDash.Essentials.Core.Bridges.EiscApiAdvanced.Eisc_SigChange (System.Object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) [0x0009a] in <26c7966683f7427b95fa15d50310d8bb>:0