Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESPhttpUpdate Exception 28 and erase WiFi credentials #6555

Closed
marcolettieri opened this issue Sep 26, 2019 · 5 comments
Closed

ESPhttpUpdate Exception 28 and erase WiFi credentials #6555

marcolettieri opened this issue Sep 26, 2019 · 5 comments

Comments

@marcolettieri
Copy link

marcolettieri commented Sep 26, 2019

  • Core Version: 2.5.2

  • Development Env: Arduino IDE

  • Operating System: Windows

  • Module: Generic ESP8266 Module

  • Flash Mode: dio

  • Flash Size: 2MB (no spiffs)

  • lwip Variant: v2 Lower Memory

  • Reset Method: nodemcu

  • Flash Frequency: 80Mhz

  • CPU Frequency: 80Mhz

  • Crystal Frequency: 26MHz

  • Upload Using: SERIAL

  • Upload Speed: 115200

Firmware works perfectly, when ota is launched, after some seconds i receive exception stack and after reboot the esp8266 'forget' all Wifi credentials.

this is decoded exception

Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
Decoding 29 results
0x40236031: netif_set_down at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 616
0x402477b0: node_remove_from_list at ?? line ?
0x40236054: netif_remove at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 537
0x40239bde: wifi_get_opmode at ?? line ?
0x402381d2: eagle_lwip_if_free at ?? line ?
0x4023ad7a: wifi_station_disconnect at ?? line ?
0x40203abc: ESP8266WiFiSTAClass::disconnect(bool) at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.cpp line 373
0x402189c8: tcpip_tcp_timer at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c line 145
0x4021fe80: mem_malloc at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/mem.c line 210
0x40218928: lwip_cyclic_timer at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c line 233
0x401001fc: millis at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/core_esp8266_wiring.cpp line 186
0x4020b21a: String::reserve(unsigned int) at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/WString.cpp line 148
0x4020b36c: String::move(String&) at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/WString.cpp line 230
0x4020107f: std::_Function_handler ::_M_invoke(std::_Any_data const&, WiFiEventStationModeDisconnected const&) at c:\users\marcoletteri\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-3-20ed2b9\xtensa-lx106-elf\include\c++\4.8.2/functional line 2073
0x402034e8: std::_Function_handler  )::{lambda(_esp_event*)#1}>::_M_invoke(std::_Any_data const&, _esp_event*) at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi\src/ESP8266WiFiType.h line 112
:  (inlined by) operator() at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.cpp line 122
:  (inlined by) _M_invoke at c:\users\marcoletteri\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-3-20ed2b9\xtensa-lx106-elf\include\c++\4.8.2/functional line 2071
0x40100aca: ppEnqueueRxq at ?? line ?
0x40204cf5: WiFiClient::stopAll() at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi\src/WiFiClient.cpp line 386 (discriminator 2)
0x4020371b: ESP8266WiFiGenericClass::_eventCallback(void*) at c:\users\marcoletteri\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-3-20ed2b9\xtensa-lx106-elf\include\c++\4.8.2\bits/stl_list.h line 157
:  (inlined by) ESP8266WiFiGenericClass::_eventCallback(void*) at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.cpp line 234
0x401008d2: ppProcessTxQ at ?? line ?
0x4023c2e4: wifi_set_status_led_output_level at ?? line ?
0x40104438: call_user_start_local at ?? line ?
0x4010443e: call_user_start_local at ?? line ?
0x4010000d: call_user_start at ?? line ?
0x40100600: cont_ret at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/cont.S line 142
0x401005ad: cont_continue at C:\Users\MarcoLetteri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/cont.S line 51
@tablatronix
Copy link
Contributor

add code fences to your exception , makes it easier to read, triple tick before and after

@tablatronix
Copy link
Contributor

tablatronix commented Sep 26, 2019

Please clarify which how you are using OTA or provide an example sketch, OTA can be performed from espota.py, http upload, and http fetch

For example can you reproduce with
https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino

@marcolettieri
Copy link
Author

With the example you sent it works... i'm investigating if is related to httpserver or mqtt connection alive

@marcolettieri
Copy link
Author

marcolettieri commented Sep 27, 2019

I've solved. Is caused from this:

disconnectedEventHandler = WiFi.onStationModeDisconnected([](const WiFiEventStationModeDisconnected& event){
    WiFi.disconnect();
  });

@tablatronix
Copy link
Contributor

tablatronix commented Sep 27, 2019

Lol told you, you were disconnecting. If persistent is true, disconnect erases config

Now why doing it in the callback is causing an exception, no idea, some out of scope memory thing probably

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants