meduzapat / LEDSpicer

LEDSpicer a LED Animator and Controller for Linux
GNU General Public License v3.0
33 stars 13 forks source link

Serpentine animation fails when the number of LEDs is prime #38

Closed n-i-x closed 8 months ago

n-i-x commented 8 months ago
Reading /userdata/system/configs/ledspicer/animations/serpentine.xml
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 17) >= this->size() (which is 17)
LEDSpicer terminated by signal
Aborted
meduzapat commented 8 months ago

I just send a fix, I have been doing house cleaning this weekend (raining all whole weekend 😞) Is on development branch, if you can check 😄

meduzapat commented 8 months ago

After the last changes to serpentine, I did test all possible combinations of settings with 19 elements and no crash. so we can assume the issue is fixed

ledspicerd -f
Set interval to 33ms
Setting FPS to 30
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/basicColors.xml
Loading library /home/meduza/workspaces/C++/LEDSpicer/deleteMe/lib/ledspicer/devices/Adalight.so
Processing Adalight Serial at <unknown port>
Adalight Serial at <unknown port> with 60 LEDs divided into 19 elements
Pin 58 is not set for Adalight Serial at <unknown port>
Pin 59 is not set for Adalight Serial at <unknown port>
Pin 60 is not set for Adalight Serial at <unknown port>
Initializing Device Adalight Serial at <unknown port>
Port is not defined attempting detection...
Port found at ttyACM0
Opening connection to /dev/ttyACM0
Dropping privileges to user id 10000 and group id 10100
No privileges detected
Listening on 127.0.0.1 port 16161
LEDSpicer Running
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/profiles/default.xml
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/animations/test/serpentine/serpentineBackwardNoTail.xml
Loading library /home/meduza/workspaces/C++/LEDSpicer/deleteMe/lib/ledspicer/actors/Serpentine.so
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/animations/test/serpentine/serpentineBBNoTail.xml
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/animations/test/serpentine/serpentineFBNoTail.xml
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/animations/test/serpentine/serpentineForwardNoTail.xml
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/animations/test/serpentine/serpentineBackwardTail.xml
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/animations/test/serpentine/serpentineBBTail.xml
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/animations/test/serpentine/serpentineFBTail.xml
Reading /home/meduza/workspaces/C++/LEDSpicer/deleteMe/share/ledspicer/animations/test/serpentine/serpentineForwardTail.xml