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

Hard fault crash when using HTTPServer: ESP32-C3 #9749

Closed
dhalbert opened this issue Oct 23, 2024 · 0 comments · Fixed by #9748
Closed

Hard fault crash when using HTTPServer: ESP32-C3 #9749

dhalbert opened this issue Oct 23, 2024 · 0 comments · Fixed by #9748

Comments

@dhalbert
Copy link
Collaborator

Running this test program, with a settings.toml containing valid values for CIRCUITPY_WIFI_SSID and CIRCUITPY_WIFI_PASSWORD, will cause a hard fault with a few minutes.

It takes around 1-5 minutes to restart in safe mode, though I have seen it run longer. No interaction with the HTTP server is needed. I simply restart code.py and wait.

import wifi
import socketpool
from adafruit_httpserver import Server
import time

time.sleep(5)
print("IP addr", wifi.radio.ipv4_address)

pool = socketpool.SocketPool(wifi.radio)
server = Server(pool, debug=False)

# port 80 will get EADDRINUSE due to web workflow
# Either IP adddress will cause a crash eventually.
server.start("0.0.0.0", 8000)
#server.start(str(wifi.radio.ipv4_address), 8000)

while True:
   try:
      server.poll()
   except Exception as e:
      print(type(e))

Either server.start() can cause a crash: the wildcard IP address or the actual IP address don't matter.

I have reproduced this only on a QT Py ESP32-C3. I cannot reproduce on a QT ESP32-S3, with no PSRAM.

[replaces #9735]

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

Successfully merging a pull request may close this issue.

1 participant