-
Notifications
You must be signed in to change notification settings - Fork 7.6k
assertion "heap != NULL && "free() target pointer is outside heap areas"" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c", line 267, function: heap_caps_free abort() was called at PC 0x400e89a7 on core 1 #3417
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
Comments
Please follow the instructions in the ISSUE TEMPLATE to decode your backtrace and properly format your code. |
Hello lbernstone, can youplease tell me how to insert the full code as code? I´ve tried to Edit, but the character " How can I decode the backtrace? |
Thank you for your links. I have updated my first post. I´m sorry for the first formatting. |
Is anyone here who can help me? :-) |
Nobody has answered b/c your code is too complicated. Cut it down to the smallest bit that shows the error. The general error is that you are trying to access a string that has been destroyed. Converting back and forth b/w char* and String (String(value[0].c_str())) cannot be helping things. |
Okay, thank you for this information. I changed this:
to just one, easy row:
This works. But if I want to read all six characteristics, I get furthermore an error. I just read six instead of one value, nothing other changed.
Here is the decoded backtrace result:
Could you please have a look, what´s furthermore going wrong? Thank You in advance |
std::string value[5]; value[0] = pRemoteCharacteristic->readValue();
value[1] = pRemoteCharacteristic2->readValue();
value[2] = pRemoteCharacteristic3->readValue();
value[3] = pRemoteCharacteristic4->readValue();
value[4] = pRemoteCharacteristic5->readValue();
value[5] = pRemoteCharacteristic6->readValue(); Do you see any problem with this? Chuck. |
Also, look at your decoded back trace. Start at the end and work forwards:
just the initial code for Arduino framework
The default for Arduino. 0x400d25e5: loop() at c:\users\simon\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits/basic_string.h line 544 The
Creating a new
Deleting the existing object to create a new modified version. What this looks like to me is that when you accessed the 6th element of a five element array, the String library interpreted the current memory image of the '6th' element as a pre-allocated String that needed to be recreated to hold the 'new' value you assigned. since the memory image was not a string an explosion inssued. Chuck. |
that was it! It work´s! Thank you both so much! :-) |
This error refers to a depassement of an array elements or capacity of a memory size in general ! please verify your arrays sizes |
Good day everybody,
I'm currently having a programming problem and hope you can see something I do not currently see :-)
I did the following:
Unfortunately, the following happens now:
If I only read ONE value (or a characteristic) in the loop in my loop, it works.
If I read and output ALL six values (or six characteristics) in the sketch in my loop, it will NOT work.
Error in Serial Monitor:
Decoded Backtrace:
I suspect that it has something to do with the "BLERemoteCharacteristic::readValue()" function. This has already been discussed in the past (#2800). Unfortunaly, this solution went wrong for me.
This is my sketch, running on ESP32 ROOM:
I look forward to your tips and say thank you for your help.
greeting
Simon
The text was updated successfully, but these errors were encountered: