I (898) camera_httpd: Starting web server on port: '80' I (898) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1 I (918) camera_httpd: Starting stream server on port: '81' ESP_ERROR_CHECK failed: esp_err_t 0x102 (ESP_ERR_INVALID_ARG) at 0x400df419 0x400df419: app_mdns_main at /root/myGit/t23921/main/app_mdns.c:233 (discriminator 1)

file: "./main/app_mdns.c" line 233 func: app_mdns_main expression: mdns_hostname_set(hname)

abort() was called at PC 0x4008ff47 on core 0 0x4008ff47: _esp_error_check_failed at /root/esp-idf/components/esp_system/esp_err.c:50

Backtrace: 0x40081fc1:0x3ffdc900 0x4008ff51:0x3ffdc920 0x40097a12:0x3ffdc940 0x4008ff47:0x3ffdc9b0 0x400df419:0x3ffdc9e0 0x400dc06d:0x3ffdca60 0x40092a31:0x3ffdca80 0x40081fc1: panic_abort at /root/esp-idf/components/esp_system/panic.c:452

0x4008ff51: esp_system_abort at /root/esp-idf/components/esp_system/port/esp_system_chip.c:84

0x40097a12: abort at /root/esp-idf/components/newlib/abort.c:38

0x4008ff47: _esp_error_check_failed at /root/esp-idf/components/esp_system/esp_err.c:50

0x400df419: app_mdns_main at /root/myGit/t23921/main/app_mdns.c:233 (discriminator 1)

0x400dc06d: user_connect_task at /root/myGit/t23921/main/app_main.c:116

0x40092a31: vPortTaskWrapper at /root/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162

根据给出的错误信息,错误发生在文件'./main/app_mdns.c'的第233行,函数为app_mdns_main,具体是在调用mdns_hostname_set(hname)时出错。错误类型为ESP_ERR_INVALID_ARG,表示传递给函数的参数无效。

根据错误信息的回溯(backtrace),可以看到错误最终导致了程序的中止(abort)。回溯显示了错误发生的路径,从panic_abort函数开始,然后是esp_system_abort函数,接着是abort函数,最后是_esp_error_check_failed函数。

要解决这个错误,需要检查传递给mdns_hostname_set函数的参数hname是否有效。可能需要检查参数的类型、值范围、是否为空等。另外,还可以查看mdns_hostname_set函数的定义和文档,以了解该函数的使用方法和限制。

ESP32 错误: ESP_ERR_INVALID_ARG 在 mdns_hostname_set 函数中

原文地址: https://www.cveoy.top/t/topic/P3Q 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录