me-no-dev / EspExceptionDecoder

Exception Stack Trace Decoder for ESP8266 and ESP32
GNU General Public License v2.0
1.04k stars 137 forks source link

Decode Failed #76

Closed Grutsch closed 2 years ago

Grutsch commented 2 years ago

I am using the latest ExceptionDecoder (2.02) also tried earlier ones but doesn't matter what I do I get Decode Failed (IDE 1.8.19).

Output

drmpf commented 2 years ago

same here when trying to decode from ESP32 Arduino board support V2.0.2

Speedy2k commented 2 years ago

Same here also! Arduino Core v2.0.2

me-no-dev commented 2 years ago

which version exception decoder though?

Speedy2k commented 2 years ago

2.0.2

drmpf commented 2 years ago

Same here V2.0.2 of the decoder.
Looking at the code it seems there is a problem opening/reading the input stream or the thread. You swallow a number of exceptions there.
Suggest you re-wrap them in RunTimeExceptions and re-throw them and catch the handle (print) them at the higher level for better error messages.

me-no-dev commented 2 years ago

ok, i guess we are in situation where the latest arduino-esp32 is also 2.0.2 :) Which version arduino-esp32 are you using?

drmpf commented 2 years ago

I am using Arduino IDE V1.8.19 and ESP32 board support V2.0.2 installed from this url https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json and the decoder from your releases page (as of 7th March 2022) p.s. this decoder is invaluable. I am lost without it :-(

me-no-dev commented 2 years ago

Except to build a version for you to try, that has more debug enabled, I do not know what to do. I am using the same decoder and it works nicely here (Mac, but should not matter). Latest version should work fine on all chips that are currently supported too (and any future ones, hopefully)

Grutsch commented 2 years ago

No problem I am willing to help. So just let me know where to pick up this debug version

mcpicoli commented 2 years ago

Please see the discussion on #68, already closed.

TL;DR: Install the ESP32 board package manually from Espressif's GitHub repo.

The long version: The official board definition package from Espressif for the ESP32 architecture as referenced by @drmpf is still outdated and does not download the latest toolchain ("-patch2" version). If you manually install the ESP32 board package, it should work.

There is no problem with the EspExceptionDecoder (2.0.2) per se, but it would be very useful to have more detailed error messages than a simple "Decode Failed".

The instructions for the manual install are here.

drmpf commented 2 years ago

@mcpicoli

it would be very useful to have more detailed error messages

There are a couple of articles I wrote on Java error recovery with some sample code for un-wrapping exceptions. Java GUI Programming Tips and Guidelines - Error Recovery and Java GUI Programming Tips and Guidelines -- Unified Error/Information Messages and Help

drmpf commented 2 years ago

I can confirm that adding the .dll's from the zip file mentioned #68 fixed my issue and that I can now decode traces from ESP23 V2.0.2 installed via url
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Grutsch commented 2 years ago

For me, the solution described by drmpf is working. So I will close this issue. Thanks for the help.