letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.28k stars 2.21k forks source link

Manual reboot () due to hardware watchdog in release mega-20180922 #1774

Closed micropet closed 5 years ago

micropet commented 6 years ago

The current version still has the same problem as the versions of the last few weeks. I use ESP_Easy_mega-20180922_test_ESP8266_4096.bin

The units without sensors run only slightly longer than one or four hours.

Units with Sensors (BME280 BH1750 Pir MH-Z19 TVoc CSS811 PMS7003) boot after a few minutes. The running time is between 3 minutes and 30 minutes. It is always different.

s0170071 commented 6 years ago

Looks like what I have seen. I did not observe an immediate crash either. It may also be a coincidence that my unit is now surviving longer. Crash or not, it looks like its worth an issue.

TD-er commented 6 years ago

Yesterday I made this commit: https://github.com/letscontrolit/ESPEasy/pull/1792/commits/bd2bdab95c102c700f4039540532858de8a30fa6 I tested it also on my ESP8266 and ESP32 and it seems to work. What it does is quite simple, it moves the allocation of the large SettingsStruct from stack to heap. My suspicion is that some of these crashes may happen due to stack overflow and moving such a large allocation on the stack to the heap may clear a lot of the very limited stack.

So maybe you could test that also on a number of nodes?

s0170071 commented 6 years ago

Maybe we should monitor the stack pointer ? This used to be good practice back in the days...

TD-er commented 6 years ago

If you can give me a pointer (pun intended) on how to do that, that would be great :)

s0170071 commented 6 years ago

Someone made some experiments here: https://www.esp8266.com/viewtopic.php?f=13&t=16734 There is even an issue open here: https://github.com/esp8266/Arduino/issues/5158 and https://github.com/esp8266/Arduino/issues/5148 The later one looks like there is already a method for checking the statck: getFreeContStack()

s0170071 commented 6 years ago

@TD-er: There is also a brute force approach:

  1. output a log message: "starting stack test..." ,
  2. wait for it to be sent out (10ms) and then
  3. do 100? nested function calls.

If the stack is low this will crash the system. Thanks to the log message you know why.

sample code:

in setup()

Serial.print(F("starting stack test..."));
if (stackTest(0)) Serial.println(F("  passed"));

the test function

boolean stackTest(int a ) {
    a++; 
    if (a<100) {
        stackTest(a);  // next nested call
    }
    a--; 
         if (a==0)  
             return true ;  // we're back to the first call
         else
             return false;  // this is still a nested loop
}

Each nested call should add at least 8 bytes to the stack, 4 for the int variable and 4 for the return address. If I am not mistaken that is. One would have to experiment with a healthy number of nested calls. Too many will crash the system, no matter what.

s0170071 commented 6 years ago

@Grovkillen that unknown command was just a coincidence. The unit rebooted after 18 hours.

Grovkillen commented 6 years ago

But might be some overload going on still?

TD-er commented 6 years ago

Did anyone test my suggestion ? I will merge that PR now, and it would be nice if someone could test it, before the nightly build is made.

N.B. when testing on ESP32, it will clear all your settings.

s0170071 commented 6 years ago

Isn't it too late for testing now ? You can tell only after a day or so if it is an success.

A good indication could be the stack test (with the nested calls) like I suggested here:

As far as I know we have no clue whatsoever how full the stack is. I would really like to know because that would finally give a plausible explaination why ESPEasy stability is often so bad..

I will test the stack this evening or tomorrow but I can't promise. Im very low on time in the evenings :-(

giig1967g commented 6 years ago

Did anyone test my suggestion ? I will merge that PR now, and it would be nice if someone could test it, before the nightly build is made.

N.B. when testing on ESP32, it will clear all your settings.

Hi Gijs, with latest releases, in my case the Hardware Watchdog is really random, some times the unit reboots after 2 hours, sometimes it doesn't reboot for days (now my units have been running for 2.5 days). So it's difficult to tell if your commit solves the issue.

Isn't it really possible to write catch the cause of the HW WD?

TD-er commented 6 years ago

