I found a bug that occurs on 3.1.8 and 3.1.6, but not on 3.1.3.

I found a bug that occurs on 3.1.8 and 3.1.6, but not on 3.1.3. When using the the demo reel code, when I switch to either sinelon or juggle using a mode button, my feather u32u4 crashes/freezes. I found a mention of this issue at the following link, https://github.com/bruhautomation/ESP-MQTT-JSON-Digital-LEDs/issues/13
At the bottom of the post it looked like someone fixed the bug, but I have tried both the 3.1.8 and 3.1.6 releases and it still happens on both. However, if I go back to the 3.1.3 release the issue does not occur. Is there a particular place I should report this bug, or is it still known? Any fix to it? Thanks.

Have you tested this on any other controllers?

Can you post your code (or simplified version that still shows what you’re encountering) to http://gist.github.com and share the link here?

@David_Specht hello
Can you post your the code of your demo reel code on gist or something ? Because I looked at the the post and the reason it was not working was corrected in the version of fastled 3.1.8
Regards

I am using someone else’s code, shown here: https://gist.github.com/atuline/9ea9b277c1e9be341a41

I have not tested with any other microcontrollers yet.

@David_Specht indeed the error is there
You have in both functions
leds[beatsin16(i+7,0,NUM_LEDS)]
Replace NUM_LEDS with NUM_LEDS-1

@Andrew_Tuline FYI.

@David_Specht let me know if it works

Yes it does, I made the change, and everything works great on 3.1.8 now. Any idea what change was made that caused that edit to be necessary?

@David_Specht that is because of the change of the beatsin16 function from 3.1.3 forward.

@David_Specht I think this is when beatsin16 was changed:
https://github.com/FastLED/FastLED/issues/368
(Awhile ago, and Andrew’s example is probably from before that.)

@marmil Thanks! Just checked my version that’s online (since 9 months), and it refers to NUM_LEDS-1. Have just updated that gist as well.

In the meantime, heading out for a week vacation. Oops, looks like one of our stops at Kimberly, BC is now being evacuated because of fire. :frowning: