Hello,
Due to the amount of codes I have and not knowing the specific area that this problem is occurring in, it didn't seem logical to post all of my codes on here. I will do my best to explain the problem.
Currently the program is faulting whenever I perform too many HTTP request to the Wi-Fi module that I am using. To verify this, I've commented out the Wi-FI section and the program works as expected without crashing. The last time when I've seen a fault occurring due to the Wi-Fi was when I was allocating too much memory for the stack to handle (default stack size gotten from "Project Properties -> Linker -> Basic Options" is 512), which was a char array of around 250 bytes. To try to circumvent this, as I do not know what changing the stack size and heap size will do, nor how to do so correctly, I've changed the structure of my code so that it is not passing in so many parameters anymore, as I've recently learned that that increased the stack size.
However, the program now crashes at random number of HTTP request that I make to the Wi-Fi module, which leads me to think that somehow either the stack size or the heap size is exceeding the limits. I am not sure however, and thus would like to know how I can track the current stack/heap size of a program.
Thank you