@giig1967g Did you test with that specific commit? It was not merged until about an hour ago. @s0170071 I know that these commits don't break the units, since it has been running on my nodes for a while now. And the ESP32 merge should be done anyway, since with the default partitioning, you cannot add a lot with the latest core libraries. There was only a few kB left to add until building becomes impossible.

giig1967g commented 6 years ago

@giig1967g Did you test with that specific commit? It was not merged until about an hour ago.

Not yet. Will load now.

giig1967g commented 6 years ago

@giig1967g Did you test with that specific commit? It was not merged until about an hour ago.

How can I test your commit?

TD-er commented 6 years ago

It is already merged, so build from the mega branch.

giig1967g commented 6 years ago

built and loaded since 21 minutes. So far is ok

s0170071 commented 6 years ago

@TD-er I just tried the nested function calls. At the end of setup() I can make 224 nested calls before the ESP crashes. Whether the settings struct is on the heap or not makes no difference. I tried both.

What am I missing ? The settings as global variable could have been on the heap all along ? https://github.com/esp8266/Arduino/issues/3597#issuecomment-328718942

giig1967g commented 6 years ago

It is already merged, so build from the mega branch.

so far 9 hours and is ok. But it doesn't mean much as before uploading the firmware the unit ran for 6 days...

TD-er commented 6 years ago

@s0170071 Thanks for testing, too bad it doesn't seem to make a difference, but at least we can exclude something. The free heap is decreased by moving the settings struct to the heap. Only thing I can think of is that things allocated outside the setup() or loop() functions are maybe declared elsewhere. Not sure if it is on the Arduino stack, or maybe a stack outside the Arduino stack? (system stack?) I am thinking about moving back to 1.7.x core lib, since this one doesn't look like it can be solved in a short while.

micropet commented 6 years ago

I have increased the cip frequency to 160 MHz For me, the version of the 25th works now for over 10 hours without reboot on 3 units.

May be a coincidence.

s0170071 commented 6 years ago

@TD-er according to the message I linked only local variables end up on the stack. The settings struct was never local.

Have you ever had a look at the way strings are used ?

I mean, the crashes are rather random and we use a lot of strings in the code. E.g. returning a local string variable just a problem. It is out of scope if the calling routine tries to access it. That may (only may unfortunately) lead to problems. And there is heap fragmentation...

TD-er commented 6 years ago

True there may be heap fragmentation involved here. That's one of the reasons I added a check for the log level, to generate less log messages when nobody is listening. Also I try to use reserve where I can to prevent re-allocations on the heap. And allocating larger blocks at boot time, will also help to get at least those long lived blocks allocated close to eachother.

Also the rules do act a bit strange. Even on my ESP32 it sometimes reports memory as low as a few hundred bytes (from 180k free) and always in the same function for rules parsing. (see https://github.com/letscontrolit/ESPEasy/issues/1605 )

On ESP8266 issues list I asked also about the stack used here and they plan to add some functions to inspect stack and heap conditions. See: https://github.com/esp8266/Arduino/issues/5148#issuecomment-424334261 @devyte gives a very elaborate explanation there on the sys and the cont stack. I have to perform some tests myself to really understand what's happening here.

giig1967g commented 6 years ago

Regarding strings, what about defining only once, at boot time, global variables for strings that are always used several times per second: 1) log messages 2) string used in parsing arguments to recurring functions (parsetemplate, parsecommandstring, ruleMatch, etc.)

s0170071 commented 6 years ago

I just had a look at the logging addLog() and addToLog() and unless I got it wrong this is what happens (@TD-er please correct me)

  1. in some function a local String is generated.
  2. The reference to that string is passed to addLog and then addToLog
  3. The add method of the LogStruct class then stores this reference for later use. so far so good. What happens to those string references if "some function" returns ?
TD-er commented 6 years ago

As far as I know, the log does not keep references or pointers to strings that may get destructed after handed over to the log. If you see one of those, please tell me, since that will cause crashes for sure. Maybe not immediately, but in the end it will.

s0170071 commented 6 years ago

So did I understand that right ? I must NOT do this:


void someFunction () {
 String log; 
 log = "hello world";
 addLog(LOG_LEVEL_DEBUG, log);
}
s0170071 commented 6 years ago

