I am working in some C++ code and needed to format some string and numeric data so started using std::stringstream. Functionally, all appeared to work until I end a task that was using these classes. At this point I get an exception:
0x40083a0b: prvInsertBlockIntoFreeList at /home/kolban/esp32/esptest/esp-idf/components/freertos/./heap_regions.c:410
This makes me feel that some storage has been lost or corrupted. I checked and checked and checked my code but am missing the issue.
A fundamental question ... are the use of standard template library routines such as std::stringstream considered supported? If I run into reproducible problems using STL, will GitHub issues be examined? I don't want to waste anyones time if we believe that the the STL used in conjunction with ESP-IDF simply isn't a supported combination.
Using C++ std::stringstream and heap exceptions
Using C++ std::stringstream and heap exceptions
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 9702
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using C++ std::stringstream and heap exceptions
That is indeed the sign of a corrupted memory blocklist. One thing that comes to mind: do you exit your task with vTaskDelete? Not doing so (and just returning from the task function) leads to a crash, though I'm not sure anymore if it was this crash or something else.
Re: Using C++ std::stringstream and heap exceptions
Stringstreams from STL should work. If you have a case to reproduce this issue, please post it on GitHub.
Who is online
Users browsing this forum: burtrum, Google [Bot] and 92 guests