Skip to content

mdns crashes when browsed with a bonjour scanner #6815

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

Closed
maxdd opened this issue May 27, 2022 · 1 comment
Closed

mdns crashes when browsed with a bonjour scanner #6815

maxdd opened this issue May 27, 2022 · 1 comment
Labels
Resolution: Duplicate Issue is a duplicate of another issue

Comments

@maxdd
Copy link

maxdd commented May 27, 2022

Board

ESP32 Dev Module

Device Description

Standard version

Hardware Configuration

Nothing special

Version

v2.0.3

IDE Name

PlatformIO

Operating System

Windows 10

Flash frequency

40Mhz

PSRAM enabled

no

Upload speed

115200

Description

Whenever i browse via an android bonjour browser (Service Browser) i receive the following crash.
Overall with this newer framework i cant even browse via domain.local url nor i can perform OTA unless i explicitly set the proper esp32 ip

Sketch

static void wifi_init()
{
    .....

    WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
        Serial.print("[I][ESP32]: WiFi connected. IP: ");
        Serial.println(IPAddress(info.got_ip.ip_info.ip.addr));

        .....

        ArduinoOTA
        .onStart([]() {
            String type;
            if (ArduinoOTA.getCommand() == U_FLASH)
                type = "sketch";
            else // U_SPIFFS
                type = "filesystem";
            // NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end()
            Serial.println("Start updating " + type);
        })
        .onEnd([]() {
            Serial.println("\nEnd");
        })
        .onProgress([](unsigned int progress, unsigned int total) {
            Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
        })
        .onError([](ota_error_t error) {
            Serial.printf("Error[%u]: ", error);
            if (error == OTA_AUTH_ERROR)
                Serial.println("Auth Failed");
            else if (error == OTA_BEGIN_ERROR)
                Serial.println("Begin Failed");
            else if (error == OTA_CONNECT_ERROR)
                Serial.println("Connect Failed");
            else if (error == OTA_RECEIVE_ERROR)
                Serial.println("Receive Failed");
            else if (error == OTA_END_ERROR)
                Serial.println("End Failed");
        });

    ArduinoOTA.setHostname(MDNS_NAME);

    ArduinoOTA.begin();

    .....

    },
        WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_GOT_IP);
}

void setup()
{
    Serial.begin(115200);

    wifi_init();
    WiFi.begin(WIFI_SSID, WIFI_PSK);

    while(!SPIFFS.begin(true));

    Serial.println();
    Serial.print("[I][ESP32]: Connecting to ");
    Serial.println(WIFI_SSID);

}

void loop(){}

Debug Message

Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4008a2cb  PS      : 0x00060b30  A0      : 0x8016482f  A1      : 0x3ffd45f0
A2      : 0x3ffd4b70  A3      : 0x00000000  A4      : 0x00000018  A5      : 0x3ffdf474
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x0000005f  A9      : 0x00000000
A10     : 0x00000000  A11     : 0x0000001c  A12     : 0x3ff96355  A13     : 0x00000000
A14     : 0x00000015  A15     : 0x00000006  SAR     : 0x00000013  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x40089820  LEND    : 0x40089836  LCOUNT  : 0x00000000


Backtrace:0x4008a2c8:0x3ffd45f00x4016482c:0x3ffd4610 0x40168639:0x3ffd4640 0x401692dd:0x3ffd4710

.\xtensa-esp32-elf-addr2line.exe -e firmware.elf 0x40168639:0x3ffd45a0
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mdns/mdns.c:1482

.\xtensa-esp32-elf-addr2line.exe -e firmware.elf 0x401692dd:0xffd4670
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mdns/mdns.c:4473

.\xtensa-esp32-elf-addr2line.exe -e firmware.elf 0x4008a2c8:0x3ffd4580
/builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/string/strcasecmp.c:46 (discriminator 4)

.\xtensa-esp32-elf-addr2line.exe -e firmware.elf 0x4016482c:0x3ffd45a0
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mdns/mdns.c:265


### Other Steps to Reproduce

_No response_

### I have checked existing issues, online documentation and the Troubleshooting Guide

- [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@maxdd maxdd added the Status: Awaiting triage Issue is waiting for triage label May 27, 2022
@me-no-dev
Copy link
Member

Dup: #6368

@VojtechBartoska VojtechBartoska added Resolution: Duplicate Issue is a duplicate of another issue and removed Status: Awaiting triage Issue is waiting for triage labels May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants