Still Getting Lots of: imp crashed, reason: out of memory

I have worked through a lot of these, and almost every time it was my code to blame, but I am now still getting this and it occurs in an OutputPort.set([“key”,“value”]) call.

Power state: online=>offline imp crashed, reason: out of memory

There doesn’t seem to be a rhyme or reason to which one fails. I can sort of fix it by only processing one “packet” from the serial port per imp.wakeup() call, but then it seems that I am dropping serial calls in certain circumstances (when the imp first turns I send a command to my system that sends back the current state, which may be 10-30 commands with data, which usually has me set state of some of the output ports).

Any better way to debug this?

Thanks!

Not right now, no; are you using blobs or strings to suck data out of the serial? I suspect you’re running into memory fragmentation if you’re using strings.

If you want to PM your code I can take a look…

I am using blobs. Sent code. Thanks!

(for those interested: cnr1089’s problem appeared to be due to a bug in the current release - he’s running a pre-release version of release-14 and this appears to solve his problem. This is due out shortly for everyone else!)