I have a WDT reset issue that seems to be caused by combining the FastLED and WiFiManager libraries. The code I'm attaching is part of a larger project from which I have removed various modules to isolate the error. I understood that the code works correctly until I add the FastLED library (via PlatformIO). Even though the FastLED library is not explicitly included in the code and not used, it causes the error I report below.
EDIT: The hardware I'm using is a Wemos D1 mini (ESP8266).
This is very interesting - I have code that is running on existing hardware and have now encountered the same error after uploading the exact same code to a new device. The only different is that I allowed the IDE to update all boards and libraries.
Have done a little testing by loading the sample 'WiFiManager' code and it all works as expected. Then add the FastLED include top the code (nothing else just the include) - re upload, and the device constantly reboots.
> *wm:AutoConnect
>
> *wm:No wifi saved, skipping
>
> *wm:AutoConnect: FAILED for 105 ms
>
> *wm:StartAP with SSID: ESP_C5FAB9
>
> *wm:AP IP address: 192.168.4.1
>
> *wm:Starting Web Portal
>
> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
>
> Soft WDT reset
>
> Exception (4):
>
> epc1=0x4020ab5d epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
>
> >>>stack>>>
Mainly the new one (2.3.4) but have reverted to older one (1.8.16) out of desperation as I still have that installed - and both have the same issue. Have even loaded the example WiFiManager Basic example, compiled and loaded - All OK. Add reference to FastLED.h and it will crash the ESP. At a total loss but cannot understand how I can find no other reference to others having the issue. Still trying all sorts to see where the issue is. Please let me know if you solve the issue.
Is this on ESP8266? Don't have one; could not reproduce on ESP32, with WiFiManager (by tzapu) 2.0.17 and FastLED 3.9.8
To track this down, you can make a local copy of the header. Put it at the top of the sketch
#include <FastLED.h>
Verify, then you can right-click on that and Go to Definition to open the file (it's read-only). Then use the meatball (three dots) menu on the right end of the tabs and choose New Tab. Call it MyLED.h Copy & paste the content.
Swap the header file used
#include "MyLED.h"
and close FastLED.h. On line 55, you'll need to change
#include "fl/force_inline.h"
to
#include <force_inline.h>
Upload again: does this still fail? If so, you can start commenting out stuff from the bottom up to see what makes the difference. You need to maintain the structure of the file, with the #ifdef blocks, especially the main overarching one. It's a big file, over 850 lines.
Just confirming that on a NodeMCU (ESP8266) project using FastLED, I get the same soft watchdog timer reset as soon as FastLED (version 3.4.0) is included.
Following. I am working the same issue on an 8266 Node MCU board with WifiManager and the StripDisplay library. The StripDisplay library uses FastLED. Including StripDisplay.h causes the WifiManager to fail to serve it's HTTP pages. I was getting the Soft WDT reset but something I did made it quit doing that, but still doesn't work.
I am relieved that it is a shared problem, as I couldn't find any traces of a similar issue online. I conducted further tests and encountered the same problem even when using the Blynk library along with FastLED. Therefore, the issue is not specifically related to tzapu's WifiManager.
@ehipi, that interrupt is a good thought, but I tried changing NUM_LEDS to 1, and I still receive the cycling soft WDT interrupt resets. If it was a function of the interrupt duration, would making the number of LEDs to be driven low enough prevent it?
Is there a way to explicitly disable that FastLED interrupt while setting up WiFi?