... or this:

   String get_logjson_formatted(bool& logLinesAvailable, unsigned long& timestamp) {
 ...
      String output = logjson_formatLine(read_idx);
 ...
      return output;
    }
s0170071 commented 6 years ago

@TD-er (and all others... )

Just searching for "String" I find lots of paces that I find suspicious... Another one:

bool getSettingsParameters(SettingsType settingsType, int index, int& offset, int& max_size);
String getSettingsTypeString(SettingsType settingsType) {
  switch (settingsType) {
    case BasicSettings_Type:            return F("Settings");

    ... more case statements....

    default:
      break;
  }
  return String();

}

What exactly doesreturn String(); return really ?

TD-er commented 6 years ago

Depends on what you do with the returned value. If you store it in an object, then there is no problem.

I don't have much time now, but I can explain more about this later this evening.

In short, this is tricky:

char* example() {
  String test = "this is a text";
  char* text = test.c_str();
  return text;
}

Problem is that the string will no longer exist after returning, so the pointer may point to something that can be used for something else. Returning a String is not a problem as long as the object remains.

micropet commented 6 years ago

No reboot since I increased the chip frequency to 160 MHz. 5 units are running with it.

Maybe it's worth a try.

TD-er commented 6 years ago

I wonder what would then be fixed by it. Is the uptime counter working OK?

micropet commented 6 years ago

I am surprised too.

Yes, the uptime counter is correct.

Maybe now the CPU can execute more commands at the same time.

giig1967g commented 6 years ago

It could make sense: the WD is activated after few seconds of non responding. So if the chip is faster it could be that it never reaches the WD limit...

how do you increase the CPU frequency?

micropet commented 6 years ago

In platformio only: board_build.f_cpu = 160000000L

TD-er commented 6 years ago

I also have the impression the reset of the WatchdogTimer is being done only at the end/start of a loop. That's one of the reasons I am trying to split a lot of tasks in smaller ones and only call one task per loop run.

s0170071 commented 6 years ago

Can we set the wd to shorter timeouts? Or lower the chip frequency? Just to trigger/ pinpoint the problem.

micropet commented 6 years ago

I think it works only 80 MHz and 160 MHz. But you can try 40 MHz.

giig1967g commented 6 years ago

I am testing the 160MHz. The web interface is really fast!

TD-er commented 6 years ago

I am not sure if higher CPU frequencies also imply higher flash frequencies. That may lead to data corruption. The CPU can run perfectly fine on that frequency.

micropet commented 6 years ago

board_build.f_flash stays at 40 MHz.

ESP board

ESP Chip ID | 747602 (0xB6852) ESP Chip Freq: | 160 MHz Storage Flash Chip ID | Vendor: 0xE0 Device: 0x4016 Flash Chip Real Size: | 4096 kB Flash IDE Size: | 4096 kB Flash IDE speed: | 40 MHz Flash IDE mode: | DIO

s0170071 commented 6 years ago

@TD-er my unit rebooted after a couple of hours. So the settings->heap commit did not do the trick. I added

    Serial.print(F("press key to boot..."));
    while (Serial.available()<5) delay(20);
    while (Serial.available()) Serial.read();

to the end of setup and have it logging via serial constantly. This way the unit is halted on reboot and I can look at the serial trace....

s0170071 commented 6 years ago

@TD-er this may be problematic: in ESPEasy-globals.h

    while (retry > 0 && !connected) {
      --retry;
      // In case of domain name resolution error result can be negative.
      // https://github.com/esp8266/Arduino/blob/18f643c7e2d6a0da9d26ff2b14c94e6536ab78c1/libraries/Ethernet/src/Dns.cpp#L44
      // Thus must match the result with 1.
      connected = (client.connect(getIP(), Port) == 1);
      if (connected) return true;
      if (!checkHostReachable(false))
        return false;
    }

it is not impossible that 3 consecutive connect attempts are made without feeding the WD.

TD-er commented 6 years ago

That's a good one.

s0170071 commented 6 years ago

I trapped two exceptions this afternoon, here come the decoded results:

1:

