mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #519] Crash Exception(28) with ArduinoOTA() in sketch setup() #435
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#435
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gibo77 on GitHub (Feb 15, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/519
I am getting exception(28) with Stack Dump.
When I run just the examples, I do not get any crashing. It works fine.
But If I incorporate to ArduinoOTA, it crashes.
The ArduinoOTA example works fine by itself. But combined with WifiManager it crashes.
As per serial monitor, the WifiManager was able to connect successfully. But when the sketch executes the ArduinoOTA, it crashes.
Do you think there is an overlapping memory/EEPROM here?
I have not done any stack trace. Maybe the gurus can do that below.
Below is the stack dump. Thanks!
*WM: Sent config page
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Connection result:
*WM: 3
connected...yeey :)
IP address: 192.168.0.108
Exception (28):
epc1=0x40227b83 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000098 depc=0x00000000
ctx: cont
sp: 3fff0920 end: 3fff0e40 offset: 01a0
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
@gibo77 commented on GitHub (Feb 15, 2018):
Update: I was able to run StackTrace result below.
0x4021a59f: igmp_joingroup at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570
0x4020913e: MDNSResponder::_listen() at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\libraries\ESP8266mDNS/ESP8266mDNS.cpp line 396
0x401009a4: free at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266\umm_malloc/umm_malloc.c line 1737
0x4020cb64: operator delete(void*) at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/abi.cpp line 84
0x4020a60a: MDNSResponder::begin(char const*) at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\libraries\ESP8266mDNS/ESP8266mDNS.cpp line 396
0x40208e30: _M_manager at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\libraries\ESP8266mDNS/ESP8266mDNS.cpp line 396
0x40209260: operator() at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\libraries\ESP8266mDNS/ESP8266mDNS.cpp line 396
0x4020cf6c: std::_Function_base::~_Function_base() at c:\users\gilbert\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional line 2031
0x4020ad09: ArduinoOTAClass::begin() at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\libraries\ArduinoOTA/ArduinoOTA.cpp line 64
0x4020a65c: std::_Function_base::_Base_manager (ArduinoOTAClass*)> >::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\libraries\ArduinoOTA/ArduinoOTA.cpp line 64
0x4020d398: std::_Function_base::_Base_manager (ArduinoOTAClass*)> >::_M_get_pointer(std::_Any_data const&) at c:\users\gilbert\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional line 1893
0x40202659: setup at D:\Documents\Arduino\Interrupt_Dimmer_EEPROM/Interrupt_Dimmer_EEPROM.ino line 92
0x402024e0: _M_manager at c:\users\gilbert\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional line 1931
0x40202420: _M_invoke at c:\users\gilbert\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional line 2069
0x4020cc6f: loop_wrapper at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/core_esp8266_main.cpp line 57
0x40100a28: cont_norm at C:\Users\Gilbert\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/cont.S line 109
@tablatronix commented on GitHub (Feb 15, 2018):
You should have been presented with a template when submitting
@tablatronix commented on GitHub (Feb 15, 2018):
You provided no information on your enviroment
@gibo77 commented on GitHub (Feb 16, 2018):
----------------------------- Remove above -----------------------------
Basic Infos
I use the latest and the greatest.

Hardware
WiFimanager Branch/Release: Development
Hardware: Wemos D1 R2 with 4Mbits memory using 1Mbits SPIFFS
Core Version: 2.4.0, staging
Description
Problem description
I am getting exception(28) with Stack Dump.
When I run just the examples, I do not get any crashing. It works fine.
But If I incorporate to ArduinoOTA, it crashes.
The ArduinoOTA example works fine by itself. But combined with WifiManager it crashes.
As per serial monitor, the WifiManager was able to connect successfully. But when the sketch executes the ArduinoOTA, it crashes.
Do you think there is an overlapping memory/EEPROM here?
I have not done any stack trace. Maybe the gurus can do that below.
Below is the stack dump. Thanks!
*WM: Sent config page
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Connection result:
*WM: 3
connected...yeey :)
IP address: 192.168.0.108 ------>The ESP8266 was able to connect, but after executing ArduinoOTA it crashes.
Exception (28):
epc1=0x40227b83 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000098 depc=0x00000000
ctx: cont
sp: 3fff0920 end: 3fff0e40 offset: 01a0
Settings in IDE
Module: Wemos D1 R2
Additional libraries:
messages here
@tablatronix commented on GitHub (Feb 16, 2018):
I had a similar error and commited a fix earlier today, maybe try again.
Also maybe try with esp staging (it can be a pain in arduino ide)
@tablatronix commented on GitHub (Feb 16, 2018):
Considering you are running 2 webservers, I am sure that has something to do with it
@gibo77 commented on GitHub (Feb 16, 2018):
As per the serial monitoring, the ESP8266 was able to connect to the Wifi because of the IP Address being sent to serial monitor. The crash happens when executing
ArduinoOTA.begins().From what I know, ArduinoOTA reserves a flash memory space that has the same size bytes of the sketch all the time. So that when an OTA is called, the new sketch will be dumped there.
It seems the WifiManager is using these same flash memory space as the ArduinoOTA. I could be wrong. But I have to say what I think is causing the crash. I have not fully studied the memory usage of WifiManager. It looks like it uses a lot of flash space due to the HTML program. Is it correct to say that WifiManager uses SPIFFS?
@tablatronix commented on GitHub (Feb 16, 2018):
Does ota use interrupts?
Wifimanager uses progmem for now
@gibo77 commented on GitHub (Feb 20, 2018):
I am not sure of OTA does interrupts. The interrupts you see in my program is specific to the application that I am controlling with ESP8266.
So WifiManager ONLY uses PROGMEM and that is it?
Thanks for your reply!
@tablatronix commented on GitHub (Feb 20, 2018):
Well am working on abstracting all strings to progmem, so this might make it easier to grab from spiffs in the future by using another abstraction layer eventually.
@gibo77 commented on GitHub (Feb 20, 2018):
I have not tried PROGMEM. But is it correct to say that since they are an extension of RAM, if you turn off the unit, the PROGMEM data will be erased as well? We all know that SPIFFS and EEPROM retain data after when removing power.
@tablatronix commented on GitHub (Feb 20, 2018):
progmem is an avr thing, but ported to esp compatible.
http://arduino-esp8266.readthedocs.io/en/latest/PROGMEM.html
ICACHE_RODATA_ATTR
There is also icache iram
https://bbs.espressif.com/viewtopic.php?t=1183
ICACHE_FLASH_ATTR
I have yet to find a decent concise explanation for understanding it all
@tablatronix commented on GitHub (Jun 17, 2020):
This is old and outdated the wm webserver is now shared and can be used