Closed nfernandezsanz closed 3 years ago
I did not found the bug that you mentioned. The serial printing for your code are below
==>'{}'
==>'{}'
==>'{}'
==>'{}'
==>'{}'
==>'{}'
==>'{}'
==>'{}'
The decoded stacks showed nothing helpful for this case. You need to separate the suspected code from other code and test it alone to make sure the problem causes. This to prevent the out of memory or stack overflow problem from other tasks.
You can post your test code that causes the problem here.
Good afternoon, I've been designing a project for a while now using this incredible library. First of all I wanted to say thank you. The problem I found is centered around the command: ".toString". This error happens sometimes and from what I could identify it doesn't depend on the content of the Json. What happens ? I have a function that transforms the json into a string and performs some operations, I execute it very often, but once every so often it crashes the microcontroller and reboots.
To rule out the possibility that the json content is the cause of the problem, before executing the command ".toString" I am executing ".clear ()" and the problem occurs anyway. I attach this function:
What surprises me the most is that sometimes it works and sometimes it doesn't. It is the same function!
Normally another function is responsible for "completing" the json using the command ".add ()", I also attach the result of printing the json after passing it to a string (when the json.clear() is commented):
After verifying that I was not using any type of unsigned data, I made the decision to process the backtrace returned by the ESP32, I attached the analysis:
Based on the last 6 lines of the analysis, I managed to trace in my program where the error was being generated. With some "Serial.print", I came to the conclusion that the problem occurs right in the command mentioned already before in the post.
IDE: Arduino 1.8.13 ESP32 Dev Module
If more information is needed, I have no problem publishing it, the program is really extensive and I didn't want to make a really long post. Anyway, the other processes do not use json or library dependencies simultaneously. Thank you very much.