Open jonnor opened 3 months ago
I believe that this is due to this issue in upstream MicroPython: https://github.com/micropython/micropython/issues/6769
Turns out the issue was not really port specific - could also happen on RP2040, NRF52 etc.
The problem has been fixed now in upstream MicroPython, scheduled for release in MicroPython 1.24. However, that fix needs re-built firmware images.
There was another fix available, which added additional code to the module. I have backported this now to the MicroPython branch we use. And I have been able to run the modules on ESP32 in some example programs. A bit more testing is needed however to fully conclude it has been fixed.
Probably I will keep this issue open until MicroPython 1.24 and we have rebased onto that for the proper fix.
On ESP32 and ESP32-S3 I am seeing various exceptions and crashes related to the native modules.
It can be exceptions like
TypeError: 'slice' object isn't callable
. Orarray object is not callable
. Ortuple is not callable
. Or sometimes the entire interpreter crashes.I am seeing this both with
emltrees
,emliir
andemlfft
. At first, I thought this was due to something the C code did wrong. But I reduced several C examples down to a minimum, and would still hit the issue. Even one example with a plain function (no allocated objects) - and that function itself seems to dissapear. And the behavior is influenced by unrelated things in MicroPython - doing other things that allocate/collect is needed to trigger the issue.The same code also runs fine on x64 or STM32, or RP2040 - so it seems ESP32 port specific.