Skip to content

ESP8266 Restart Sometimes #7855

Closed
Closed
@laercionit

Description

@laercionit

Basic Infos

  • [ X] This issue complies with the issue POLICY doc.
  • [ X] I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • [ X] I have searched the issue tracker for a similar issue.
  • [ X] If there is a stack dump, I have decoded it.
  • [ X] I have filled out all fields below.

Platform

  • Hardware: [ESP-12]
  • Core Version: [2.7.4]
  • Development Env:[Arduino IDE]
  • Operating System: [Windows]

Settings in IDE

  • Module: [Nodemcu 1.0]
  • Flash Mode: [qio|dio|other]
  • Flash Size: [4MB]
  • lwip Variant: [v2 Lower Memory]
  • Reset Method: [nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [80Mhz|]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200]

Problem Description

My project has been running for a long time, it has MQTT, WEBServer and Wifi Client. I've been investigating the reason for restarting at random for a long time. Works without restarting for weeks and restarts. I believe it is something related to a momentary internet or wifi failure. I made all possible code dealings but I did not identify the problem.

The code hasn't changed, I just update the CORE, unfortunately because it's something I can't reproduce, I can't specify exactly which CORE the problem occurs in.

In the investigation I saw that it generates the problem in the line below:
#ifdef GXX_EXPERIMENTAL_CXX0X
void String :: move (String & rhs) {
if (buffer ()) {
if (capacity ()> = rhs.len ()) {
memmove_P (wbuffer (), rhs.buffer (), rhs.length () + 1);
setLen (rhs.len ());
rhs.invalidate ();
return;
} else {
if (! isSSO ()) {
free (wbuffer ());
setBuffer (nullptr);
}
}
}
if (rhs.isSSO ()) {
setSSO (true);
memmove_P (sso.buff, rhs.sso.buff, sizeof (sso.buff));
} else {
setSSO (false);
setBuffer (rhs.wbuffer ());
}
setCapacity (rhs.capacity ());
setLen (rhs.len ());
rhs.setSSO (false);
rhs.setCapacity (0);
rhs.setLen (0);
rhs.setBuffer (nullptr);
}
#endif

Debug Messages

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (9):
epc1=0x4023a974 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000526 depc=0x00000000

stack>>>

ctx: cont
sp: 3ffffcd0 end: 3fffffc0 offset: 0190
3ffffe60: 3fff3704 3fff3704 3fffff50 40236644
3ffffe70: 3fff0696 00000000 3ffffea0 4022c388
3ffffe80: 3fff3704 00000000 3ffffea0 4022d264
3ffffe90: 3fff0696 00000000 000001f4 40211ad8
3ffffea0: 00000000 00000000 3fff36a4 3fff36cc
3ffffeb0: 0017001f 00000001 3f010050 40001388
3ffffec0: 6765722f 65747369 8a002f72 70747468
3ffffed0: 00000000 84000000 3fff3bcc 0000016f
3ffffee0: 00000004 3fff2464 0011001f 00000004
3ffffef0: 00000000 4bc6a7f0 8074bc6a 00000000
3fffff00: 00000000 000001f4 00000000 00000000
3fffff10: 00000000 f0f4000a 40100500 000cc5b7
3fffff20: 80000000 00000000 3fff36f4 3fff3600
3fffff30: 0024002f 80000044 31313600 38333338
3fffff40: 80003230 00000000 0112ea94 402377da
3fffff50: 00000000 00000000 8012ea94 40206bd3
3fffff60: 00000000 3fff07a8 00000000 40211bdc
3fffff70: 00000000 3fff07a8 3fff07a8 40211cd5
3fffff80: 3fffdad0 00000000 3fff0588 3fff0bd8
3fffff90: 3fffdad0 00000000 3fff0b98 402281a5
3fffffa0: feefeffe feefeffe feefeffe 402378bc
3fffffb0: feefeffe feefeffe 3ffe96c8 4010118d
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Decoding 13 results
0x40236644: String::move(String&) at D:\SETUP\Programas\Desenvolvimento\ArduinoDesenv\portable\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/WString.cpp line 230
0x4022c388: HTTPClient::disconnect(bool) at D:\SETUP\Programas\Desenvolvimento\ArduinoDesenv\portable\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.cpp line 434
0x4022d264: HTTPClient::handleHeaderResponse() at D:\SETUP\Programas\Desenvolvimento\ArduinoDesenv\portable\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.cpp line 1376
0x40211ad8: _Z14SystemRegisterb$part$305 at C:\Users\Laercio\AppData\Local\Temp\arduino_build_914177\sketch/System.h line 607
0x40100500: millis at D:\SETUP\Programas\Desenvolvimento\ArduinoDesenv\portable\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/core_esp8266_wiring.cpp line 182
0x402377da: eboot_command_write at D:\SETUP\Programas\Desenvolvimento\ArduinoDesenv\portable\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/core_esp8266_eboot_command.cpp line 59
0x40206bd3: Waiting(unsigned int) at C:\Users\Laercio\AppData\Local\Temp\arduino_build_914177\sketch/RTC.h line 33
0x40211bdc: SystemInit(bool) at C:\Users\Laercio\AppData\Local\Temp\arduino_build_914177\sketch/System.h line 625
0x40211cd5: SystemMonitor(bool) at C:\Users\Laercio\AppData\Local\Temp\arduino_build_914177\sketch/System.h line 652
0x402281a5: loop at D:\Save\Aquarino\Projects\Aquarino-ControllerBeta/Aquarino-ControllerBeta.ino line 98
0x402378bc: esp_yield at D:\SETUP\Programas\Desenvolvimento\ArduinoDesenv\portable\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/core_esp8266_main.cpp line 119
0x4010118d: cont_wrapper at D:\SETUP\Programas\Desenvolvimento\ArduinoDesenv\portable\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/cont.S line 81

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions