Ableton / link

Ableton Link
Other
1.06k stars 145 forks source link

Changing ESP-IDF Compiler Optimization Level to "Performance" causes ASIO to crash when network is lost #137

Closed vizzie closed 9 months ago

vizzie commented 10 months ago

In preparing my project for release, I've added CONFIG_COMPILER_OPTIMIZATION_PERF=y to my sdkconfig.defaults

If my device loses contact with the WiFi station it is connected to I get a panic and the system reboots. It appears to be a crash in the ASIO code. Perhaps related to the code worked on in issue #74 ?

To reproduce this in the ESP32 example:

  1. add CONFIG_COMPILER_OPTIMIZATION_PERF=y to the sdkconfig.defaults
  2. delete the sdkconfig file to cause it to regenerate based on the new compiler setting
  3. compile, flash, monitor the ESP32.
  4. After ESP32 is up and connected to a WiFi station, shut off the station so the ESP loses its WiFi.

Expected results: ESP32 tries to reconnect to station

Actual results: ESP32 panics and reboots

fgo-ableton commented 9 months ago

I pushed some changes to how asio is used on the ESP32. Could you check if the issue still persists?

vizzie commented 9 months ago

The issue seems to have been fixed. I had to upgrade to IDF v5 to get the example to build. I have been back on v4.3 because Link/asio broke the build in v5 of the IDF. Now to get my project building on IDF v5... a few things have changed 🙃