[GH-ISSUE #677] Scan sometimes crashes #566

Closed
opened 2026-02-28 01:25:53 +03:00 by kerem · 21 comments
Owner

Originally created by @martinberlin on GitHub (Jul 25, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/677

Serial Output:
``
*WM: SET AP STA
DISPLAY prints: Display can't connect to WiFi. Entering config mode
Please connect to: Display-autoconnect Access Point
And browse 192.168.4.1 to configure the display WiFi connection.
192.168.4.1
Display-autoconnect
*WM:
*WM: Configuring access point...
*WM: Display-autoconnect
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started

Exception (29):
epc1=0x40214fe4 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffd80 end: 3fffffb0 offset: 01a0

``
Question: Using mDNS will somehow affect wifiManager ? I guess not, but I just want to make sure.

Basic Infos

WemosD1 ESP8266
Sketch uses 366329 bytes (35%) of program storage space. Maximum is 1023984 bytes.
Global variables use 68928 bytes (84%) of dynamic memory

Hardware

WiFimanager Branch/Release: master

Esp8266/Esp32: Esp8266

Hardware: ESP-12e

Description

Tried using development branch but there I see no scan. All other options work correctly, so I can use it as is, just curious to see if I can get the scan to work since looks like a great addition. Great work guys it looks really cool.

Sketch to reproduce the failure is here:
https://github.com/martinberlin/esp/tree/implement/wifimanager/e-paper-7.5-Skygate

Scan quite randomly crashes or the HTML is rendered partially (For ex. List but no Form below, or list+Form but no Save button)

Settings in IDE

Module: NodeMcu, Wemos D1

Additional libraries:
#include <ESP8266mDNS.h>
// display libs
#include <SPI.h>
#include <GxEPD.h>
#include <GxGDEW075T8/GxGDEW075T8.cpp>
#include <GxIO/GxIO_SPI/GxIO_SPI.cpp>
#include <GxIO/GxIO.cpp>

Sketch

https://github.com/martinberlin/esp/tree/implement/wifimanager/e-paper-7.5-Skygate

Full Serial output

Display-autoconnect
*WM:
*WM: Configuring access point...
*WM: Display-autoconnect
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
*WM: Handle root
*WM: Handle root
*WM: Scan done
*WM: DUP AP: FRITZ!Box 6490 Cable
*WM: DUP AP: Vodafone Homespot
*WM: DUP AP: Vodafone Homespot
*WM: DUP AP: Vodafone Homespot
*WM: DUP AP: Vodafone Hotspot
*WM: DUP AP: Vodafone Hotspot
*WM: DUP AP: Vodafone Hotspot
*WM: DUP AP: Vodafone Hotspot
*WM: FRITZ!Box 7412
*WM: -62
*WM: KabelBox-A210
*WM: -63
*WM: LohlasLustLoch
*WM: -68
*WM: FRITZ!Box 6490 Cable
*WM: -71
*WM: MyNewCastle
*WM: -72
*WM: devolo-bcf2af8bc53d
*WM: -74
*WM: HITRON-D100
*WM: -74
*WM: RefusedAreFuckingDead!
*WM: -75
*WM: Vodafone Homespot
*WM: -79
*WM: Vodafone Hotspot
*WM: -80
*WM: Skipping due to quality
*WM: o2-WLAN00
*WM: -81
*WM: Skipping due to quality
*WM: WLAN-7KC88L
*WM: -82
*WM: Skipping due to quality
*WM: HITRON-5D70
*WM: -83
*WM: Skipping due to quality
*WM: KabelBox-F580
*WM: -85
*WM: Skipping due to quality
*WM: Butterplume
*WM: -85
*WM: Skipping due to quality
*WM: o2-WLAN51
*WM: -86
*WM: Skipping due to quality
*WM: KabelBox-B224
*WM: -87
*WM: Skipping due to quality
*WM: WLAN-658797
*WM: -89
*WM: Skipping due to quality
*WM: JammiederBoss
*WM: -91
*WM: Skipping due to quality
*WM: KDG-F3CFA
*WM: -91
*WM: Skipping due to quality
*WM: FRITZ!Box 6360 Cable
*WM: -91
*WM: Skipping due to quality
*WM: KDG-677E3
*WM: -92
*WM: Skipping due to quality
*WM: Sent config page

Exception (29):
epc1=0x40214fe4 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffd80 end: 3fffffb0 offset: 01a0

stack>>>
3fffff20: 4024f8c0 00000000 000000ff 40204dc2
3fffff30: 402261e5 00000000 3ffeeda0 4022629c
3fffff40: 40225fa5 3ffeedb8 3ffef580 0224fd6d
3fffff50: 60000600 00000003 00000000 0000000b
3fffff60: 40226509 008b8a59 3ffef580 60000600
3fffff70: 4023cc5d 3ffeedb8 3ffef580 0224df16
3fffff80: 4023cca2 3fffdab0 00000000 3fffdcb0
3fffff90: 3ffef5a8 3fffdab0 00000000 4023c8db
3fffffa0: 40000f49 40000f49 3fffdab0 40000f49
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(1,6)

ets Jan 8 2013,rst cause:4, boot mode:(1,6)

wdt reset

Additional info and screenshot

Partial rendering sometimes:

wifimanager-partial-rendered-html

Originally created by @martinberlin on GitHub (Jul 25, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/677 Serial Output: `` *WM: SET AP STA DISPLAY prints: Display can't connect to WiFi. Entering config mode Please connect to: Display-autoconnect Access Point And browse 192.168.4.1 to configure the display WiFi connection. 192.168.4.1 Display-autoconnect *WM: *WM: Configuring access point... *WM: Display-autoconnect *WM: AP IP address: *WM: 192.168.4.1 *WM: HTTP server started Exception (29): epc1=0x40214fe4 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000 ctx: sys sp: 3ffffd80 end: 3fffffb0 offset: 01a0 `` Question: Using mDNS will somehow affect wifiManager ? I guess not, but I just want to make sure. ### Basic Infos WemosD1 ESP8266 Sketch uses 366329 bytes (35%) of program storage space. Maximum is 1023984 bytes. Global variables use 68928 bytes (84%) of dynamic memory #### Hardware WiFimanager Branch/Release: master Esp8266/Esp32: Esp8266 Hardware: ESP-12e ### Description Tried using development branch but there I see no scan. All other options work correctly, so I can use it as is, just curious to see if I can get the scan to work since looks like a great addition. Great work guys it looks really cool. Sketch to reproduce the failure is here: https://github.com/martinberlin/esp/tree/implement/wifimanager/e-paper-7.5-Skygate Scan quite randomly crashes or the HTML is rendered partially (For ex. List but no Form below, or list+Form but no Save button) ### Settings in IDE Module: NodeMcu, Wemos D1 Additional libraries: #include <ESP8266mDNS.h> // display libs #include <SPI.h> #include <GxEPD.h> #include <GxGDEW075T8/GxGDEW075T8.cpp> #include <GxIO/GxIO_SPI/GxIO_SPI.cpp> #include <GxIO/GxIO.cpp> ### Sketch https://github.com/martinberlin/esp/tree/implement/wifimanager/e-paper-7.5-Skygate ### Full Serial output Display-autoconnect *WM: *WM: Configuring access point... *WM: Display-autoconnect *WM: AP IP address: *WM: 192.168.4.1 *WM: HTTP server started *WM: Handle root *WM: Handle root *WM: Scan done *WM: DUP AP: FRITZ!Box 6490 Cable *WM: DUP AP: Vodafone Homespot *WM: DUP AP: Vodafone Homespot *WM: DUP AP: Vodafone Homespot *WM: DUP AP: Vodafone Hotspot *WM: DUP AP: Vodafone Hotspot *WM: DUP AP: Vodafone Hotspot *WM: DUP AP: Vodafone Hotspot *WM: FRITZ!Box 7412 *WM: -62 *WM: KabelBox-A210 *WM: -63 *WM: LohlasLustLoch *WM: -68 *WM: FRITZ!Box 6490 Cable *WM: -71 *WM: MyNewCastle *WM: -72 *WM: devolo-bcf2af8bc53d *WM: -74 *WM: HITRON-D100 *WM: -74 *WM: RefusedAreFuckingDead! *WM: -75 *WM: Vodafone Homespot *WM: -79 *WM: Vodafone Hotspot *WM: -80 *WM: Skipping due to quality *WM: o2-WLAN00 *WM: -81 *WM: Skipping due to quality *WM: WLAN-7KC88L *WM: -82 *WM: Skipping due to quality *WM: HITRON-5D70 *WM: -83 *WM: Skipping due to quality *WM: KabelBox-F580 *WM: -85 *WM: Skipping due to quality *WM: Butterplume *WM: -85 *WM: Skipping due to quality *WM: o2-WLAN51 *WM: -86 *WM: Skipping due to quality *WM: KabelBox-B224 *WM: -87 *WM: Skipping due to quality *WM: WLAN-658797 *WM: -89 *WM: Skipping due to quality *WM: JammiederBoss *WM: -91 *WM: Skipping due to quality *WM: KDG-F3CFA *WM: -91 *WM: Skipping due to quality *WM: FRITZ!Box 6360 Cable *WM: -91 *WM: Skipping due to quality *WM: KDG-677E3 *WM: -92 *WM: Skipping due to quality *WM: Sent config page Exception (29): epc1=0x40214fe4 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000 ctx: sys sp: 3ffffd80 end: 3fffffb0 offset: 01a0 >>>stack>>> 3fffff20: 4024f8c0 00000000 000000ff 40204dc2 3fffff30: 402261e5 00000000 3ffeeda0 4022629c 3fffff40: 40225fa5 3ffeedb8 3ffef580 0224fd6d 3fffff50: 60000600 00000003 00000000 0000000b 3fffff60: 40226509 008b8a59 3ffef580 60000600 3fffff70: 4023cc5d 3ffeedb8 3ffef580 0224df16 3fffff80: 4023cca2 3fffdab0 00000000 3fffdcb0 3fffff90: 3ffef5a8 3fffdab0 00000000 4023c8db 3fffffa0: 40000f49 40000f49 3fffdab0 40000f49 <<<stack<<< ets Jan 8 2013,rst cause:2, boot mode:(1,6) ets Jan 8 2013,rst cause:4, boot mode:(1,6) wdt reset ### Additional info and screenshot Partial rendering sometimes: ![wifimanager-partial-rendered-html](https://user-images.githubusercontent.com/2692928/43227882-51ed2cfa-9060-11e8-9db8-9ebf61d6306c.png)
kerem 2026-02-28 01:25:53 +03:00
Author
Owner

@tablatronix commented on GitHub (Jul 26, 2018):

try development? shrug

update your esp library?

<!-- gh-comment-id:408141708 --> @tablatronix commented on GitHub (Jul 26, 2018): try development? shrug update your esp library?
Author
Owner

@martinberlin commented on GitHub (Jul 26, 2018):

Right hint! Thank you very much. What it solved was this:

  1. Installing the ESP libraries from here: https://github.com/esp8266/Arduino#using-git-version

  2. Also removed this two libraries leaving alone WiFiManager.h

    //#include <DNSServer.h>
    //#include <WiFiClient.h>
    #include <WiFiManager.h>

Worked and now seems to be stable. But the only part I could not solve is that Wifi scan page is still rendering 1 time in each 5 halfways like I described before. Did anyone had also this ?

<!-- gh-comment-id:408232008 --> @martinberlin commented on GitHub (Jul 26, 2018): Right hint! Thank you very much. What it solved was this: 1. Installing the ESP libraries from here: https://github.com/esp8266/Arduino#using-git-version 2. Also removed this two libraries leaving alone WiFiManager.h //#include <DNSServer.h> //#include <WiFiClient.h> #include <WiFiManager.h> Worked and now seems to be stable. But the only part I could not solve is that Wifi scan page is still rendering 1 time in each 5 halfways like I described before. Did anyone had also this ?
Author
Owner

@tablatronix commented on GitHub (Jul 26, 2018):

Could be timing out somehow

<!-- gh-comment-id:408259391 --> @tablatronix commented on GitHub (Jul 26, 2018): Could be timing out somehow
Author
Owner

@martinberlin commented on GitHub (Jul 27, 2018):

Thanks tablatronix. And how is possible to solve the time out ? It works better now but it’s still not stable enough.
More info about the chip:
Chip ID
5931965
Flash Chip ID
1458280
Flash Size
4194304 bytes
Real Flash Size
4194304 bytes
SDK Version
2.2.1(cfd48f3)
Core Version
9c846bd5
Boot Version
31
CPU Frequency
80MHz
Memory - Free Heap
2704 bytes available
Memory - Sketch Size
Used / Total bytes
366384 / 3143472

<!-- gh-comment-id:408318443 --> @martinberlin commented on GitHub (Jul 27, 2018): Thanks tablatronix. And how is possible to solve the time out ? It works better now but it’s still not stable enough. More info about the chip: Chip ID 5931965 Flash Chip ID 1458280 Flash Size 4194304 bytes Real Flash Size 4194304 bytes SDK Version 2.2.1(cfd48f3) Core Version 9c846bd5 Boot Version 31 CPU Frequency 80MHz Memory - Free Heap 2704 bytes available Memory - Sketch Size Used / Total bytes 366384 / 3143472
Author
Owner

@martinberlin commented on GitHub (Jul 29, 2018):

I solved it editing menu and disabled scan. However would like to discover what it is!
One thing I noticed is that fails more when I scan a place that is full of WiFis so can be very well a time-out. What I don’t know is what configuration to change to make it work.

<!-- gh-comment-id:408702996 --> @martinberlin commented on GitHub (Jul 29, 2018): I solved it editing menu and disabled scan. However would like to discover what it is! One thing I noticed is that fails more when I scan a place that is full of WiFis so can be very well a time-out. What I don’t know is what configuration to change to make it work.
Author
Owner

@tablatronix commented on GitHub (Jul 29, 2018):

Not sure I have over 20 aps in my scans, maybe one of the aps has a weird name and crashes it?

<!-- gh-comment-id:408706352 --> @tablatronix commented on GitHub (Jul 29, 2018): Not sure I have over 20 aps in my scans, maybe one of the aps has a weird name and crashes it?
Author
Owner

@tablatronix commented on GitHub (Jul 29, 2018):

Hmm i noticed you have some quality skips, i wonder if that has something to do with reproducing this.

<!-- gh-comment-id:408706468 --> @tablatronix commented on GitHub (Jul 29, 2018): Hmm i noticed you have some quality skips, i wonder if that has something to do with reproducing this.
Author
Owner

@martinberlin commented on GitHub (Jul 30, 2018):

Not sure I have over 20 aps in my scans, maybe one of the aps has a weird name and crashes it?

Can be but it's hard to see what name can be causing the thing since it comes after the whole scan it's not stop in the middle. Actually it comes at the end, when in debug I see *WM: Sent config page -> Also when it's sending the HTML is the moment that crashes. That's why sometimes the scan page is rendered before it ends.

Hmm i noticed you have some quality skips

Yes! I tried to get them out but it makes no difference. Actually without scan it works very stable stable so I'm leaving only this button. Thanks for making the buttons configurable in development! It's a great addition and also the fact that you can use this to save parameters.

<!-- gh-comment-id:408878142 --> @martinberlin commented on GitHub (Jul 30, 2018): >Not sure I have over 20 aps in my scans, maybe one of the aps has a weird name and crashes it? Can be but it's hard to see what name can be causing the thing since it comes after the whole scan it's not stop in the middle. Actually it comes at the end, when in debug I see *WM: Sent config page -> Also when it's sending the HTML is the moment that crashes. That's why sometimes the scan page is rendered before it ends. >Hmm i noticed you have some quality skips Yes! I tried to get them out but it makes no difference. Actually without scan it works very stable stable so I'm leaving only this button. Thanks for making the buttons configurable in development! It's a great addition and also the fact that you can use this to save parameters.
Author
Owner

@tablatronix commented on GitHub (Jul 30, 2018):

Can you try turning this off?

boolean _preloadwifiscan = true; // preload wifiscan if true in .h file

<!-- gh-comment-id:408899883 --> @tablatronix commented on GitHub (Jul 30, 2018): Can you try turning this off? ` boolean _preloadwifiscan = true; // preload wifiscan if true` in .h file
Author
Owner

@martinberlin commented on GitHub (Jul 31, 2018):

I tried but it didn't make any difference. The only way to safely run it in my case is controlling the menu and taking away the scan function. This is what makes it crash on my Wemos D1.
I would be happy to help to debug this one in any way I possibly can :)

<!-- gh-comment-id:409376306 --> @martinberlin commented on GitHub (Jul 31, 2018): I tried but it didn't make any difference. The only way to safely run it in my case is controlling the menu and taking away the scan function. This is what makes it crash on my Wemos D1. I would be happy to help to debug this one in any way I possibly can :)
Author
Owner

@tablatronix commented on GitHub (Jul 31, 2018):

Do you always get an exception 29? When this happens and does it happen repeatedly or sometimes work.

<!-- gh-comment-id:409400746 --> @tablatronix commented on GitHub (Jul 31, 2018): Do you always get an exception 29? When this happens and does it happen repeatedly or sometimes work.
Author
Owner

@martinberlin commented on GitHub (Aug 3, 2018):

It sometimes work, but only 1 of each 10 times or so, comes mostly this exception and sometimes no exception but the HTML is rendered only half ways like described before.
I left a link on the top to my sketch, maybe I'm doing something that is coming on the way, but curiously without this scan stuff it works very well and it's stable enough for me.
Scan would be nice, but it's not a must in this case, since I build stuff we use internally at the office. So I use it mostly when I come home and make some update. Thanks anyways for the support!

<!-- gh-comment-id:410369469 --> @martinberlin commented on GitHub (Aug 3, 2018): It sometimes work, but only 1 of each 10 times or so, comes mostly this exception and sometimes no exception but the HTML is rendered only half ways like described before. I left a link on the top to my sketch, maybe I'm doing something that is coming on the way, but curiously without this scan stuff it works very well and it's stable enough for me. Scan would be nice, but it's not a must in this case, since I build stuff we use internally at the office. So I use it mostly when I come home and make some update. Thanks anyways for the support!
Author
Owner

@tablatronix commented on GitHub (Aug 4, 2018):

Youll probably have to decode that exception.
Theres a lot going on in that sketch

<!-- gh-comment-id:410405273 --> @tablatronix commented on GitHub (Aug 4, 2018): Youll probably have to decode that exception. Theres a lot going on in that sketch
Author
Owner

@martinberlin commented on GitHub (Aug 10, 2018):

Thanks. I will try this weekend to use this
https://github.com/me-no-dev/EspExceptionDecoder Restart the scan and check what is going on. Thanks!

<!-- gh-comment-id:411977619 --> @martinberlin commented on GitHub (Aug 10, 2018): Thanks. I will try this weekend to use this https://github.com/me-no-dev/EspExceptionDecoder Restart the scan and check what is going on. Thanks!
Author
Owner

@tablatronix commented on GitHub (Aug 10, 2018):

What esp lib again, have you tried staging?
Others have also reported this error.

<!-- gh-comment-id:412063480 --> @tablatronix commented on GitHub (Aug 10, 2018): What esp lib again, have you tried staging? Others have also reported this error.
Author
Owner

@martinberlin commented on GitHub (Aug 18, 2018):

I'm on the last updated master of the Arduino esp8266 library on github. Is there any other branch that I should switch ?
https://github.com/esp8266/Arduino -> I don't see any staging branch there

<!-- gh-comment-id:414077652 --> @martinberlin commented on GitHub (Aug 18, 2018): I'm on the last updated master of the Arduino esp8266 library on github. Is there any other branch that I should switch ? https://github.com/esp8266/Arduino -> I don't see any staging branch there
Author
Owner

@tablatronix commented on GitHub (Aug 18, 2018):

that is staging

<!-- gh-comment-id:414078402 --> @tablatronix commented on GitHub (Aug 18, 2018): that is staging
Author
Owner

@martinberlin commented on GitHub (Aug 20, 2018):

I just wanted to comment that in another projects like for example a digital security camera I'm making with a simple Arducam this is not happening. Also there must be something not playing well together with the GxEPD e-ink display library and your WifiManager.
Since for other things it works good and it does not trigger this bug.

<!-- gh-comment-id:414204889 --> @martinberlin commented on GitHub (Aug 20, 2018): I just wanted to comment that in another projects like for example a [digital security camera](https://github.com/martinberlin/esp/tree/master/FasarekCam) I'm making with a simple Arducam this is not happening. Also there must be something not playing well together with the GxEPD e-ink display library and your WifiManager. Since for other things it works good and it does not trigger this bug.
Author
Owner

@tablatronix commented on GitHub (Aug 20, 2018):

Well if you guys get a chance , decode your exceptions and we can figure it out, ill bet its a esp lib bug. Or a memory issue.

What chips are you using, make sure to run a flash check sketch to make sure your flash is ok, and do a fulll flash erase.

<!-- gh-comment-id:414294238 --> @tablatronix commented on GitHub (Aug 20, 2018): Well if you guys get a chance , decode your exceptions and we can figure it out, ill bet its a esp lib bug. Or a memory issue. What chips are you using, make sure to run a flash check sketch to make sure your flash is ok, and do a fulll flash erase.
Author
Owner

@martinberlin commented on GitHub (Nov 7, 2018):

I can confirm I didn't get this issue anymore on any of my sketches. That was a project with a big E-ink display and it was the only one where I got this issue. Now I upgraded to the latest core and to develop of your library and it's not coming anymore. So I bet it was not your bug but as you mention in other layers. Thank you very much for replying and your support!

<!-- gh-comment-id:436758365 --> @martinberlin commented on GitHub (Nov 7, 2018): I can confirm I didn't get this issue anymore on any of my sketches. That was a project with a big E-ink display and it was the only one where I got this issue. Now I upgraded to the latest core and to develop of your library and it's not coming anymore. So I bet it was not your bug but as you mention in other layers. Thank you very much for replying and your support!
Author
Owner

@tablatronix commented on GitHub (Nov 7, 2018):

interesting I forgot about this issue, I wonder what it was, I probably need to to make sure there are no memory leaks still just in case.

<!-- gh-comment-id:436760559 --> @tablatronix commented on GitHub (Nov 7, 2018): interesting I forgot about this issue, I wonder what it was, I probably need to to make sure there are no memory leaks still just in case.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#566
No description provided.