@hygy so you're saying it runs fine, but crashes occasionally? Or it never completes successfully?
If it never completes successfully then it's just likely that what you've written uses up too much memory:
If it is crashing only after some hours, try running E.getSizeOf(global, 1) repeatedly, and see if any one of the variables listed keeps getting bigger. If so, that might give some hint as to where the problem is. You can use E.getSizeOf(global, 2)/etc to drill down more to find the problem.
The disconnect is worrying too. If you're using something like the NodeMCU board, the USB is handled by a separate chip - about the only thing that could cause the connection to drop if if there was some problem with the power supply.
@tve I'm afraid there isn't - the usual stack trace stuff runs by storing the stack trace in variables, so it wouldn't work as there's no memory!
Usually these things aren't caused by the actual function that fails with out of memory though - it'd be something else eating it up slowly and not releasing it.
As I feel I have to say in these circumstances: if you used an 'official' Espruino board this would work without problems - because I can afford to properly support and test those boards
@Gordon it is running some time, whitout problem, then it dies. When this happens, i reset the board, the problem will be the same exactyl, then I try to plug and unplug the board from the usb port but it is wrong. So I send the saved code to esp8266 again with the espruino ide, then save() it, after that it is working.
I'll try tu put the given code lines to have more debug messages.
But I think there is stg wrong with the http get module, maybe the esp8266 implementation is buggy somewhere.
© Espruino, powered by microcosm.
Report a problem