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
Micropython 1.19.1 crashes on ESP32 #9366
Comments
I am running into a similar issue which I can associate with specific |
Intersting.. I don't use WiFi (or the network module) at all, but I do use Bluetooth, and I do set gap_name by |
Yes, still happens.. (tested with
|
If you build the code yourself locally, you can use
Then if it crashes during that session (it's a terminal session) it will show you the backtrace. But I can actually decode the backtrace because you're using an official build. It is:
It's in So it's something to do with I2S, most likely not being fully deinitialised on soft reset. |
Thanks! I wasn't aware of this tool. Definitely gives some hints. I think I found the end-case where I don't deinit() the I2S. I'll see if it helps. I think we can close this for now and I'll reopen if it persists. |
Better keep it open. If that is the reason, it must be fixed in the code to automagically deinit I2S on soft reboot. |
@zachmoshe please let us know if you fixed it by calling |
Seems like it helped. So far I haven't seen this happening again. |
So that the FreeRTOS resources can be freed, eg on soft reset. Fixes issue #9366. Signed-off-by: Damien George <damien@micropython.org>
Thanks for confirming. Should be fixed by 0ee877a, which adds a finaliser to I2S. |
So that the FreeRTOS resources can be freed, eg on soft reset. Fixes issue micropython#9366. Signed-off-by: Damien George <damien@micropython.org>
So that the FreeRTOS resources can be freed, eg on soft reset. Fixes issue micropython#9366. Signed-off-by: Damien George <damien@micropython.org>
So that the FreeRTOS resources can be freed, eg on soft reset. Fixes issue micropython#9366. Signed-off-by: Damien George <damien@micropython.org>
I'm running MicroPython v1.19.1 on a ESP32 board. Sometimes, after a soft-reset of the device, the device start running but immediately crashes with the following message. The second reboot succeeds.
The device has an sdcard module (SPI), and I2S board connected. It uses the bluetooth (although I'm not sure if it kicks in before it shuts down). Other connections seem harmless (switches, leds, ...). The code will basically read WAV files from the sdcard and play through I2S.
The crash doesn't happen all the times, and I couldn't replicate exactly, but I suspect it has something to do with open filehandles. I'm basically deinit-ing SPI and I2S before shutting down, but if it seems related I can double check that there is no other exception flow that I'm missing.
The main problem is that I don't understand this message so have no idea where to look for solutions. Can anyone help understanding what's going on?
The text was updated successfully, but these errors were encountered: