From a89a4e13536acafeae31566b7e9c402f2af4dd37 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 5 Apr 2026 11:59:02 -1000 Subject: [PATCH] Always log EXCVADDR for exception resets A null EXCVADDR (0x00000000) is the key diagnostic for null pointer crashes (LoadProhibited/StoreProhibited). Suppressing it when zero hides the most useful information. --- esphome/components/esp8266/crash_handler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/esp8266/crash_handler.cpp b/esphome/components/esp8266/crash_handler.cpp index 5aeb6f6f2d..9ffe0ff021 100644 --- a/esphome/components/esp8266/crash_handler.cpp +++ b/esphome/components/esp8266/crash_handler.cpp @@ -194,7 +194,8 @@ void crash_handler_log() { if (resetInfo.epc3 != 0) { ESP_LOGE(TAG, " EPC3: 0x%08" PRIX32, resetInfo.epc3); } - if (resetInfo.excvaddr != 0) { + if (resetInfo.reason == REASON_EXCEPTION_RST) { + // Always log EXCVADDR for exceptions — 0x00000000 IS the diagnostic for null pointer crashes ESP_LOGE(TAG, " EXCVADDR: 0x%08" PRIX32 " (faulting address)", resetInfo.excvaddr); } if (resetInfo.depc != 0) {