Exception 2: InstructionFetchError: Processor internal physical address or data error during instruction fetch
Decoding 204 results
0x40271501: ip4_input at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 613
0x4026a98c: ethernet_input_LWIP2 at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 107
0x4028414b: pp_attach at ?? line ?
0x4028419a: pp_attach at ?? line ?
0x402842a6: pp_attach at ?? line ?
0x40100f22: pp_post at ?? line ?
0x40283253: ppTxPkt at ?? line ?
0x402766bf: ieee80211_output_pbuf at ?? line ?
0x40104424: call_user_start_local at ?? line ?
0x401049a3: wdt_feed at ?? line ?
0x40100721: cont_continue at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/cont.S line 51
0x4026a329: pbuf_wrapper_get at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 227
:  (inlined by) glue2esp_linkoutput at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 271
0x4026a682: pbuf_clone at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 214
0x4026aa1f: ethernet_input_LWIP2 at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 247
0x4026aa28: ethernet_input_LWIP2 at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 247
0x40107020: __wrap_spi_flash_read at ?? line ?
0x402709fc: etharp_output_to_arp_index at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/etharp.c line 753
0x4025c5dc: String::concat(double) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x40270c54: etharp_output_LWIP2 at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/etharp.c line 822
0x402af5a0: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x40271708: ip4_output_if_opt_src at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 918
0x40271d78: sntp_servermode_dhcp at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/apps/sntp/sntp.c line 624
0x401004e8: malloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1672
0x40271d78: sntp_servermode_dhcp at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/apps/sntp/sntp.c line 624
0x4026aa7c: ethernet_output at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 297
0x40271748: ip4_output_if_opt_src at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 928
0x4025bf2f: String::invalidate() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4027176e: ip4_output_if_opt_src at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 962
0x40271e67: inet_cksum_pseudo_base at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/inet_chksum.c line 542
:  (inlined by) inet_chksum_pseudo at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/inet_chksum.c line 326
0x4026edae: tcp_output_segment at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_out.c line 1257
:  (inlined by) tcp_output at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_out.c line 1122
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x40106ade: millis at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring.c line 183
0x4025ce10: operator new[](unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/abi.cpp line 71
0x4025cdb8: String::toFloat() const at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 794
0x40251f03: _GLOBAL__sub_D__ZN20ESP8266WiFiScanClass10_scanAsyncE at ESP8266WiFiScan.cpp line ?
0x402527e9: ClientContext::_write_from_source(DataSource*) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp line 375
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x40106ade: millis at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring.c line 183
0x4025d028: loop_task at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp line 134
0x4025a5c4: EspClass::deepSleep(unsigned long long, RFMode) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/Esp.cpp line 303
0x402a1fdb: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x4025d0ea: do_global_ctors at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp line 140
:  (inlined by) init_done() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp line 147
0x40240cab: sendHeaderBlocking(bool) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40254d58: ESP8266WebServer::on(String const&, std::function ) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x40103523: lmacRecycleMPDU at ?? line ?
0x4025bfad: String::reserve(unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4025c13d: String::operator=(StringSumHelper&&) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4010426a: lmacTxFrame at ?? line ?
0x40254d58: ESP8266WebServer::on(String const&, std::function ) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x40240d42: StreamingBuffer::startStream(bool) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40101c3d: trc_NeedRTS at ?? line ?
0x4028414b: pp_attach at ?? line ?
0x40240d60: StreamingBuffer::startStream(bool) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40243517: handle_controllers() at ?? line ?
0x4010426a: lmacTxFrame at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x40103e6f: lmacMSDUAged at ?? line ?
0x40273000: wifi_mode_set at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x4027c8f4: ieee80211_action_vendor_spec_attach at ?? line ?
0x40276b76: ieee80211_send_nulldata at ?? line ?
0x40101c3d: trc_NeedRTS at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x4026a678: esp2glue_dhcp_stop at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 191
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x4028414b: pp_attach at ?? line ?
0x4028419a: pp_attach at ?? line ?
0x402842a6: pp_attach at ?? line ?
0x40100f22: pp_post at ?? line ?
0x40104304: lmacTxFrame at ?? line ?
0x40103523: lmacRecycleMPDU at ?? line ?
0x40103986: lmacRecycleMPDU at ?? line ?
0x40100f22: pp_post at ?? line ?
0x4010346a: lmacProcessTxSuccess at ?? line ?
0x401022eb: wDev_ProcessFiq at ?? line ?
0x40101e0e: trc_NeedRTS at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x40100f22: pp_post at ?? line ?
0x40104304: lmacTxFrame at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x40103523: lmacRecycleMPDU at ?? line ?
0x40103986: lmacRecycleMPDU at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40281eae: umm_info at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1084 (discriminator 3)
0x401004ba: _umm_malloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1474
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x40250df5: ESP8266WiFiGenericClass::mode(WiFiMode) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp line 97
0x4020b0c7: String::operator+=(__FlashStringHelper const*) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
:  (inlined by) ESPeasyWifiStatusToString() at /home/john/Arduino/scetchbooks/ESPEasy/ESPEasyWifi.ino line 750
0x40107020: __wrap_spi_flash_read at ?? line ?
0x40107068: timer1_isr_handler at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_timer.c line 58
0x4025298d: ClientContext::_consume(unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp line 375
0x4025b6f3: std::_List_base   >::_M_init() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/ScheduledFunctions.cpp line 116
:  (inlined by) _List_base at /home/john/Arduino/github/Core/Arduino/tools/xtensa-lx106-elf/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_list.h line 361
:  (inlined by) list at /home/john/Arduino/github/Core/Arduino/tools/xtensa-lx106-elf/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_list.h line 524
:  (inlined by) __static_initialization_and_destruction_0 at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/ScheduledFunctions.cpp line 9
:  (inlined by) _GLOBAL__sub_I__ZN18ScheduledFunctions18scheduledFunctionsE at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/ScheduledFunctions.cpp line 116
0x40252984: ClientContext::_consume(unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp line 375
0x40100579: _umm_realloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1503
:  (inlined by) realloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1731
0x40251873: ESP8266WiFiSTAClass::macAddress() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp line 546
0x40100579: _umm_realloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1503
:  (inlined by) realloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1731
0x4025bf2f: String::invalidate() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4020b0e6: getSubnetRange(IPAddress&, IPAddress&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025ff98: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x4025ff98: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x40254d58: ESP8266WebServer::on(String const&, std::function ) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x4020fc75: ipInRange(IPAddress const&, IPAddress const&, IPAddress const&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025bf2f: String::invalidate() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x40252678: WiFiClient::~WiFiClient() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp line 375
0x40222cf4: formatIP at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
:  (inlined by) clientIPallowed() at /home/john/Arduino/scetchbooks/ESPEasy/WebServer.ino line 362
0x4025fd68: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x40202584: _calloc_r at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/heap.c line 44
0x4025ff98: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x402a0745: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x4025ff98: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x4025ff98: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x4025bf08: random(long, long) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WMath.cpp line 82
0x4020c6f6: RamTracker::registerRamState(String&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40222d1a: clientIPallowed() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40254d58: ESP8266WebServer::on(String const&, std::function ) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x40244130: handle_notifications at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40253564: FunctionRequestHandler::~FunctionRequestHandler() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x4025e2de: std::_Function_base::_Base_manager ::_M_clone(std::_Any_data&, std::_Any_data const&, std::integral_constant ) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
:  (inlined by) std::_Function_base::_Base_manager ::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) at /home/john/Arduino/github/Core/Arduino/tools/xtensa-lx106-elf/xtensa-lx106-elf/include/c++/4.8.2/functional line 1946
0x40254d4e: ESP8266WebServer::on(String const&, std::function ) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x40254d8a: std::function ::operator()() const at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/ScheduledFunctions.cpp line 116
0x4025c0d8: String::operator=(String const&) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x40254e11: ESP8266WebServer::_handleRequest() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x40253564: FunctionRequestHandler::~FunctionRequestHandler() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x40255060: ESP8266WebServer::handleClient() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 269
0x4025fd68: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x402149fc: operator-  at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
:  (inlined by) std::deque   >::size() const at /home/john/Arduino/github/Core/Arduino/tools/xtensa-lx106-elf/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_deque.h line 1143
:  (inlined by) process_serialLogBuffer() at /home/john/Arduino/scetchbooks/ESPEasy/Misc.ino line 1225
0x4025ac5d: HardwareSerial::write(unsigned char) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/HardwareSerial.cpp line 133
0x40237d7a: backgroundtasks() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40239408: rulesProcessingFile(String, String&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025ff40: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x4025bf7b: String::changeBuffer(unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4025bfad: String::reserve(unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4025c0b0: String::move(String&) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4023959f: rulesProcessing(String&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x402989f4: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x4025c334: String::String(double, unsigned char) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4023ee89: Plugin_037_update_connect_status() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025beec: random(long) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WMath.cpp line 82
0x4025bf08: random(long, long) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WMath.cpp line 82
0x4023f08d: MQTTConnect_037() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025e2a8: std::_Function_handler ::_M_invoke(std::_Any_data const&, WiFiEventStationModeGotIP const&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025d028: loop_task at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp line 134
0x40201e60: delay at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring.c line 45
0x4023f3f9: Plugin_037(unsigned char, EventStruct*, String&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40261a54: _sprintf_r at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/sprintf.c line 605
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x40281ed4: umm_info at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1093 (discriminator 3)
0x40202584: _calloc_r at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/heap.c line 44
0x4025bf2f: String::invalidate() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4028b8af: system_print_meminfo at ?? line ?
0x4025a5c4: EspClass::deepSleep(unsigned long long, RFMode) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/Esp.cpp line 303
0x4025c0b0: String::move(String&) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x4025beec: random(long) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WMath.cpp line 82
0x40296a06: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x4025bf08: random(long, long) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WMath.cpp line 82
0x40296a06: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x4020cbce: checkRAM(__FlashStringHelper const*, String&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4021a0fd: PluginCall(unsigned char, EventStruct*, String&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x402403e3: now() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40240990: setup at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4022722b: WiFiConnectRelaxed() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025ff98: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x40240afb: runOncePerSecond() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x4024e162: process_interval_timer(unsigned long, unsigned long) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40201e60: delay at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring.c line 45
0x4024e287: msecTimerHandlerStruct::getNextId(unsigned long&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
:  (inlined by) handle_schedule() at /home/john/Arduino/scetchbooks/ESPEasy/Scheduler.ino line 44
0x4024e355: loop at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025d049: preloop_update_frequency() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp line 79
0x4025d0b8: esp_schedule at ?? line ?

2:

Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address
Decoding 156 results
0x40104b14: ets_timer_setfn at ?? line ?
0x402b0c80: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x4026a4e9: netif_init_ap at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 352
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x4027b983: cnx_remove_all_rc at ?? line ?
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x40104d40: ets_timer_arm_new at ?? line ?
0x402b0c80: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x40201e44: micros_overflow_tick at ?? line ?
0x4025290c: WiFiClient::write_P(char const*, unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp line 375
0x40252155: ClientContext::close() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp line 375
0x40100ab6: ppEnqueueRxq at ?? line ?
0x40252ba5: WiFiClient::remoteIP() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp line 375
0x40100883: ppProcessTxQ at ?? line ?
0x40250f54: ESP8266WiFiGenericClass::hostByName(char const*, IPAddress&, unsigned int) at ?? line ?
0x401008be: ppProcessTxQ at ?? line ?
0x4028e3e8: wifi_status_led_install at ?? line ?
0x40104424: call_user_start_local at ?? line ?
0x4010442a: call_user_start_local at ?? line ?
0x40209a9d: get_user_agent_request_header_field() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4010000d: call_user_start at ?? line ?
0x40209a9d: get_user_agent_request_header_field() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40100774: cont_ret at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/cont.S line 142
0x40100721: cont_continue at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/cont.S line 51
0x40100f22: pp_post at ?? line ?
0x40104304: lmacTxFrame at ?? line ?
0x40100f22: pp_post at ?? line ?
0x40103523: lmacRecycleMPDU at ?? line ?
0x40103986: lmacRecycleMPDU at ?? line ?
0x40103523: lmacRecycleMPDU at ?? line ?
0x40103986: lmacRecycleMPDU at ?? line ?
0x4010346a: lmacProcessTxSuccess at ?? line ?
0x40104bfd: ets_timer_disarm at ?? line ?
0x40100f22: pp_post at ?? line ?
0x4010431f: lmacRxDone at ?? line ?
0x40104bfd: ets_timer_disarm at ?? line ?
0x40101c3d: trc_NeedRTS at ?? line ?
0x40101e0e: trc_NeedRTS at ?? line ?
0x4010224e: wDev_ProcessFiq at ?? line ?
0x40100f22: pp_post at ?? line ?
0x40104304: lmacTxFrame at ?? line ?
0x40103523: lmacRecycleMPDU at ?? line ?
0x40103986: lmacRecycleMPDU at ?? line ?
0x40104bfd: ets_timer_disarm at ?? line ?
0x40281eae: umm_info at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1084 (discriminator 3)
0x40100f22: pp_post at ?? line ?
0x40104304: lmacTxFrame at ?? line ?
0x40103523: lmacRecycleMPDU at ?? line ?
0x40103986: lmacRecycleMPDU at ?? line ?
0x4010346a: lmacProcessTxSuccess at ?? line ?
0x4025bf2f: String::invalidate() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x401022eb: wDev_ProcessFiq at ?? line ?
0x40101fe8: wDev_ProcessFiq at ?? line ?
0x40281ed4: umm_info at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1093 (discriminator 3)
0x40281be6: eloop_register_timeout at ?? line ?
0x40281ed4: umm_info at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1093 (discriminator 3)
0x40100f22: pp_post at ?? line ?
0x40104304: lmacTxFrame at ?? line ?
0x40103523: lmacRecycleMPDU at ?? line ?
0x40100579: _umm_realloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1503
:  (inlined by) realloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1731
0x40104bfd: ets_timer_disarm at ?? line ?
0x40281ed4: umm_info at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1093 (discriminator 3)
0x40106ade: millis at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring.c line 183
0x402156b6: std::list   >::merge(std::list   >&&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x401057e0: spi_flash_read at ?? line ?
0x40215778: std::list   >::sort() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40100579: _umm_realloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1503
:  (inlined by) realloc at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1731
0x4025bf2f: String::invalidate() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4025bf2f: String::invalidate() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4025bf7b: String::changeBuffer(unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4025bfad: String::reserve(unsigned int) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4025c13d: String::operator=(StringSumHelper&&) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4025c38b: String::init() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
:  (inlined by) String::String(__FlashStringHelper const*) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 44
0x40103125: lmacIsIdle at ?? line ?
0x4010426a: lmacTxFrame at ?? line ?
0x40103e6f: lmacMSDUAged at ?? line ?
0x40103125: lmacIsIdle at ?? line ?
0x401037de: lmacRecycleMPDU at ?? line ?
0x4010426a: lmacTxFrame at ?? line ?
0x40103d79: lmacMSDUAged at ?? line ?
0x40103125: lmacIsIdle at ?? line ?
0x40103269: lmacProcessTXStartData at ?? line ?
0x40103266: lmacProcessTXStartData at ?? line ?
0x40102192: wDev_ProcessFiq at ?? line ?
0x40103e6f: lmacMSDUAged at ?? line ?
0x40103125: lmacIsIdle at ?? line ?
0x4010426a: lmacTxFrame at ?? line ?
0x40103e6f: lmacMSDUAged at ?? line ?
0x401037de: lmacRecycleMPDU at ?? line ?
0x40103125: lmacIsIdle at ?? line ?
0x40103269: lmacProcessTXStartData at ?? line ?
0x40103266: lmacProcessTXStartData at ?? line ?
0x40102192: wDev_ProcessFiq at ?? line ?
0x40103e6f: lmacMSDUAged at ?? line ?
0x40101fe8: wDev_ProcessFiq at ?? line ?
0x40265240: __copybits at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/mprec.c line 1009
0x40265240: __copybits at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/mprec.c line 1009
0x40260e4d: _printf_common at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/nano-vfprintf_i.c line 85
0x40265240: __copybits at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/mprec.c line 1009
0x40106ade: millis at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring.c line 183
0x40265240: __copybits at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/mprec.c line 1009
0x40261208: _printf_i at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/nano-vfprintf_i.c line 214
0x402156b6: std::list   >::merge(std::list   >&&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x402656ac: _svfprintf_r at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/nano-vfprintf.c line 614
0x4025ed80: ESP8266WebServer::args() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 516
0x4023ee51: Plugin_001(unsigned char, EventStruct*, String&) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4023f0c8: MQTTConnect_037() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025ed80: ESP8266WebServer::args() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 516
0x40261a54: _sprintf_r at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/sprintf.c line 605
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x40281ed4: umm_info at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1093 (discriminator 3)
0x40202584: _calloc_r at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/heap.c line 44
0x4025bf2f: String::invalidate() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4028b8af: system_print_meminfo at ?? line ?
0x4025a5c4: EspClass::deepSleep(unsigned long long, RFMode) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/Esp.cpp line 303
0x4025c0b0: String::move(String&) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 735
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x4010020c: _umm_free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1299
0x401006dc: free at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1759
0x40296a06: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x4025beec: random(long) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WMath.cpp line 82
0x4025bf08: random(long, long) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/WMath.cpp line 82
0x40209a98: get_user_agent_request_header_field() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025315f: UdpContext::getRemotePort() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiUdp.cpp line 282
:  (inlined by) WiFiUDP::remotePort() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiUdp.cpp line 262
0x402379ea: parseCompleteNonCommentLine(String&, String&, String&, bool&, bool&, bool&, bool*, bool*, unsigned char&, unsigned char&) at ?? line ?
0x402403e3: now() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40240990: setup at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40252e5a: WiFiServer::available(unsigned char*) at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiServer.cpp line 96
0x4025ff98: getSpiffsMode(fs::OpenMode, fs::AccessMode) at ?? line ?
0x4020e8bb: SSDP_send(unsigned char) at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x40104d40: ets_timer_arm_new at ?? line ?
0x4025d028: loop_task at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp line 134
0x40201e55: delay at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring.c line 43
0x40237d92: backgroundtasks() at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4024e358: loop at /home/john/Arduino/scetchbooks/ESPEasy/_P181_TempHumidity_SHT2x.ino line 218
0x4025d049: preloop_update_frequency() at /home/john/ArduinoPortable/arduino-1.8.5_ESPgit/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp line 79
0x4025d0b8: esp_schedule at ?? line ?
s0170071 commented 6 years ago

@TD-er Just thinking: if you declare a function pointer to a void function like that: void (*MainLoopCall_ptr)(void); that pointer does not actually point anywhere yet, doesn't it ? So if you then do in loop()

if(MainLoopCall_ptr)
      MainLoopCall_ptr();

that's a bit like Russian roulette, :-O ?

TD-er commented 6 years ago

I don't know what you mean with the last remark. Do you have an actual example in the code where this is done?

Also the examples posted this morning where a String object is returned, do you have any example where it is being used incorrectly?

I will now look at your controller connect routine you mentioned and look at your other issue: https://github.com/letscontrolit/ESPEasy/issues/1814

s0170071 commented 6 years ago

void (*MainLoopCall_ptr)(void); is in ESPEasy-Globals.h

  if(MainLoopCall_ptr)
      MainLoopCall_ptr();

is in the main loop. With russian roulette I meant that jumping to an uninitialized pointer may end up deadly.

About the string pointers I am not sure. Two questions came to my mind:

  1. Can you really have a string object on the stack or is it just the pointer to that string ? Just like with the char array.
  2. What does return String(); do ?
TD-er commented 6 years ago

The String object is created on the stack. (unless called with new ofcourse ;) ) That String object has a few members:

The entire object itself is just a C++ object, just like any other struct/class.

return String(); does return a String object created with the default constructor (no parameters needed)

s0170071 commented 6 years ago

Thanks. And what about that void pointer ?

TD-er commented 6 years ago

I have to look into that. But as far as I know, a void pointer is just a pointer to some memory address. You have to cast it to something to actually know whether it is an object, a function or maybe some data.

So you can simply store just about anything inside a void pointer, but then you have to know what it is before using it, or else you will probably run into a crash or some undefined behavior.

Before de-referencing a pointer, you always have to check if it is a valid pointer, or really be sure about it (because you just created it for example)