Repository navigation
Description
Board / MCU
Teensy 4.x
LED Chipset
WS2812B / NeoPixel
FastLED Version
3.10.4
Arduino / PlatformIO version
arduino ide 2.3.19
Operating System
Windows
Description
as per claude: ### Summary
On Teensy 4.x, any sketch with two or more clockless strips of the same chipset (e.g. WS2812) crashes with a null-pointer Data Access Violation inside the ObjectFLED grouped driver on the very first FastLED.show(). A single strip works fine. This makes multi-strip parallel output — the headline feature of ObjectFLED — unusable in 3.10.4 on Teensy 4.x.
Environment
- FastLED version: 3.10.4 (
FASTLED_VERSION 3010004) - Board: Teensy 4.0 (IMXRT1062),
FL_IS_TEENSY_4X - Teensyduino: 15.2.1 toolchain (arm-none-eabi gcc)
- Chipset: WS2812B,
RGBorder - ObjectFLED is the unconditional default
ClocklessControllerfor clockless chipsets on Teensy 4.x (platforms/arm/teensy/teensy4_common/clockless.h), so this affects everyone, not just explicit ObjectFLED users.
Expected behavior
Two or more strips initialize and display in parallel.
Actual behavior
The Teensy enters a reboot loop. CrashReport shows:
CrashReport:
A problem occurred at (system time) 21:33:38
Code was executing from address 0x713C
CFSR: 82
(DACCVIOL) Data Access Violation
(MMARVALID) Accessed Address: 0x0 (nullptr)
Check code at 0x713C - very likely a bug!
Startup CPU clock speed is 600MHz
addr2line on the build .elf resolves 0x713C to:
fl::ObjectFLEDGroupBase::addStrip(unsigned char, fl::PixelIterator&)
src/platforms/arm/teensy/teensy4_common/clockless_objectfled.cpp.hpp:144
which is strip_bytes[0] = r; — a write through a span whose .data() is nullptr.
Minimal reproduction
#include <FastLED.h>
#define NUM_LEDS 8
CRGB a[NUM_LEDS];
CRGB b[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, 2, RGB>(a, NUM_LEDS);
FastLED.addLeds<WS2812B, 3, RGB>(b, NUM_LEDS); // 2nd strip triggers it
}
void loop() {
fill_solid(a, NUM_LEDS, CRGB::Red);
fill_solid(b, NUM_LEDS, CRGB::Green);
FastLED.show(); // crashes here on the 2nd strip
}
One strip = works. Two strips = nullptr crash. (Originally hit with an 18-strip setup; it faults on the second strip's first pixel.)
Root cause
FastLED.show() runs in three passes over the controller list (FastLED.cpp.hpp): beginShowLeds() on all controllers, then showPixels() on each, then endShowLeds() on each.
All N beginShowLeds() calls hit the shared group's onQueuingStart(). The first sets RectangularDrawBuffer state to QUEUEING; the rest are no-ops because of the if (mQueueState == QUEUEING) return false; guard. State stays QUEUEING.
Then per strip, showPixels() → ObjectFLEDGroupBase::addStrip() does queue(item) then mRectDrawBuffer.onQueuingDone() then writes pixels into getLedsBufferBytesForPin(pin).
onQueuingDone() has if (mQueueState == QUEUE_DONE) return false;. Strip 1 sets state to QUEUE_DONE and builds the pin→segment map for pin 1. Strip 2's onQueuingDone() returns early — so pin 2 is never added to mPinToLedSegment.
getLedsBufferBytesForPin(pin2) misses (FASTLED_ASSERT(false, "Pin not found..."), compiled out in release) and returns an empty fl::span<u8>() with data() == nullptr. Then strip_bytes[0] = r; writes to 0x0.
So addStrip() calls onQueuingDone() once per strip, but onQueuingDone() is designed to finalize only once — every strip after the first gets a null buffer segment.
Relevant files:
src/platforms/arm/teensy/teensy4_common/clockless_objectfled.cpp.hpp (addStrip, line ~144)
src/fl/gfx/rectangular_draw_buffer.cpp.hpp (onQueuingDone guard, getLedsBufferBytesForPin returning empty span on miss)
Note that a naive fix (just letting onQueuingDone() re-run per strip) is complicated by the buffer being reallocated as it grows, since earlier strips' pixel data has already been written into the old allocation.
Workaround
Downgrade to a pre-ObjectFLED-default FastLED (3.6.0 works — classic bit-banged Teensy 4 driver). There is no sketch-level macro in 3.10.4 to opt out of ObjectFLED.
### Steps to reproduce
see above
### Minimal sketch
```shell
#include <FastLED.h>
#define NUM_LEDS 8
CRGB a[NUM_LEDS];
CRGB b[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, 2, RGB>(a, NUM_LEDS);
FastLED.addLeds<WS2812B, 3, RGB>(b, NUM_LEDS); // 2nd strip triggers it
}
void loop() {
fill_solid(a, NUM_LEDS, CRGB::Red);
fill_solid(b, NUM_LEDS, CRGB::Green);
FastLED.show(); // crashes here on the 2nd strip
}Serial / debug output
Checklist
- I have searched existing issues for duplicates
- I have tested with the latest FastLED release or git master
- I can reproduce this with a minimal sketch
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Jun 23, 2026
3.10.4 was released by an ai, 3.10.5 will be the forward yank.