Chat freely about anything...

User avatar
By lithboy
#75175 This is my project: https://github.com/mmichon/esp-nextbus-mini on a Wemos D1 Mini.

It runs fine for a few days, then hangs (stops waking/refreshing the display).

I've added some diag println's to dump out the heap and it seems to be roughly constant, so I don't think there's a memory leak.

I've shorted RST to D0 to ensure that it wakes from deep sleep, but I've read that some boards require a pull-down on another pin.

Any ideas?
User avatar
By PatrykW
#75181 in download_prediction_xml() you are loading the entire server response to String and then you're loading a big chunk of that to another String variable. If i was a betting person, I would put my money on overflow there.
User avatar
By lithboy
#75239
PatrykW wrote:in download_prediction_xml() you are loading the entire server response to String and then you're loading a big chunk of that to another String variable. If i was a betting person, I would put my money on overflow there.


Thanks. The 8266EX has 96kB of RAM. These responses are no more than 1500 bytes. Moreover, the heap never goes below 38kB, so I doubt it's that.

Do ESP8266s just hang when they run out of RAM?
User avatar
By PatrykW
#75306 My experience is that an overflow causes a reboot. But then again, if your program runs a few times and then just "hangs", then it stands to reason that the server's response is causing it. After all, that's the only thing that can change from one cycle to another.