stack-overflow only shows which thread caused it via serial

could maybe be solved by making esp-idf save core dump and evaluate it on boot if reboot reason is panic. see also: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/core_dump.html

relevant additional info from user danielb @bugadani:matrix.org in esp-rs channel:

unfortunately, the problem is that a stack overflow is only detected at task switching, so at that point your memory is corrupted and user code can't run safely

Edited by thomas351